src/gameui/gameui.xml
author Matthias Mann
Fri Feb 03 06:35:38 2012 +0100 (2 days ago)
changeset 260 42064e048ff4
parent 257 d00c2426a444
permissions -rw-r--r--
LoginDemo: added initial keyboard focus, edit fields respond to return key
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!DOCTYPE themes PUBLIC "-//www.matthiasmann.de//TWL-Theme//EN" "http://hg.l33tlabs.org/twl/raw-file/tip/src/de/matthiasmann/twl/theme/theme.dtd">
     3 <themes>
     4     <images file="buttonbackgroundhl.png">
     5         <area name="-button.background.highlight" xywh="*"/>
     6     </images>
     7 
     8     <images file="buttonbackground.png" format="RGBA">
     9         <select name="button.background">
    10             <alias ref="-button.background.highlight" if="armed ^ selected"/>
    11             <area xywh="*"/>
    12         </select>
    13     </images>
    14 
    15     <images file="hbuttonbg.png" format="RGBA">
    16         <area name="-hbutton.background.highlight" xywh="*"/>
    17     </images>
    18 
    19     <images file="hbuttonbgb.png" format="RGBA">
    20         <select name="hbutton.background">
    21             <alias ref="-hbutton.background.highlight" if="armed ^ selected"/>
    22             <area xywh="*"/>
    23         </select>
    24     </images>
    25 
    26     <images file="basher.png" format="RGBA">
    27         <area name="-basher-0" xywh="0,32,32,32"/>
    28 
    29         <animation name="-basher-anim" timeSource="hover">
    30             <frame ref="-basher-0" duration="100"/>
    31             <frames count="11" offsetx="32" duration="100" xywh="32,32,32,32"/>
    32         </animation>
    33 
    34         <select name="button.basher.overlay" center="true">
    35             <alias ref="-basher-anim" if="hover | pressed"/>
    36             <alias ref="-basher-0"/>
    37         </select>
    38     </images>
    39 
    40     <images file="bomber.png" format="RGBA">
    41         <area name="-bomber-0" xywh="0,0,32,32"/>
    42 
    43         <animation name="-bomber-anim" timeSource="hover">
    44             <frame ref="-bomber-0" duration="100"/>
    45             <frames count="11" offsetx="32" duration="100" xywh="32,0,32,32"/>
    46         </animation>
    47 
    48         <select name="button.bomber.overlay" center="true">
    49             <alias ref="-bomber-anim" if="hover | pressed"/>
    50             <alias ref="-bomber-0"/>
    51         </select>
    52     </images>
    53 
    54     <images file="bridger.png" format="RGBA">
    55         <area name="-bridger-0" xywh="0,32,32,32"/>
    56         
    57         <animation name="-bridger-anim" timeSource="hover">
    58             <frame ref="-bridger-0" duration="100"/>
    59             <frames count="11" offsetx="32" duration="100" xywh="32,32,32,32"/>
    60         </animation>
    61 
    62         <select name="button.bridger.overlay" center="true">
    63             <alias ref="-bridger-anim" if="hover | pressed"/>
    64             <alias ref="-bridger-0"/>
    65         </select>
    66     </images>
    67 
    68     <images file="climber.png" format="RGBA">
    69         <area name="-climber-0" xywh="0,32,32,32"/>
    70 
    71         <animation name="-climber-anim" timeSource="hover">
    72             <frame ref="-climber-0" duration="100"/>
    73             <frames count="7" offsetx="32" duration="100" xywh="32,32,32,32"/>
    74         </animation>
    75 
    76         <select name="button.climber.overlay" center="true">
    77             <alias ref="-climber-anim" if="hover | pressed"/>
    78             <alias ref="-climber-0"/>
    79         </select>
    80     </images>
    81 
    82     <images file="miner.png" format="RGBA">
    83         <area name="-miner-0" xywh="0,32,32,32"/>
    84 
    85         <animation name="-miner-anim" timeSource="hover">
    86             <frame ref="-miner-0" duration="100"/>
    87             <frames count="11" offsetx="32" duration="100" xywh="32,32,32,32"/>
    88         </animation>
    89 
    90         <select name="button.miner.overlay" center="true">
    91             <alias ref="-miner-anim" if="hover | pressed"/>
    92             <alias ref="-miner-0"/>
    93         </select>
    94     </images>
    95 
    96     <images file="digger.png" format="RGBA">
    97         <area name="-digger-0" xywh="0,0,32,32"/>
    98 
    99         <animation name="-digger-anim" timeSource="hover">
   100             <frame ref="-digger-0" duration="100"/>
   101             <frames count="13" offsetx="32" duration="100" xywh="32,0,32,32"/>
   102         </animation>
   103 
   104         <select name="button.digger.overlay" center="true">
   105             <alias ref="-digger-anim" if="hover | pressed"/>
   106             <alias ref="-digger-0"/>
   107         </select>
   108     </images>
   109 
   110     <images file="floater.png" format="RGBA">
   111         <area name="-floater-0" xywh="0,0,32,32"/>
   112 
   113         <animation name="-floater-anim" timeSource="hover">
   114             <frame ref="-floater-0" duration="100"/>
   115             <frames count="7" offsetx="32" duration="100" xywh="32,0,32,32"/>
   116         </animation>
   117 
   118         <select name="button.floater.overlay" center="true">
   119             <alias ref="-floater-anim" if="hover | pressed"/>
   120             <alias ref="-floater-0"/>
   121         </select>
   122     </images>
   123 
   124     <images file="blocker.png" format="RGBA">
   125         <area name="-blocker-0" xywh="0,0,32,32"/>
   126 
   127         <animation name="-blocker-anim" timeSource="hover">
   128             <frame ref="-blocker-0" duration="150"/>
   129             <frames count="5" offsetx="32" duration="150" xywh="32,0,32,32"/>
   130         </animation>
   131 
   132         <select name="button.blocker.overlay" center="true">
   133             <alias ref="-blocker-anim" if="hover | pressed"/>
   134             <alias ref="-blocker-0"/>
   135         </select>
   136     </images>
   137 
   138     <images file="pause.png" format="RGBA">
   139         <area name="button.pause.overlay" center="true" xywh="*"/>
   140     </images>
   141 
   142     <images file="armageddon_anim.png" format="RGBA">
   143         <area name="-armageddon-0" xywh="0,0,36,57"/>
   144 
   145         <animation name="-armageddon-anim" timeSource="hover">
   146             <frame ref="-armageddon-0" duration="100"/>
   147             <frames count="13" offsetx="36" duration="100" xywh="36,0,36,57"/>
   148         </animation>
   149 
   150         <select name="button.armageddon.overlay" center="true">
   151             <alias ref="-armageddon-anim" if="hover | pressed"/>
   152             <alias ref="-armageddon-0"/>
   153         </select>
   154     </images>
   155 
   156     <images file="../test/simple.png" format="RGBA">
   157         <area name="-borderG" border="3" xywh="60,0,9,9" splitx="L3,R3" splity="T3,B3"/>
   158         <area name="white" xywh="23,3,1,1"/>
   159     </images>
   160 
   161     <images file="../test/chaos_sphere_blue_800x600.png" format="RGB" filter="linear">
   162         <area name="background-image" xywh="*"/>
   163     </images>
   164     <images file="icon-gold-star-small.png">
   165         <area name="-gold-star" xywh="1,2,32,32"/>
   166         <select name="gold-star">
   167             <alias ref="-gold-star" if="hover"/>
   168             <alias ref="-gold-star" tint="#7F7F7F"/>
   169         </select>
   170     
   171         <alias name="radialpopupmenu.background" ref="white" tint="#803F3F3F"/>
   172     </images>
   173     
   174     <images file="wheel.png">
   175         <area name="wheel.background" xywh="0,0,5,3" splitx="L2,R2" border="2,0"/>
   176         <area name="wheel.overlay" xywh="1,5,1,26"/>
   177         <area name="wheel.selectedOverlay" xywh="5,5,1,26" splity="T1,B1"/>
   178     </images>
   179 
   180 
   181     <fontDef name="normal" filename="../test/font.fnt" color="white">
   182         <fontParam if="error" color="red"/>
   183         <fontParam if="disabled" color="gray"/>
   184         <fontParam if="textSelection" color="blue"/>
   185     </fontDef>
   186     
   187     <fontDef name="wheel" filename="../textarea/bigfont.fnt" color="#000000"/>
   188 
   189     <inputMapDef name="-defaultInputMap">
   190         <action name="selectAll">ctrl A</action>
   191         <action name="cut">ctrl X</action>
   192         <action name="copy">ctrl C</action>
   193         <action name="paste">ctrl V</action>
   194     </inputMapDef>
   195 
   196     <theme name="-defaults">
   197         <param name="background"><image>none</image></param>
   198         <param name="overlay"><image>none</image></param>
   199         <param name="font"><font>normal</font></param>
   200         <param name="textAlignment"><enum type="alignment">left</enum></param>
   201         <param name="minWidth"><int>0</int></param>
   202         <param name="minHeight"><int>0</int></param>
   203         <param name="maxWidth"><int>0</int></param>
   204         <param name="maxHeight"><int>0</int></param>
   205         <param name="inputMap"><inputMap>-defaultInputMap</inputMap></param>
   206     </theme>
   207 
   208     <theme name="button" ref="-defaults" allowWildcard="true">
   209         <param name=""><image>button.*</image></param>
   210         <param name="border"><border>background.border</border></param>
   211         <param name="textAlignment"><enum type="alignment">center</enum></param>
   212     </theme>
   213 
   214     <theme name="hbutton" ref="button" allowWildcard="true">
   215         <param name=""><image>hbutton.*</image></param>
   216         <param name="border"><border>background.border</border></param>
   217     </theme>
   218 
   219     <theme name="label" ref="-defaults" allowWildcard="true">
   220     </theme>
   221 
   222     <theme name="tooltipwindow" ref="-defaults">
   223         <param name="background"><image>-borderG</image></param>
   224         <param name="border"><border>background.border</border></param>
   225         <param name="fadeInTime"><int>0</int></param>
   226         <theme name="label" ref="label">
   227             <param name="font"><fontDef filename="../test/font.fnt" color="black"/></param>
   228         </theme>
   229     </theme>
   230 
   231     <theme name="radialpopupmenu" ref="-defaults">
   232         <theme name="star" ref="-defaults">
   233             <param name="background"><image>gold-star</image></param>
   234         </theme>
   235         <param name="background"><image>radialpopupmenu.background</image></param>
   236         <param name="buttonRadius"><int>16</int></param>
   237         <param name="radius"><int>55</int></param>
   238         <param name="border"><border>5</border></param>
   239     </theme>
   240 
   241     <theme name="wheelwidget" ref="-defaults">
   242         <param name=""><image>wheel.*</image></param>
   243         <param name="border"><border>background.border</border></param>
   244         <theme name="stringitemrenderer" ref="label">
   245             <param name="font"><font>wheel</font></param>
   246         </theme>
   247         <param name="itemHeight"><int>stringitemrenderer.font.lineHeight</int></param>
   248         <param name="visibleItems"><int>4</int></param>
   249     </theme>
   250     
   251     <theme name="gameuidemo" ref="-defaults">
   252         <param name="background"><image>background-image</image></param>
   253         
   254         <theme name="pingu-basher" ref="button">
   255             <param name=""><image>button.basher.*</image></param>
   256             <param name="border"><border>background.border</border></param>
   257             <param name="tooltip"><string>Basher</string></param>
   258         </theme>
   259         <theme name="pingu-bomber" ref="button">
   260             <param name=""><image>button.bomber.*</image></param>
   261             <param name="border"><border>background.border</border></param>
   262             <param name="tooltip"><string>al-Qaida?</string></param>
   263         </theme>
   264         <theme name="pingu-bridger" ref="button">
   265             <param name=""><image>button.bridger.*</image></param>
   266             <param name="border"><border>background.border</border></param>
   267             <param name="tooltip"><string>Bridger</string></param>
   268         </theme>
   269         <theme name="pingu-climber" ref="button">
   270             <param name=""><image>button.climber.*</image></param>
   271             <param name="border"><border>background.border</border></param>
   272             <param name="tooltip"><string>Climber</string></param>
   273         </theme>
   274         <theme name="pingu-floater" ref="button">
   275             <param name=""><image>button.floater.*</image></param>
   276             <param name="border"><border>background.border</border></param>
   277             <param name="tooltip"><string>Floater</string></param>
   278         </theme>
   279         <theme name="pingu-blocker" ref="button">
   280             <param name=""><image>button.blocker.*</image></param>
   281             <param name="border"><border>background.border</border></param>
   282             <param name="tooltip"><string>Blocker</string></param>
   283         </theme>
   284         <theme name="pingu-digger" ref="button">
   285             <param name=""><image>button.digger.*</image></param>
   286             <param name="border"><border>background.border</border></param>
   287             <param name="tooltip"><string>Digger</string></param>
   288         </theme>
   289         <theme name="pingu-miner" ref="button">
   290             <param name=""><image>button.miner.*</image></param>
   291             <param name="border"><border>background.border</border></param>
   292             <param name="tooltip"><string>Miner</string></param>
   293         </theme>
   294         <theme name="pause" ref="hbutton">
   295             <param name=""><image>button.pause.*</image></param>
   296             <param name="border"><border>background.border</border></param>
   297             <param name="tooltip"><string>Pause the game</string></param>
   298         </theme>
   299         <theme name="armageddon" ref="hbutton">
   300             <param name=""><image>button.armageddon.*</image></param>
   301             <param name="border"><border>background.border</border></param>
   302             <param name="tooltip"><string>ARMAGEDDON !!</string></param>
   303         </theme>
   304         <theme name="fpscounter" ref="label"/>
   305         <theme name="" ref="*"/>
   306     </theme>
   307 
   308     <theme name="gameuidemo2" ref="gameuidemo">
   309         <param name="defaultGap"><dimension>5,5</dimension></param>
   310         <param name="smallGap"><dimension>5,5</dimension></param>
   311         <param name="mediumGap"><dimension>10,10</dimension></param>
   312         <param name="largeGap"><dimension>15,15</dimension></param>
   313         <param name="namedGaps"><map>
   314             <param name="actionButtonsLeft"><gap>10</gap></param>
   315             <param name="actionButtonsTop"><gap>40</gap></param>
   316             <param name="gameCtrlRight"><gap>15</gap></param>
   317             <param name="gameCtrlTop"><gap>10</gap></param>
   318             <param name="statusRight"><gap>0</gap></param>
   319             <param name="statusBottom"><gap>0</gap></param>
   320         </map></param>
   321     </theme>
   322 </themes>