[Overview][Classes][Index] |
UI method for rendering and processing a push button
Source position: line 0
function UIContext.doButton( |
const r: Rect; |
const Text: ; |
var state: Boolean; |
style: Integer = 0 |
):Boolean; |
const r: Rect; |
const Text: |
):Boolean; |
r |
|
optionally provides a location and size for the button |
Text |
|
text to display on the button |
state |
|
whether the button is depressed |
style |
|
optional style flag to modify the look |
r |
|
optionally provides a location and size for the button |
Text |
|
text to display on the button |
The button method does only take a text and state variable. This variable is modified if the button is pressed or depressed. When a state change occurs the method function returns True.
Example code how to implement a button
none.Rect(0, 0); ui.beginGroup(GroupFlags_GrowDownFromRight); if ui.doButton(none, 'Apply') then begin //code to apply your changes end; ui.endGroup;