Initial modern buttons. Lobby/prelobby now only rely on the modern common files.

This was SVN commit r15063.
This commit is contained in:
JoshuaJB 2014-04-29 00:07:27 +00:00
parent c77826e9aa
commit 1e6614918b
18 changed files with 262 additions and 43 deletions

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0edeed1aa4695405cf11de9b674c0c1ae437c1e976add470de5595510d0fbfa7
size 4230

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f5b8f61d67585b37b1757dcb44859080fd110800b2046847c4e49e81e9eecc80
size 8346

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:aa263d5657caf2fd978239bab29f9703317bccf962ce9c475b7fdd281baa4ea5
size 4230

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3bfd378e24cd174ba90aef80819bbd8cf45fab1a232eeb377b0d69bd4777a938
size 390

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d8361cc8ba8b892bcef0e6c71f75a5e3be56f8b925bf92d7afbfa238c1adb5a5
size 654

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ec05f136f4fe38ea74012aa0398cdbba469b30a94bdf4a8effabfa27278d79b
size 390

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6d458d9c0d0a9f9872ec397b644b633d65265432676bac4d769c442da4d9764c
size 390

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7ae64693d5b80b6079984aa9581aa760baa756ef1420568491f59de9cc229b18
size 654

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5171b20276cfa8d3fc37891e89b57bec8d1a092d9a0e74224c1c6671e5c67eb4
size 390

View file

@ -43,7 +43,7 @@
==========================================
-->
<object name="glbWaterMark"
<object name="glbWaterMark"
hidden="true"
hotkey="screenshot.watermark"
z="200"
@ -52,13 +52,13 @@
this.hidden = !this.hidden;
]]></action>
<object name="glbWaterMarkProductLogo"
<object name="glbWaterMarkProductLogo"
type="image"
size="0 100%-88 190 100%"
sprite="watermarkProduct"
/>
<object name="glbWaterMarkCompanyLogo"
<object name="glbWaterMarkCompanyLogo"
type="image"
size="100%-207 100%-28 100% 100%"
sprite="watermarkCompany"

View file

@ -26,4 +26,25 @@
sprite="colour:255 255 255"
textcolor="0 0 0"
/>
==========================================
- COLORS -
==========================================
<color name="black">0 0 0</color>
<color name="white">255 255 255</color>
<color name="red">255 0 0</color>
<color name="blue">0 0 255</color>
<color name="yellow">255 255 0</color>
<color name="gold">237 227 167</color>
<color name="lightgray">243 242 240</color>
<color name="gray">143 142 140</color>
<color name="darkgray">43 42 40</color>
<color name="green">0 200 0</color>
<color name="mustard">191 191 2</color>
<color name="brown">159 98 24</color>
<color name="orange">255 165 0</color>
<color name="darkred">80 0 0</color>
<color name="darkbrown">30 20 10</color>
<color name="transparent">0 0 0 0</color>
</setup>

View file

@ -270,6 +270,151 @@
</sprite>
<!--
==========================================
- Buttons -
==========================================
-->
<sprite name="ModernButtonRed">
<!-- Left -->
<image texture="global/modern/button/red-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
/>
<image texture="global/modern/button/red-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
/>
<image texture="global/modern/button/red-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/red-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/red-unselected-center-center.png"
real_texture_placement="0 0 128 16"
texture_size="0 0 128 16"
size="8 8 100%-8 100%-8"
/>
<image texture="global/modern/button/red-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/red-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/red-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/red-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
/>
</sprite>
<sprite name="ModernButtonRedOver">
<effect add_color="60 42 42 0"/>
<!-- Left -->
<image texture="global/modern/button/red-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
/>
<image texture="global/modern/button/red-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
/>
<image texture="global/modern/button/red-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/red-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/red-unselected-center-center.png"
real_texture_placement="0 0 128 16"
texture_size="0 0 128 16"
size="8 8 100%-8 100%-8"
/>
<image texture="global/modern/button/red-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/red-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/red-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/red-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
/>
</sprite>
<sprite name="ModernButtonRedDisabled">
<effect grayscale=""/>
<!-- Left -->
<image texture="global/modern/button/red-unselected-left-top.png"
real_texture_placement="0 0 8 8"
size="0 0 8 8"
/>
<image texture="global/modern/button/red-unselected-left-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="0 8 8 100%-8"
/>
<image texture="global/modern/button/red-unselected-left-bottom.png"
real_texture_placement="0 0 8 8"
size="0 100%-8 8 100%"
/>
<!-- Center -->
<image texture="global/modern/button/red-unselected-center-top.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 0 100%-8 8"
/>
<image texture="global/modern/button/red-unselected-center-center.png"
real_texture_placement="0 0 128 16"
texture_size="0 0 128 16"
size="8 8 100%-8 100%-8"
/>
<image texture="global/modern/button/red-unselected-center-bottom.png"
real_texture_placement="0 0 128 8"
texture_size="0 0 128 8"
size="8 100%-8 100%-8 100%"
/>
<!-- Right -->
<image texture="global/modern/button/red-unselected-right-top.png"
real_texture_placement="0 0 8 8"
size="100%-8 0 100% 8"
/>
<image texture="global/modern/button/red-unselected-right-center.png"
real_texture_placement="0 0 8 16"
texture_size="0 0 8 16"
size="100%-8 8 100% 100%-8"
/>
<image texture="global/modern/button/red-unselected-right-bottom.png"
real_texture_placement="0 0 8 8"
size="100%-8 100%-8 100% 100%"
/>
</sprite>
<!--
==========================================
- Misc. -
==========================================
-->
@ -320,4 +465,10 @@
texture_size="0 0 24 24"
/>
</sprite>
<sprite name="logo">
<image texture="pregame/shell/logo/0ad_logo.png"
real_texture_placement="0 0 256 128"
size="0 -5% 100% 105%"
/>
</sprite>
</sprites>

View file

@ -1,25 +1,42 @@
<?xml version = "1.0" encoding = "utf-8"?>
<styles>
<style name = "ModernWindow"
<!--
==========================================
- DEFAULT STYLE: The style with the name 'default' is special, it will
- be called by every object before any other style is loaded.
==========================================
-->
<style name="default"
absolute="false"
enabled="true"
ghost="false"
hidden="false"
size="0 0 100% 100%"
z="0"
font="sans-14"
buffer_zone="5"
multiline="false"
/>
<style name = "ModernWindow"
sprite = "ModernWindow"
buffer_zone = "12"
text_align = "left"
text_valign = "top"
/>
<style name = "ModernDialog"
<style name = "ModernDialog"
sprite = "ModernDialog"
buffer_zone = "12"
text_align = "left"
text_valign = "top"
/>
<style name = "ModernPanel"
<style name = "ModernPanel"
sprite = "ModernPanel"
buffer_zone = "12"
text_align = "left"
text_valign = "top"
/>
<style name = "ModernList"
<style name = "ModernList"
buffer_zone = "5"
font = "sans-bold-stroke-14"
scrollbar = "true"
@ -33,7 +50,7 @@
text_valign = "center"
sound_selected = "audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernDropDown"
<style name="ModernDropDown"
dropdown_buffer="1"
font="sans-bold-14"
textcolor="white"
@ -100,7 +117,7 @@
text_align="left"
text_valign="top"
/>
<style name="ModernInput"
<style name="ModernInput"
sprite="ModernDarkBoxWhite"
sprite_selectarea="colour:150 0 0"
textcolor="white"
@ -114,4 +131,15 @@
square_side="22"
sound_pressed="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernButtonRed"
sprite="ModernButtonRed"
sprite_disabled="ModernButtonRedDisabled"
sprite_over="ModernButtonRedOver"
sprite_pressed="ModernButtonRed"
font="sans-bold-stroke-14"
textcolor="white"
text_align="center"
text_valign="center"
sound_pressed="audio/interface/ui/ui_button_click.ogg"
/>
</styles>

View file

@ -10,7 +10,7 @@
<object type="image" style="ModernWindow" size="0 0 100% 100%" name="lobbyWindow">
<object style="TitleText" type="text" size="50%-128 0%+4 50%+128 36">
<object style="ModernLabelText" type="text" size="50%-128 0%+4 50%+128 36">
<translatableAttribute id="caption">Multiplayer Lobby</translatableAttribute>
</object>
@ -34,7 +34,7 @@
</object>
<object name="leftButtonPanel" size="20 100%-45 20% 100%-20">
<object type="button" style="StoneButton" size="0 0 100% 100%">
<object type="button" style="ModernButtonRed" size="0 0 100% 100%">
<translatableAttribute id="caption">Leaderboard</translatableAttribute>
<action on="Press">Engine.GetGUIObjectByName("leaderboard").hidden = false;Engine.GetGUIObjectByName("leaderboardFade").hidden = false;</action>
</object>
@ -43,7 +43,7 @@
<!-- Right panel: Game details. -->
<object name="rightPanel" size="100%-250 30 100%-20 100%-20" >
<object name="gameInfoEmpty" size="0 0 100% 100%-60" type="image" sprite="ModernDarkBoxGold" hidden="false">
<object name="logo" size="50%-110 40 50%+110 140" type="image" sprite="productLogo"/>
<object name="logo" size="50%-110 40 50%+110 140" type="image" sprite="logo"/>
<object name="subjectBox" type="image" sprite="ModernDarkBoxWhite" size="3% 180 97% 99%">
<object name="subject" size="5 5 100%-5 100%-5" type="text" style="ModernText" text_align="center"/>
</object>
@ -98,20 +98,20 @@
<object name="sgPlayersNames" size="0 15% 100% 100%" type="text" style="MapPlayerList"/>
</object>
</object>
<object name="joinGameButton" type="button" style="StoneButton" size="0 100%-85 100% 100%-60" hidden="true">
<object name="joinGameButton" type="button" style="ModernButtonRed" size="0 100%-85 100% 100%-60" hidden="true">
<translatableAttribute id="caption">Join Game</translatableAttribute>
<action on="Press">
joinSelectedGame();
</action>
</object>
<object name="hostButton" type="button" style="StoneButton" size="0 100%-55 100% 100%-30">
<object name="hostButton" type="button" style="ModernButtonRed" size="0 100%-55 100% 100%-30">
<translatableAttribute id="caption">Host Game</translatableAttribute>
<action on="Press">
hostGame();
</action>
</object>
<object type="button" style="StoneButton" size="0 100%-25 100% 100%">
<object type="button" style="ModernButtonRed" size="0 100%-25 100% 100%">
<translatableAttribute id="caption">Main Menu</translatableAttribute>
<action on="Press">
lobbyStop();
@ -193,7 +193,7 @@
<!-- Add a translucent black background to fade out the menu page -->
<object hidden="true" name="leaderboardFade" type="image" z="100" sprite="ModernFade"/>
<object hidden="true" name="leaderboard" type="image" style="ModernDialog" size="50%-224 50%-160 50%+224 50%+160" z="101">
<object style="TitleText" type="text" size="50%-128 0%-16 50%+128 16">
<object style="ModernLabelText" type="text" size="50%-128 0%-16 50%+128 16">
<translatableAttribute id="caption">Leaderboard</translatableAttribute>
</object>
<object name="leaderboardBox"
@ -210,11 +210,11 @@
<translatableAttribute id="heading">Rating</translatableAttribute>
</def>
</object>
<object type="button" style="StoneButton" size="50%+5 100%-45 50%+133 100%-17">
<object type="button" style="ModernButtonRed" size="50%+5 100%-45 50%+133 100%-17">
<translatableAttribute id="caption">Back</translatableAttribute>
<action on="Press">Engine.GetGUIObjectByName("leaderboard").hidden = true;Engine.GetGUIObjectByName("leaderboardFade").hidden = true;</action>
</object>
<object type="button" style="StoneButton" size="50%-133 100%-45 50%-5 100%-17">
<object type="button" style="ModernButtonRed" size="50%-133 100%-45 50%-5 100%-17">
<translatableAttribute id="caption">Update</translatableAttribute>
<action on="Press">Engine.SendGetBoardList();</action>
</object>

View file

@ -20,7 +20,7 @@
</object>
</object>
<object style="TitleText" type="text" size="50%-128 0%-16 50%+128 16">
<object style="ModernLabelText" type="text" size="50%-128 0%-16 50%+128 16">
<translatableAttribute id="caption">Multiplayer Lobby</translatableAttribute>
</object>
@ -63,7 +63,7 @@
</object>
</object>
<object name="feedback" type="text" size="50 150 100%-50 190" style="ModernLabelText" textcolor="red" text_align="center"/>
<object type="button" size="18 100%-45 126 100%-17" style="StoneButton">
<object type="button" size="18 100%-45 126 100%-17" style="ModernButtonRed">
<translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">
if (Engine.GetGUIObjectByName("pageRegister").hidden)
@ -75,7 +75,7 @@
switchRegister();
</action>
</object>
<object name="register" type="button" size="136 100%-45 244 100%-17" style="StoneButton">
<object name="register" type="button" size="136 100%-45 244 100%-17" style="ModernButtonRed">
<translatableAttribute id="caption">Register</translatableAttribute>
<action on="Press">
if (Engine.GetGUIObjectByName("pageRegister").hidden)
@ -86,7 +86,7 @@
lobbyStartRegister()
</action>
</object>
<object name="connect" type="button" size="254 100%-45 100%-18 100%-17" style="StoneButton">
<object name="connect" type="button" size="254 100%-45 100%-18 100%-17" style="ModernButtonRed">
<translatableAttribute id="caption">Connect</translatableAttribute>
<action on="Press">
lobbyStart();

View file

@ -4,11 +4,7 @@
<include>common/modern/sprites.xml</include>
<include>common/modern/setup.xml</include>
<include>common/setup.xml</include>
<include>common/sprite1.xml</include>
<include>common/styles.xml</include>
<include>common/common_sprites.xml</include>
<include>common/common_styles.xml</include>
<include>common/global.xml</include>
<include>lobby/styles.xml</include>
<include>lobby/lobby.xml</include>

View file

@ -4,11 +4,6 @@
<include>common/modern/sprites.xml</include>
<include>common/modern/setup.xml</include>
<include>common/setup.xml</include>
<include>common/sprite1.xml</include>
<include>common/styles.xml</include>
<include>common/common_sprites.xml</include>
<include>common/common_styles.xml</include>
<include>common/global.xml</include>
<include>lobby/prelobby.xml</include>

View file

@ -504,6 +504,18 @@
</object>
<!-- CONTACT METHODS -->
<object type="button"
style="StoneButton"
tooltip_style="pgToolTip"
size="8 100%-108 100%-8 100% -80"
>
<translatableAttribute id="caption">Help with the translation!</translatableAttribute>
<translatableAttribute id="tooltip">Click to open the 0 A.D translate page in your browser.</translatableAttribute>
<action on="Press"><![CDATA[
openURL("http://trac.wildfiregames.com/wiki/Localization");
]]></action>
</object>
<object type="button"
style="StoneButton"
tooltip_style="pgToolTip"
@ -527,17 +539,6 @@
openURL("http://webchat.quakenet.org/?channels=0ad");
]]></action>
</object>
<object type="button"
style="StoneButton"
tooltip_style="pgToolTip"
size="8 100%-108 100%-8 100% -80"
>
<translatableAttribute id="caption">Help with the translation!</translatableAttribute>
<translatableAttribute id="tooltip">Click to open the 0 A.D translate page in your browser.</translatableAttribute>
<action on="Press"><![CDATA[
openURL("http://trac.wildfiregames.com/wiki/Localization");
]]></action>
</object>
<object type="button"
style="StoneButton"