[Overview][Constants][Types][Classes][Procedures and functions][Index] |
UI method for rendering and processing a push button
Source position: line 0
function UIContext.doButton( |
const r: Rect; //optionally provides a location and size for the button |
const Text: ; //text to display on the button |
var state: Boolean; //whether the button is depressed |
style: Integer = 0 //optional style flag to modify the look (default = 0) |
):Boolean; //Boolean result |
const r: Rect; //optionally provides a location and size for the button |
const Text: //text to display on the button |
):Integer; //Integer result |
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;