mail[Wesnoth-commits] r29112 - /trunk/data/gui/default/widget/toggle_button_icon.cfg


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

Header


Content

Posted by koraq on August 30, 2008 - 17:17:
Author: mordante
Date: Sat Aug 30 17:17:49 2008
New Revision: 29112

URL: http://svn.gna.org/viewcvs/wesnoth?rev=29112&view=rev
Log:
Change the button to use the new macros.

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

Modified: trunk/data/gui/default/widget/toggle_button_icon.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/gui/default/widget/toggle_button_icon.cfg?rev=29112&r1=29111&r2=29112&view=diff
==============================================================================
--- trunk/data/gui/default/widget/toggle_button_icon.cfg (original)
+++ trunk/data/gui/default/widget/toggle_button_icon.cfg Sat Aug 30 17:17:49 
2008
@@ -1,31 +1,32 @@
 ###
 ### Definition of a toggle button with only a changing image.
-### It's used for the editor in the resize grid.
+### It's used for the editor in the resize grid. When needed it can also be
+### extended for usage with other widgets.
 ###
 
-#define ICON
+#define _GUI_ICON SIZE
        [image]
                x = 0
                y = 0
+               width = {SIZE}
+               height = {SIZE}
                name = "(icon)"
        [/image]
 #enddef
 
-[toggle_button_definition]
-
-       id = "icon"
-       description = "This toggle button is meant to be used in the resize 
grid of the editor and only has an icon."
-
+#define _GUI_RESOLUTION RESOLUTION SIZE
        [resolution]
 
-               min_width = 27
-               min_height = 27
+               {RESOLUTION}
 
-               default_width = 27
-               default_height = 27
+               min_width = {SIZE}
+               min_height = {SIZE}
 
-               max_width = 27
-               max_height = 27
+               default_width = {SIZE}
+               default_height = {SIZE}
+
+               max_width = {SIZE}
+               max_height = {SIZE}
 
                text_extra_width = 0
                text_font_size = 0
@@ -35,7 +36,7 @@
 
                        [draw]
 
-                               {ICON}
+                               {_GUI_ICON ({SIZE})}
 
                        [/draw]
 
@@ -46,7 +47,7 @@
 
                        [draw]
 
-                               {ICON}
+                               {_GUI_ICON ({SIZE})}
 
                        [/draw]
 
@@ -57,7 +58,7 @@
 
                        [draw]
 
-                               {ICON}
+                               {_GUI_ICON ({SIZE})}
 
                        [/draw]
 
@@ -72,7 +73,7 @@
 
                        [draw]
 
-                               {ICON}
+                               {_GUI_ICON ({SIZE})}
 
                        [/draw]
 
@@ -83,7 +84,7 @@
 
                        [draw]
 
-                               {ICON}
+                               {_GUI_ICON ({SIZE})}
 
                        [/draw]
 
@@ -94,7 +95,7 @@
 
                        [draw]
 
-                               {ICON}
+                               {_GUI_ICON ({SIZE})}
 
                        [/draw]
 
@@ -102,6 +103,18 @@
 
        [/resolution]
 
+#enddef
+
+[toggle_button_definition]
+
+       id = "icon"
+       description = "This toggle button is meant to be used in the resize 
grid of the editor and only has an icon."
+
+       {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 13 }
+       {_GUI_RESOLUTION ({GUI_NORMAL__RESOLUTION}) 27 } 
+
 [/toggle_button_definition]
 
-#undef ICON
+#undef _GUI_RESOLUTION
+#undef _GUI_ICON
+




Related Messages


Powered by MHonArc, Updated Sat Aug 30 17:21:53 2008