1
0
forked from mirrors/0ad

MessageBox cleanup.

This was SVN commit r16293.
This commit is contained in:
JoshuaJB
2015-02-08 05:48:33 +00:00
parent f9c95b6953
commit 6e37d6698b
3 changed files with 38 additions and 49 deletions
@@ -104,16 +104,16 @@ function init(data)
switch (data.buttonCaptions.length)
{
case 1:
mbButton1Obj.size = "50%-64 100%-76 50%+64 100%-48";
mbButton1Obj.size = "18 100%-46 100%-18 100%-18";
break;
case 2:
mbButton1Obj.size = "50%-144 100%-76 50%-16 100%-48";
mbButton2Obj.size = "50%+16 100%-76 50%+144 100%-48";
mbButton1Obj.size = "18 100%-46 50%-5 100%-18";
mbButton2Obj.size = "50%+5 100%-46 100%-18 100%-18";
break;
case 3:
mbButton1Obj.size = "10% 100%-76 30% 100%-48";
mbButton2Obj.size = "40% 100%-76 60% 100%-48";
mbButton3Obj.size = "70% 100%-76 90% 100%-48";
mbButton1Obj.size = "18 100%-46 33%-5 100%-18";
mbButton2Obj.size = "33%+5 100%-46 66%-5 100%-18";
mbButton3Obj.size = "66%+5 100%-46 100%-18 100%-18";
break;
}
}
+31 -37
View File
@@ -2,46 +2,40 @@
<objects>
<script file="gui/msgbox/msgbox.js"/>
<script file="gui/common/functions_global_object.js"/>
<!-- Fade out the background because it's non-interactable -->
<object sprite="ModernFade" type="image" z="0"/>
<object name="mbLeaveHotkey" hotkey="leave" />
<object>
<object name="mbMain"
<object name="mbMain"
style="ModernDialog"
type="image"
>
<object name="mbTitleBar"
style="TitleText"
type="text"
size="50%-128 -18 50%+128 14"
/>
<object name="mbText"
type="text"
style="ModernLabelText"
size="5% 20% 95% 100%-96"
/>
<object name="mbButton1"
style="StoneButton"
type="button"
hidden="true"
size="40 100%-50 33%-30 100%-20"
/>
<object name="mbButton2"
style="StoneButton"
type="button"
hidden="true"
size="33%+30 100%-50 66%-40 100%-20"
/>
<object name="mbButton3"
style="StoneButton"
type="button"
hidden="true"
size="66%+30 100%-50 100%-40 100%-20"
/>
</object>
>
<object name="mbTitleBar"
style="ModernLabelText"
type="text"
size="50%-128 -18 50%+128 14"
/>
<object name="mbText"
type="text"
style="ModernLabelText"
size="18 18 100%-18 100%-64"
/>
<!-- The size of the following buttons is set dynamically in msgbox.js -->
<object name="mbButton1"
style="ModernButtonRed"
type="button"
hidden="true"
/>
<object name="mbButton2"
style="ModernButtonRed"
type="button"
hidden="true"
/>
<object name="mbButton3"
style="ModernButtonRed"
type="button"
hidden="true"
/>
</object>
</objects>
@@ -4,11 +4,6 @@
<include>common/modern/styles.xml</include>
<include>common/modern/sprites.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>msgbox/msgbox.xml</include>
<include>common/global.xml</include>
</page>