home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 July / maximum-cd-2010-07.iso / DiscContents / wesnoth-1.8-win32.exe / data / gui / default / widget / toggle_button_default.cfg < prev    next >
Encoding:
Text File  |  2009-11-09  |  2.6 KB  |  140 lines

  1. #textdomain wesnoth-lib
  2. ###
  3. ### Definition of the default toggle button.
  4. ### Since for this class 'default' is a bit hard we now use the checkbox as default.
  5. ###
  6.  
  7. #define _GUI_TEXT X_OFFSET FONT_SIZE FONT_COLOUR
  8.     [text]
  9.         x = {X_OFFSET}
  10.         y = {GUI__TEXT_VERTICALLY_CENTRED}
  11.         w = "(if(width < {X_OFFSET}, 0, width - {X_OFFSET}))"
  12.         h =  "(text_height)"
  13.         font_size = {FONT_SIZE}
  14.         colour = {FONT_COLOUR}
  15.         text = "(text)"
  16.     [/text]
  17. #enddef
  18.  
  19. #define _GUI_RESOLUTION RESOLUTION WIDTH HEIGHT EXTRA_WIDTH FONT_SIZE 
  20.     [resolution]
  21.  
  22.         {RESOLUTION}
  23.  
  24.         min_width = {WIDTH}
  25.         min_height = {HEIGHT}
  26.  
  27.         default_width = {WIDTH}
  28.         default_height = {HEIGHT}
  29.  
  30.         max_width = 0
  31.         max_height = {HEIGHT}
  32.  
  33.         text_extra_width = {EXTRA_WIDTH}
  34.         text_font_size = {FONT_SIZE}
  35.  
  36.         [state_enabled]
  37.  
  38.             [draw]
  39.  
  40.                 [image]
  41.                     name = "buttons/checkbox.png"
  42.                 [/image]
  43.  
  44.                 {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) ({GUI__FONT_COLOUR_ENABLED__TITLE}) }
  45.  
  46.             [/draw]
  47.  
  48.         [/state_enabled]
  49.  
  50.         [state_disabled]
  51.  
  52.             [draw]
  53.  
  54.                 [image]
  55.                     name = "buttons/checkbox.png"
  56.                 [/image]
  57.  
  58.                 {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) ({GUI__FONT_COLOUR_DISABLED__TITLE}) }
  59.  
  60.             [/draw]
  61.  
  62.         [/state_disabled]
  63.  
  64.         [state_focussed]
  65.  
  66.             [draw]
  67.  
  68.                 [image]
  69.                     name = "buttons/checkbox-active.png"
  70.                 [/image]
  71.  
  72.                 {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) ({GUI__FONT_COLOUR_ENABLED__TITLE}) }
  73.  
  74.             [/draw]
  75.  
  76.         [/state_focussed]
  77.  
  78. ###
  79. ### Selected
  80. ###
  81.  
  82.         [state_enabled_selected]
  83.  
  84.             [draw]
  85.  
  86.                 [image]
  87.                     name = "buttons/checkbox-pressed.png"
  88.                 [/image]
  89.  
  90.                 {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) ({GUI__FONT_COLOUR_ENABLED__TITLE}) }
  91.  
  92.             [/draw]
  93.  
  94.         [/state_enabled_selected]
  95.  
  96.         [state_disabled_selected]
  97.  
  98.             [draw]
  99.  
  100.                 [image]
  101.                     name = "buttons/checkbox-pressed.png"
  102.                 [/image]
  103.  
  104.                 {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) ({GUI__FONT_COLOUR_DISABLED__TITLE}) }
  105.  
  106.             [/draw]
  107.  
  108.         [/state_disabled_selected]
  109.  
  110.         [state_focussed_selected]
  111.  
  112.             [draw]
  113.  
  114.                 [image]
  115.                     name = "buttons/checkbox-active-pressed.png"
  116.                 [/image]
  117.  
  118.                 {_GUI_TEXT ({EXTRA_WIDTH}) ({FONT_SIZE}) ({GUI__FONT_COLOUR_ENABLED__TITLE}) }
  119.  
  120.             [/draw]
  121.  
  122.         [/state_focussed_selected]
  123.  
  124.     [/resolution]
  125. #enddef    
  126.  
  127. [toggle_button_definition]
  128.  
  129.     id = "default"
  130.     description = "Checkbox."
  131.  
  132.     # Tiny gui sizes haven't been tested yet so might need some tuning.
  133.     {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20 11 14 ({GUI_TINY__FONT_SIZE__SMALL})   }
  134.     {_GUI_RESOLUTION ()                       30 18 25 ({GUI_NORMAL__FONT_SIZE__SMALL}) }
  135.  
  136. [/toggle_button_definition]
  137.  
  138. #undef _GUI_TEXT
  139. #undef _GUI_RESOLUTION
  140.