mail[Wesnoth-commits] r28898 - /trunk/data/gui/default/widget/toggle_button_listbox_text_with_icon.cfg


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

Header


Content

Posted by koraq on August 23, 2008 - 22:24:
Author: mordante
Date: Sat Aug 23 22:24:45 2008
New Revision: 28898

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28898&view=rev
Log:
Converted the listbox items with icons to the new format.

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

Modified: 
trunk/data/gui/default/widget/toggle_button_listbox_text_with_icon.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/gui/default/widget/toggle_button_listbox_text_with_icon.cfg?rev=28898&r1=28897&r2=28898&view=diff
==============================================================================
--- trunk/data/gui/default/widget/toggle_button_listbox_text_with_icon.cfg 
(original)
+++ trunk/data/gui/default/widget/toggle_button_listbox_text_with_icon.cfg 
Sat Aug 23 22:24:45 2008
@@ -5,7 +5,7 @@
 ###
 
 # FIXME we should use a background image instead of a filled rect.
-#define RECT BORDER_COLOUR FILL_COLOUR
+#define _GUI_RECT BORDER_COLOUR FILL_COLOUR
        [rectangle]
                x = 0
                y = 0
@@ -17,53 +17,52 @@
        [/rectangle]
 #enddef
 
-#define ICON
+#define _GUI_ICON OFFSET
        [image]
-               x = 4
-               y = 4
+               x = {OFFSET}
+               y = {OFFSET}
                name = "(icon)"
        [/image]
 #enddef
 
-#define TEXT
+#define _GUI_TEXT OFFSET FONT_SIZE FONT_COLOUR
        [text]
-               x = 80
-               y = {TEXT_V_CENTRE}
-               w = "(width - 80)"
+               x = {OFFSET}
+               y = {GUI__TEXT_VERTICALLY_CENTRED}
+               w = "(width - " + {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 = "listbox_text_with_icon"
-       description = "This toggle button is meant to be used in a listbox 
and as list box with only text."
+#define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT EXTRA_WIDTH FONT_SIZE 
ICON_OFFSET
 
        [resolution]
 
-               min_width = 100
-               min_height = 80
+               {RESOLUTION}
 
-               default_width = 100
-               default_height = 80
+               min_width = {WIDTH}
+               min_height = {HEIGHT}
+
+               default_width = {WIDTH}
+               default_height = {HEIGHT}
 
                max_width = 0
-               max_height = 80
+               max_height = {HEIGHT}
 
-               text_extra_width = 80
-               text_font_size = {FONT_SIZE_NORMAL__NORMAL}
+               text_extra_width = {EXTRA_WIDTH}
+               text_font_size = {FONT_SIZE}
 
                [state_enabled]
                        full_redraw = "true"
 
                        [draw]
 
-                               {RECT "" "0, 0, 0, 255"}
-                               {ICON}
-                               {TEXT}
+                               {_GUI_RECT "" "0, 0, 0, 255"}
+                               {_GUI_ICON ({ICON_OFFSET}) }
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_ENABLED__DEFAULT}) }
 
                        [/draw]
 
@@ -74,9 +73,9 @@
 
                        [draw]
 
-                               {RECT "" "128, 128, 128, 255"}
-                               {ICON}
-                               {TEXT}
+                               {_GUI_RECT "" "128, 128, 128, 255"}
+                               {_GUI_ICON ({ICON_OFFSET}) }
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_DISABLED__DEFAULT}) }
 
                        [/draw]
 
@@ -87,9 +86,9 @@
 
                        [draw]
 
-                               {RECT "" "0, 0, 0, 255"}
-                               {ICON}
-                               {TEXT}
+                               {_GUI_RECT "" "0, 0, 0, 255"}
+                               {_GUI_ICON ({ICON_OFFSET}) }
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_ENABLED__DEFAULT}) }
 
                        [/draw]
 
@@ -104,9 +103,9 @@
 
                        [draw]
 
-                               {RECT "170, 136, 67, 255" "9, 33, 54, 255"}
-                               {ICON}
-                               {TEXT}
+                               {_GUI_RECT "170, 136, 67, 255" "9, 33, 54, 
255"}
+                               {_GUI_ICON ({ICON_OFFSET}) }
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_ENABLED__DEFAULT}) }
 
                        [/draw]
 
@@ -117,9 +116,9 @@
 
                        [draw]
 
-                               {RECT "170, 136, 67, 255" "128, 128, 128, 
255"}
-                               {ICON}
-                               {TEXT}
+                               {_GUI_RECT "170, 136, 67, 255" "128, 128, 
128, 255"}
+                               {_GUI_ICON ({ICON_OFFSET}) }
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_DISABLED__DEFAULT}) }
 
                        [/draw]
 
@@ -130,9 +129,9 @@
 
                        [draw]
 
-                               {RECT "170, 136, 67, 255" "9, 33, 54, 255"}
-                               {ICON}
-                               {TEXT}
+                               {_GUI_RECT "170, 136, 67, 255" "9, 33, 54, 
255"}
+                               {_GUI_ICON ({ICON_OFFSET}) }
+                               {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) 
({GUI__FONT_COLOUR_ENABLED__DEFAULT}) }
 
                        [/draw]
 
@@ -140,9 +139,20 @@
 
        [/resolution]
 
+#enddef
+
+[toggle_button_definition]
+       id = "listbox_text_with_icon"
+       description = "This toggle button is meant to be used in a listbox 
and as list box with only text."
+
+       # Tiny gui sizes haven't been tested yet so might need some tuning.
+       {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION})  50 40 40 
({GUI_TINY__FONT_SIZE__DEFAULT})   2 }
+       {_GUI_RESOLUTION ()                       100 80 80 
({GUI_NORMAL__FONT_SIZE__DEFAULT}) 4 }
+
 [/toggle_button_definition]
 
+#undef _GUI_RESOLUTION
+#undef _GUI_TEXT
+#undef _GUI_ICON
+#undef _GUI_RECT
 
-#undef RECT
-#undef ICON
-#undef TEXT




Related Messages


Powered by MHonArc, Updated Sat Aug 23 22:41:43 2008