Skip to content
Spike edited this page Sep 28, 2019 · 4 revisions

addButtonToWindow($strWindow, $strName, $strBtnColor, $iSizeX, $iSizeY, $iPosX, $iPosY, $isPressed, $strText, $iTextX, $iTextY, $strColor, $doOutline)

$strWindow

Name of the window the switchbutton is added to.

$strName

Name of the button. It's important to use an unique name as this name is used for routing click events!

$strBtnColor

If this parameter equals '"Transparent"' the button will not have any texture or text, otherwise the parameter is passed to the buildButton function.

$iSizeX

This is the X-Size of the button.

$iSizeY

This is the Y-Size of the button.

$iPosX

This is the X-Position of the button.

$iPosY

This is the Y-Position of the button.

$isPressed

This controls if the new button is drawn as pressed.

$strText

This is the text that is written on the button. The parameter is passed to the addText function.

$iTextX

This is the X-Position of the Text. The parameter is passed to the addText function.

$iTextY

This is the Y-Position of the Text. The parameter is passed to the addText function.

$strColor

This is the color of the Text. The parameter is passed to the addText function.

$doOutline

Should the text have an outline or not. The parameter is passed to the addText function.

Example Call

addButtonToWindow "WND_QUIT_EDITOR" "BTN_EDITOR_QUIT_YES" "Red" 60 20 12 56 $False "Yes" 8 4 "Gold" $False

Result

Clone this wiki locally