Module object.switch

Properties of the switch object most of these properties are optional !

a switch a simple object that changes its state upon being clicked while being simple it also has high graphic capabilities

Tables

creation_properties switch OBJECT CREATION PROPERTIES
read_properties switch OBJECT READ PROPERTIES


Tables

creation_properties
switch OBJECT CREATION PROPERTIES

Fields:

  • x [number] the x position of the switch
  • y [number] the y position of the switch
  • width [number] the width of the switch
  • height [number] the height of the switch
  • text [guih.main_ui.text] the text to put on the switch when its off
  • text_on [guih.main_ui.text] the text to put on the switch when its on
  • background_color [number] the background_color color of the switch when the switch is off
  • background_color_on [number] the background_color color of the switch when the switch is on
  • text_color [number] the color of the symbols on the switch when the switch is off (not the actual "text")
  • text_color_on [number] the color of the symbols on the switch when the switch is on (not the actual "text")
  • symbol [string] the symbol to fill the background of the switch with
  • tex [GuiH.texture] the texture to draw on the switch when its off
  • tex_on [GuiH.texture] the texture to draw on the switch when its on
  • on_change_state [function] the function that gets ran when the switch changes its state (gets passed the object and the event as an argument)
read_properties
switch OBJECT READ PROPERTIES

Fields:

  • value [boolean] the current state of the switch
generated by LDoc 1.4.6 Last updated 2022-06-23 16:51:50