hide yellow border between main menu and submenu
This was SVN commit r10119.
This commit is contained in:
parent
f2b61d2e56
commit
6146d948ad
@ -105,7 +105,7 @@
|
||||
/>
|
||||
|
||||
<!-- sides -->
|
||||
<image backcolor="230 190 80"
|
||||
<!-- <image backcolor="230 190 80"
|
||||
size="2 0 100%-2 2"
|
||||
/>
|
||||
<image backcolor="230 190 80"
|
||||
@ -116,7 +116,55 @@
|
||||
/>
|
||||
<image backcolor="230 190 80"
|
||||
size="0 0 2 100%"
|
||||
/>-->
|
||||
|
||||
<!-- top -->
|
||||
<image backcolor="230 190 80"
|
||||
size="2 0 100%-2 2"
|
||||
/>
|
||||
|
||||
<!-- bottom -->
|
||||
<image backcolor="230 190 80"
|
||||
size="2 100%-2 100%-2 100%"
|
||||
/>
|
||||
|
||||
<!-- left -->
|
||||
<image backcolor="230 190 80"
|
||||
size="0 0 2 100%"
|
||||
/>
|
||||
</sprite>
|
||||
|
||||
<!-- MainMenuPanelRightBorder -->
|
||||
<sprite name="MainMenuPanelRightBorder">
|
||||
<!-- right -->
|
||||
<image backcolor="230 190 80"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
</sprite>
|
||||
|
||||
<!-- SubmenuPanel -->
|
||||
<sprite name="SubmenuPanel">
|
||||
<image texture="global/tile/stone_background.png"
|
||||
real_texture_placement="28 0 292 264"
|
||||
texture_size="0 0 240 240"
|
||||
/>
|
||||
|
||||
<image texture="pregame/shading/menu_panel_background_shading.png"
|
||||
texture_size="0 0 100% 100%"
|
||||
size="0 0 100% 100%"
|
||||
/>
|
||||
|
||||
<!-- sides -->
|
||||
<image backcolor="230 190 80"
|
||||
size="0 0 100%-2 2"
|
||||
/>
|
||||
<image backcolor="230 190 80"
|
||||
size="100%-2 0 100% 100%"
|
||||
/>
|
||||
<image backcolor="230 190 80"
|
||||
size="0 100%-2 100%-2 100%"
|
||||
/>
|
||||
<!-- no left border here -->
|
||||
</sprite>
|
||||
|
||||
<!-- TranslucentPanel -->
|
||||
|
@ -140,6 +140,13 @@
|
||||
text_valign="top"
|
||||
/>
|
||||
|
||||
<style name="SubmenuPanel"
|
||||
sprite="SubmenuPanel"
|
||||
buffer_zone="10"
|
||||
text_align="left"
|
||||
text_valign="top"
|
||||
/>
|
||||
|
||||
<style name="LargeStonePanelThinBorder"
|
||||
sprite="LargeStonePanelThinBorder"
|
||||
buffer_zone="10"
|
||||
|
@ -100,11 +100,25 @@ function onTick()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const MARGIN = 4;
|
||||
|
||||
// Sizes right border on main menu panel to match the submenu
|
||||
function blendSubmenuIntoMain(topPosition, bottomPosition)
|
||||
{
|
||||
var topSprite = getGUIObjectByName("MainMenuPanelRightBorderTop");
|
||||
topSprite.size = "100%-2 0 100% " + (topPosition + MARGIN);
|
||||
console.write(topSprite.size);
|
||||
|
||||
var bottomSprite = getGUIObjectByName("MainMenuPanelRightBorderBottom");
|
||||
bottomSprite.size = "100%-2 " + (bottomPosition) + " 100% 100%";
|
||||
}
|
||||
|
||||
// Update the submenu
|
||||
function updateSubmenu(newSubmenu, position, buttonHeight, numButtons)
|
||||
{
|
||||
const MARGIN = 4;
|
||||
|
||||
// remove old submenu
|
||||
getGUIObjectByName(currentSubmenu).hidden = true;
|
||||
|
||||
@ -119,6 +133,9 @@ function updateSubmenu(newSubmenu, position, buttonHeight, numButtons)
|
||||
submenu.size = submenu.size.left + " " + top + " " + submenu.size.right + " " + bottom;
|
||||
submenu.hidden = false;
|
||||
|
||||
// Blend in right border of main menu into the left border of the submenu
|
||||
blendSubmenuIntoMain(top, bottom);
|
||||
|
||||
// prepare to hide the submenu when the mouse moves off of the submenu
|
||||
getGUIObjectByName("submenuScreen").hidden = false;
|
||||
}
|
||||
|
@ -152,12 +152,24 @@ Status: $status.
|
||||
- MAIN MENU PANEL
|
||||
==========================================
|
||||
-->
|
||||
<object
|
||||
type="image"
|
||||
<object type="image"
|
||||
style="MainMenuPanel"
|
||||
size="60 -2 300 100%+2"
|
||||
|
||||
>
|
||||
<!-- These are used to make the right side blend in with the submenu -->
|
||||
<object name="MainMenuPanelRightBorderTop"
|
||||
type="image"
|
||||
sprite="MainMenuPanelRightBorder"
|
||||
ghost="true"
|
||||
size="100%-2 0 100% 100%"
|
||||
/>
|
||||
<object name="MainMenuPanelRightBorderBottom"
|
||||
type="image"
|
||||
sprite="MainMenuPanelRightBorder"
|
||||
ghost="true"
|
||||
size="100%-2 0 100% 100%"
|
||||
/>
|
||||
|
||||
<object name="productLogo"
|
||||
type="image"
|
||||
sprite="productLogo"
|
||||
@ -379,19 +391,20 @@ Get involved at: wildfiregames.com/0ad
|
||||
>
|
||||
<!-- hides the submenu when the mouse leaves the mainMenuButtons or submenu -->
|
||||
<action on="MouseEnter">
|
||||
<![CDATA[getGUIObjectByName("submenu").hidden = true;]]>
|
||||
getGUIObjectByName("submenu").hidden = true;
|
||||
getGUIObjectByName("MainMenuPanelRightBorderTop").size = "100%-2 0 100% 100%";
|
||||
</action>
|
||||
|
||||
<!-- submenu -->
|
||||
<object name="submenu"
|
||||
type="image"
|
||||
style="MainMenuPanel"
|
||||
size="298 50%-100 538 50%+100"
|
||||
style="SubmenuPanel"
|
||||
size="300 50%-100 536 50%+100"
|
||||
>
|
||||
<!-- submenuSinglePlayer -->
|
||||
<object name="submenuSinglePlayer"
|
||||
type="image"
|
||||
size="4 4 100%-4 100%-4"
|
||||
size="0 4 100%-4 100%-4"
|
||||
tooltip_style="pgToolTip"
|
||||
tooltip="The 0 A.D. Game Manual."
|
||||
hidden="true"
|
||||
@ -433,7 +446,7 @@ Get involved at: wildfiregames.com/0ad
|
||||
<!-- submenuMultiplayer -->
|
||||
<object name="submenuMultiplayer"
|
||||
type="image"
|
||||
size="4 4 100%-4 100%-4"
|
||||
size="0 4 100%-4 100%-4"
|
||||
tooltip_style="pgToolTip"
|
||||
tooltip="The 0 A.D. Game Manual"
|
||||
hidden="true"
|
||||
@ -475,7 +488,7 @@ Get involved at: wildfiregames.com/0ad
|
||||
<!-- submenuToolsAndOptions -->
|
||||
<object name="submenuToolsAndOptions"
|
||||
type="image"
|
||||
size="4 4 100%-4 100%-4"
|
||||
size="0 4 100%-4 100%-4"
|
||||
tooltip_style="pgToolTip"
|
||||
tooltip="The 0 A.D. Game Manual"
|
||||
hidden="true"
|
||||
|
Loading…
Reference in New Issue
Block a user