FAQ  •  Register  •  Login

Menu Buttons and Z-Layers

Moderator: MiRai

<<

firescue17

User avatar

League of Extraordinary Multiboxers

Posts: 584

Joined: Wed Sep 19, 2012 7:37 am

Location: Omaha, NE

Post Mon Sep 30, 2013 5:36 am

Menu Buttons and Z-Layers

In one of the videos, I think it was the one MiRai made, there was reference something to the effect of using Menus to build a custom UI. I've been working on a fancy new menu which incorporates stacked and / or overlapping menu buttons with the same XML coordinates to layer a background image, a transparency layer, a text layer, and a top level clickable layer. The benefit is the ability to represent different button states using New Menu Button actions to change text, icons, and icon background textures / transparencies independently from each other without having to know the state of any of the other layers.

I discovered when clicking a button which is underneath an overlapping button, the clicked button comes to the foreground. I was expecting / anticipating / hoping the button's z-layer would continue to respect it's position in the menu order such that lower numbered buttons would have a z-layer underneath a higher numbered button.

Here's a quick & dirty video showing the parts I have completed. The video ends with the z-layer issue showing; the Druid's repeater button came to the foreground when clicked and is now above the two smaller buttons.

Image
<<

lax

User avatar

Site Admin

Posts: 7301

Joined: Tue Nov 17, 2009 9:32 pm

Post Mon Sep 30, 2013 8:07 am

Re: Menu Buttons and Z-Layers

These buttons are within the same Menu though, right?

I can probably change this behavior, it's generally intended to pull important things to the top but makes sense to only happen to top-level elements (the Menu itself would be pulled on top if it's clicked when behind another Menu)
<<

firescue17

User avatar

League of Extraordinary Multiboxers

Posts: 584

Joined: Wed Sep 19, 2012 7:37 am

Location: Omaha, NE

Post Mon Sep 30, 2013 8:33 am

Re: Menu Buttons and Z-Layers

lax wrote:These buttons are within the same Menu though, right?

Yes, that is correct.

Sample XML
Code:
<Button name='btn7' template='HUD.button.portrait'>
   <X>320</X>
   <Y>16</Y>
   <Texture template='HUD.portrait.dru.disabled' />
</Button>

<Button name='btn15' template='HUD.button.portrait'>
   <X>320</X>
   <Y>16</Y>
</Button>

<Button name='btn24' template='HUD.button.spells.stances.disabled'>
   <X>313</X>
   <Y>12</Y>
</Button>

<Button name='btn33' template='HUD.button.spells.stances.disabled'>
   <X>313</X>
   <Y>40</Y>
</Button>

The whole screenshot is a single Menu. The Druid portion currently consists of 4 buttons. Button 15 covers button 7 completely. It's not possible to click on any portion of button 7, so it always stays at the bottom. Buttons 24 and 33 are the smaller, offset buttons which only overlap in the corners. When I click on button 15, it comes to the foreground above 24 and 33.
<<

lax

User avatar

Site Admin

Posts: 7301

Joined: Tue Nov 17, 2009 9:32 pm

Post Mon Sep 30, 2013 9:11 am

Re: Menu Buttons and Z-Layers

Inner Space build 5921 (now the development build of Inner Space) should now have improved behavior for you. To try it out, right click IS and select Patcher, check "Download development (test) patches" and then close and restart Inner Space to let it patch up.

Let me know. :)
<<

firescue17

User avatar

League of Extraordinary Multiboxers

Posts: 584

Joined: Wed Sep 19, 2012 7:37 am

Location: Omaha, NE

Post Mon Sep 30, 2013 10:24 am

Re: Menu Buttons and Z-Layers

Looks good. Thank you very much!
<<

firescue17

User avatar

League of Extraordinary Multiboxers

Posts: 584

Joined: Wed Sep 19, 2012 7:37 am

Location: Omaha, NE

Post Sat Oct 19, 2013 4:52 pm

Re: Menu Buttons and Z-Layers

Lax: Is this still in the development build only?

I did a fresh install of ISB and am seeing issues again. I am *not* currently on the dev build, but I can switch back over if need be.
<<

Alge

User avatar

League of Extraordinary Multiboxers

Posts: 1223

Joined: Wed Jan 26, 2011 2:17 am

Location: Under the milky way tonight

Post Sat Oct 19, 2013 5:13 pm

Re: Menu Buttons and Z-Layers

Is this still in the development build only?

Yes, the non-dev build is currently 5899, which does not include these changes.

Return to Menus

Who is online

Users browsing this forum: No registered users and 0 guests