On this page
UIButton
UIButton.new
Inputs:
- parentSizer [UISizer]:
- Label [string]:
- callback [object]: Callback function to be called when the button is clicked: function()
- functionObject [object?]: Function object of callback function [optional, default=NULL]
- xPosition [integer?]: [optional, default=-1]
- yPosition [integer?]: [optional, default=-1]
- width [integer?]: [optional, default=-1]
- height [integer?]: [optional, default=-1]
- borderDirection [integer?]: (BorderDirection.ALL, BorderDirection.TOP, BorderDirection.BOTTOM, BorderDirection.LEFT or BorderDirection.RIGHT) [optional, default=BorderDirection.NONE]
- borderSize [integer?]: in pixels [optional, default=0]
- proportion [integer?]: [optional, default=0]
Outputs:
- uiButton [UIButton]:
UIButton:destroy
UIButton:getEnabled
Outputs:
- [boolean]:
UIButton:isVisible
Outputs:
- [boolean]:
UIButton:setBackgroundColor
Inputs:
- red [float]: red (0.0 - 1.0)
- green [float]: green (0.0 - 1.0)
- blue [float]: blue (0.0 - 1.0)
- alpha [float?]: alpha (0.0 - 1.0) [optional, default=1.0]
UIButton:setEnabled
Inputs:
- enabled [boolean?]: [optional, default=true]
UIButton:setImage
Inputs:
- path [string]: Path to the image
- width [integer?]: [optional, default = 0]
- height [integer?]: [optional, default = 0]
- imagePosition [integer?]: (ImagePosition.LEFT, ImagePosition.RIGHT, ImagePosition.TOP, ImagePosition.BOTTOM) [optional, default=ImagePosition.LEFT]
UIButton:setText
Inputs:
- label [string]:
UIButton:setTextColor
Inputs:
- red [float]: red (0.0 - 1.0)
- green [float]: green (0.0 - 1.0)
- blue [float]: blue (0.0 - 1.0)
- alpha [float?]: alpha (0.0 - 1.0) [optional, default=1.0]
UIButton:setToolTip
Inputs:
- tooltip [string]:
UIButton:setVisible
Inputs:
- visible [boolean?]: [optional, default=true]
Last updated 12 Apr 2025, 16:09 +0200 .