Changes between Version 1 and Version 2 of GUI_-_Button


Ignore:
Timestamp:
Feb 3, 2014, 2:52:53 PM (10 years ago)
Author:
Josh
Comment:

Try to clean up the button GUI page a little. I can't seem to find the button example image though.

Legend:

Unmodified
Added
Removed
Modified
  • GUI_-_Button

    v1 v2  
    1 {{Template:GUI_Object|button|[wiki:GUI_-_Properties#buffer_zone buffer_zone], [wiki:GUI_-_Properties#caption caption], [wiki:GUI_-_Properties#cell_id cell_id], [wiki:GUI_-_Properties#font font], [wiki:GUI_-_Properties#sprite sprite], [wiki:GUI_-_Properties#sprite_over sprite_over], [wiki:GUI_-_Properties#sprite_pressed sprite_pressed], [wiki:GUI_-_Properties#sprite_disabled sprite_disabled], [wiki:GUI_-_Properties#text_align text_align], [wiki:GUI_-_Properties#text_valign text_valign], [wiki:GUI_-_Properties#textcolor textcolor], [wiki:GUI_-_Properties#textcolor_over textcolor_over], [wiki:GUI_-_Properties#textcolor_pressed textcolor_pressed], [wiki:GUI_-_Properties#textcolor_disabled textcolor_disabled], [wiki:GUI_-_Properties#tooltip tooltip], [wiki:GUI_-_Properties#tooltip_style tooltip_style]|[wiki:GUI_-_Actions#Press Press]}}
     1{{Template:GUI_Object|button| [wiki:GUI_-_Properties#buffer_zone buffer_zone], [wiki:GUI_-_Properties#caption caption], [wiki:GUI_-_Properties#cell_id cell_id], [wiki:GUI_-_Properties#font font], [wiki:GUI_-_Properties#sprite sprite], [wiki:GUI_-_Properties#sprite_over sprite_over], [wiki:GUI_-_Properties#sprite_pressed sprite_pressed], [wiki:GUI_-_Properties#sprite_disabled sprite_disabled], [wiki:GUI_-_Properties#text_align text_align], [wiki:GUI_-_Properties#text_valign text_valign], [wiki:GUI_-_Properties#textcolor textcolor], [wiki:GUI_-_Properties#textcolor_over textcolor_over], [wiki:GUI_-_Properties#textcolor_pressed textcolor_pressed], [wiki:GUI_-_Properties#textcolor_disabled textcolor_disabled], [wiki:GUI_-_Properties#tooltip tooltip], [wiki:GUI_-_Properties#tooltip_style tooltip_style]|[wiki:GUI_-_Actions#Press Press]}}
     2
     3= Button =
    24
    35A button consists of a sprite filling all of its size and text that can be placed in any alignment. When hovered, pressed or disabled, both the sprite and the text colour can be changed.
    46
    5 [wiki:Image:gui-object-button.png]
     7[[Image(gui-object-button.png, nolink)]]
    68
    79The left button has got both ''text_align'' and ''text_valign'' set to "center", this means ''buffer_zone'' is completely unused.
    810
    9 The buttons work as in Windows, you can press it, but the action isn't committed until the button is released.
     11The press event is called as soon as the left mouse button is pressed down.
    1012
     13== Examples ==
    1114'''''Code of example buttons:'''''
    1215
    1316{{{
     17#!xml
    1418  <object type="button"
    1519          name="The_one_to_the_left"
     
    2125          font="verdana12"
    2226          textcolor="0 0 0"
    23           textcolor_pressed="255 255 255"
    24   >Centered
    25           <action on="Press"><![CDATA[
    26          
    27           ]]></action>
     27          textcolor_pressed="255 255 255">
     28          Centered
     29          <action on="Press"><![CDATA[ doSomething(); ]]></action>
    2830  </object>
    2931 
     
    3840          font="verdana12"
    3941          textcolor="0 0 0"
    40           textcolor_pressed="255 255 255"
    41   >Press
    42           <action on="Press"><![CDATA[
    43          
    44           ]]></action>
     42          textcolor_pressed="255 255 255">
     43          Press
     44          <action on="Press"><![CDATA[ doSomething(); ]]></action>
    4545  </object>
    4646}}}