Changes between Initial Version and Version 1 of GUI_-_Styles

Feb 23, 2008, 4:19:00 AM (12 years ago)



  • GUI_-_Styles

    v1 v1  
     1A style provides the means to create a unified look by creating a set of property values, saving it as a style, and allowing other objects to reference the style as its default. Therefore, multiple buttons could share the same look without having to individually set the property values of each button. (Though they don't all have to be buttons; styles aren't even dependent on type.)
     3Any properties of an object with this style which are not specified override its default value with the values of the new style. Values that are not specified by the object or its style default back to the ''default'' style.
     5The properties used for a style are the same as those available for a normal control (that's the point). The only property that differs is '''name''': This specifies the name of the style, which other objects can specify in their '''style=<stylename>''' property to indicate the control's style.
     7Styles are setup in the ''<styles.xml>'' file.
     10  <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
     12  <!DOCTYPE styles SYSTEM "..\gui.dtd">
     14  <styles>
     15    <!-- Style that will hide the object as new default -->
     16    <style name="style_name1"
     17           hidden="true"
     18    />
     20    <!-- Style that helps us create a nice edit box -->
     21    <style name="editbox_nice"
     22           sprite="sprite1"
     23           font="font1"
     24    />
     25  </styles>