New session dialog style

This was SVN commit r8719.
This commit is contained in:
WhiteTreePaladin 2010-11-28 01:39:31 +00:00
parent 2640f4c346
commit 9837f6207f
22 changed files with 159 additions and 12 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -9,7 +9,7 @@ function toggleDeveloperOverlay()
function openMenuDialog()
{
var menu = getGUIObjectByName("menuDialogPanel");
g_SessionDialog.open("Menu", null, menu, 148, 224, null);
g_SessionDialog.open("Menu", null, menu, 156, 224, null);
}
function openSettingsDialog()

View File

@ -193,23 +193,25 @@
<!-- Session Dialog -->
<!-- ================================ ================================ -->
<object name="sessionDialog"
sprite="genericPanel"
sprite="sessionDialog"
type="image"
size="50%-180 50%-200 50%+180 50%+50"
hidden="true"
z="30"
>
<object name="sessionDialogTitle" size="0 10 100% 36" type="text" style="largeBoldCenteredText">Title</object >
<object name="sessionDialogMessage" size="10 36 100%-10 100%-48" type="text" style="dialogText"/>
<object name="sessionDialogPanel" size="30 40 100%-30 100%-64" type="image"/>
<object name="sessionDialogTitleBar" size="50%-100 -16 50%+100 16" type="image" sprite="sessionDialogTitleBar">
<object name="sessionDialogTitle" size="0 -2 100% 100%" type="text" style="dialogTitleText">Title</object>
</object>
<object name="sessionDialogMessage" size="10 10 100%-10 100%-48" type="text" style="dialogText"/>
<object size="0 100%-48 100% 100%">
<object name="sessionDialogConfirm" size="32 100%-44 144 100%-12" type="button" style="wheatButton">
<object name="sessionDialogConfirm" size="32 100%-64 144 100%-32" type="button" style="wheatButton">
OK
<action on="Press"></action>
</object>
<object name="sessionDialogCancel" size="100%-144 100%-44 100%-32 100%-12" type="button" style="wheatButton">
<object name="sessionDialogCancel" size="100%-144 100%-64 100%-32 100%-32" type="button" style="wheatButton">
Cancel
<action on="Press">g_SessionDialog.close();</action>
</object>

View File

@ -50,6 +50,93 @@
<!-- Panel Backgrounds -->
<!-- ================================ ================================ -->
<sprite name="sessionDialog">
<!-- background -->
<image
texture="global/tile/tile_dark.png"
texture_size="0 0 100% 100%"
size="0 0 100% 100%"
/>
<!-- sides -->
<image
texture="session/border/border-top.png"
texture_size="0 0 128 16"
size="16 0 100%-16 16"
/>
<image
texture="session/border/border-right.png"
texture_size="0 0 16 128"
size="100%-16 16 100% 100%-16"
/>
<image
texture="session/border/border-bottom.png"
texture_size="0 0 128 16"
size="16 100%-16 100%-16 100%"
/>
<image
texture="session/border/border-left.png"
texture_size="0 0 16 128"
size="0 16 16 100%-16"
/>
<!-- corners -->
<image
texture="session/border/border-corner.png"
texture_size="0 0 16 16"
size="100%-16 0 100% 16"
/>
<image
texture="session/border/border-corner.png"
texture_size="0 0 16 16"
size="100%-16 100%-16 100% 100%"
/>
<image
texture="session/border/border-corner.png"
texture_size="0 0 16 16"
size="0 100%-16 16 100%"
/>
<image
texture="session/border/border-corner.png"
texture_size="0 0 16 16"
size="0 0 16 16"
/>
</sprite>
<sprite name="sessionDialogTitleBar">
<image texture="session/titlebar/titlebar_left.png"
real_texture_placement="0 0 64 32"
size="0%+0 0% 64 0%+32"
/>
<image texture="session/titlebar/titlebar_middle.png"
real_texture_placement="0 0 64 32"
size="64 0% 100%-64 0%+32"
/>
<image texture="session/titlebar/titlebar_right.png"
real_texture_placement="0 0 64 32"
size="100%-64 0% 100%+0 0%+32"
/>
</sprite>
<!-- Generic Panel -->
<sprite name="genericPanel">
<image

View File

@ -94,7 +94,14 @@
text_align="right"
text_valign="center"
/>
<style name="dialogTitleText"
font="serif-bold-18"
textcolor="white"
text_align="center"
text_valign="center"
/>
<style name="dialogText"
font="serif-16"
textcolor="white"

View File

@ -28,7 +28,7 @@ SessionDialog.prototype.open = function(title, message, referencedPanel, x, y, c
// set panel reference if applicable
if(referencedPanel)
{
referencedPanel.size = "50%-" + ((x/2)-30) + " 50%-" + ((y/2)-44) + " 50%+" + ((x/2)-30) + " 50%+" + ((y/2)-52);
referencedPanel.size = "50%-" + ((x/2)-30) + " 50%-" + ((y/2)-30) + " 50%+" + ((x/2)-30) + " 50%+" + ((y/2)-72);
referencedPanel.hidden = false;
this.referencedPanel = referencedPanel;
}
@ -45,14 +45,14 @@ SessionDialog.prototype.open = function(title, message, referencedPanel, x, y, c
var confirmButton = getGUIObjectByName("sessionDialogConfirm");
confirmButton.onpress = function() { buttonFunction.call(dialog); };
confirmButton.hidden = false;
confirmButton.size = "32 100%-44 144 100%-12";
getGUIObjectByName("sessionDialogCancel").size = "100%-144 100%-44 100%-32 100%-12";
confirmButton.size = "32 100%-56 144 100%-24";
getGUIObjectByName("sessionDialogCancel").size = "100%-144 100%-56 100%-32 100%-24";
getGUIObjectByName("sessionDialogCancel").caption = "Cancel";
}
else
{
getGUIObjectByName("sessionDialogConfirm").hidden = true;
getGUIObjectByName("sessionDialogCancel").size = "50%-56 100%-44 50%+56 100%-12";
getGUIObjectByName("sessionDialogCancel").size = "50%-56 100%-56 50%+56 100%-24";
getGUIObjectByName("sessionDialogCancel").caption = "Close";
}