mail[Wesnoth-commits] r28970 - /trunk/data/gui/default/widget/toggle_button_default.cfg


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on August 25, 2008 - 17:35:
Author: mordante
Date: Mon Aug 25 17:35:52 2008
New Revision: 28970

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28970&view=rev
Log:
Updated to the new style.

Modified:
    trunk/data/gui/default/widget/toggle_button_default.cfg

Modified: trunk/data/gui/default/widget/toggle_button_default.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/gui/default/widget/toggle_button_default.cfg?rev=28970&r1=28969&r2=28970&view=diff
==============================================================================
--- trunk/data/gui/default/widget/toggle_button_default.cfg (original)
+++ trunk/data/gui/default/widget/toggle_button_default.cfg Mon Aug 25 
17:35:52 2008
@@ -3,36 +3,34 @@
 ### Since for this class 'default' is a bit hard we now use the checkbox as 
default.
 ###
 
-#define TEXT
+#define _GUI_TEXT X_OFFSET FONT_SIZE FONT_COLOUR
        [text]
-               x = 25
-               y = TEXT_V_CENTRE}
-               w = "(width - 23)"
+               x = {X_OFFSET}
+               y = {GUI__TEXT_VERTICALLY_CENTRED}
+               w = "(width - {X_OFFSET})"
                h =  "(text_height)"
-               font_size = {FONT_SIZE_NORMAL__NORMAL}
-               colour = {FONT_COLOUR_ENABLED}
+               font_size = {FONT_SIZE}
+               colour = {FONT_COLOUR}
                text = "(text)"
        [/text]
 #enddef
 
-[toggle_button_definition]
-
-       id = "default"
-       description = "Default button"
-
+#define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT EXTRA_WIDTH FONT_SIZE 
        [resolution]
 
-               min_width = 30
-               min_height = 22
+               {RESOLUTION}
 
-               default_width = 30
-               default_height = 22
+               min_width = {WIDTH}
+               min_height = {HEIGHT}
+
+               default_width = {WIDTH}
+               default_height = {HEIGHT}
 
                max_width = 0
-               max_height = 22
+               max_height = {HEIGHT}
 
-               text_extra_width = 25
-               text_font_size = {FONT_SIZE_NORMAL__NORMAL}
+               text_extra_width = {EXTRA_WIDTH}
+               text_font_size = {FONT_SIZE}
 
                [state_enabled]
                        full_redraw = "true"
@@ -43,7 +41,7 @@
                                        name = "buttons/checkbox.png"
                                [/image]
 
-                               {TEXT}
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_ENABLED__TITLE}) }
 
                        [/draw]
 
@@ -58,7 +56,7 @@
                                        name = "buttons/checkbox.png"
                                [/image]
 
-                               {TEXT}
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_DISABLED__TITLE}) }
 
                        [/draw]
 
@@ -73,7 +71,7 @@
                                        name = "buttons/checkbox-active.png"
                                [/image]
 
-                               {TEXT}
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_ENABLED__TITLE}) }
 
                        [/draw]
 
@@ -92,7 +90,7 @@
                                        name = "buttons/checkbox-pressed.png"
                                [/image]
 
-                               {TEXT}
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_ENABLED__TITLE}) }
 
                        [/draw]
 
@@ -107,7 +105,7 @@
                                        name = "buttons/checkbox-pressed.png"
                                [/image]
 
-                               {TEXT}
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_DISABLED__TITLE}) }
 
                        [/draw]
 
@@ -122,15 +120,25 @@
                                        name = 
"buttons/checkbox-active-pressed.png"
                                [/image]
 
-                               {TEXT}
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_ENABLED__TITLE}) }
 
                        [/draw]
 
                [/state_focussed_selected]
 
        [/resolution]
+#enddef        
+
+[toggle_button_definition]
+
+       id = "default"
+       description = "Checkbox."
+
+       # Tiny gui sizes haven't been tested yet so might need some tuning.
+       {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20 11 14 
({GUI_TINY__FONT_SIZE__SMALL})   }
+       {_GUI_RESOLUTION ()                       30 18 25 
({GUI_NORMAL__FONT_SIZE__SMALL}) }
 
 [/toggle_button_definition]
 
-
-#undef TEXT
+#undef _GUI_TEXT
+#undef _GUI_RESOLUTION




Related Messages


Powered by MHonArc, Updated Mon Aug 25 17:41:22 2008