FAQ  •  Register  •  Login

Stackable menu's (z value)

Moderator: MiRai

<<

notta

Posts: 6

Joined: Fri May 22, 2015 11:48 am

Post Tue Aug 25, 2020 6:17 am

Stackable menu's (z value)

I know this has been asked because through my searches I have found several posts asking them same question but never really did see an answer. How do you create menu's on top of each other?

For example, I've created a large menu(background) that is a 1x1 menu with a background. I then created a second menu(button menu) with a 5x5 button setup that sits on top of the background menu. I plan on having several more menu's on top of that background menu. When I export the menu's come up exactly the way I want but if I mistakenly click on the background menu the desired top button menu goes behind the background menu. As I said I did some searching and I cannot seem to find any info on setting the z value in Isboxer for each menu. I am familiar with XML so any help would be appreciated.

Thanks.
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4587

Joined: Sat Feb 15, 2014 11:14 am

Location: In the dining room, with the lead pipe.

Post Tue Aug 25, 2020 8:44 am

Re: Stackable menu's (z value)

The only way to do it reliably is to use a custom XML. If they are independant menus though, it won't work. A custom menu is about setting up a single menu of an interesting shape. I use it to layer the buttons so I can load different elements to the layers, and control the size of the hitboxes (which are actually the menu buttons - i.e. the button set).

I've got a few posts around which provide some samples. This one was a quick find.
viewtopic.php?f=44&t=7741

MiRai's guide on making custom templates is a good one.


This is the popup menu slot selector template used in my link above. i.e. the 1 to 6 circle.
Code:
<ISUI>
   
   <template name='norm.button'>
      <Width>96</Width><Height>96</Height><Alpha>1.0</Alpha>
      <Border>0</Border>
      <BorderColor>FF646464</BorderColor>
      <TexturePressed/>
      <TextureHover/>
      <BackgroundColor>00999999</BackgroundColor>
      <OnLoad>
         This:SetLeftClickThru[TRUE]
         This:SetRightClickThru[TRUE]
      </OnLoad>
   </template>
   
   <template name='hover.button' template='norm.button' >
      <OnLoad>
         This:Hide
      </OnLoad>
   </template>
   <Texture>
      
   </Texture>
   <template name='clickarea.button' template='MenuMan.Button'>
      <Width>76</Width><Height>76</Height><Alpha>1.0</Alpha>
      <Border>0</Border>
      <BorderColor>FF646464</BorderColor>
      <Texture/><TexturePressed/><TextureHover/>
      <BackgroundColor>00999999</BackgroundColor>
      <OnRightClick>
         This:LeftClick
      </OnRightClick>
      
      <!--
      /*This.Parent.FindChild[hover.${This.Name.Escape}]:Show
         This.Parent.FindChild[norm.${This.Name.Escape}]:Hide*/ -->
      
      <OnMouseEnter>
         variable string bname
         bname:Set[norm.${This.Name.Escape}]
         echo ${bname.Escape}
         UIElement["${This.Parent.FindChild[${bname.Escape}].ID}"]:SetTexture["&lt;Texture Filename=&apos;Scripts/Lotro/Icons/071348-glossy-waxed-wood-icon-alphanumeric-n1-solid-brighter.png&apos; /&gt;"]
         
      </OnMouseEnter>
      <!-- UIElement["${This.Parent.FindChild[norm.${This.Name.Escape}].UIElementID}"]:SetTexture["<Texture Filename='Scripts/Lotro/Icons/071348-glossy-waxed-wood-icon-alphanumeric-n1-solid.png' />"] -->
      <OnMouseExit>
         This.Parent.FindChild[hover.${This.Name.Escape}]:Hide
         This.Parent.FindChild[norm.${This.Name.Escape}]:Show
      </OnMouseExit>
   </template>
      
   <template name='one.button' template='norm.button'>
      <Texture filename='Scripts/Lotro/Icons/071348-glossy-waxed-wood-icon-alphanumeric-n1-solid.png' />
   </template>
   <template name='hover.one.button' template='hover.button'>
      <Texture filename='Scripts/Lotro/Icons/071348-glossy-waxed-wood-icon-alphanumeric-n1-solid-brighter.png' />
   </template>
   
   <template name='two.button' template='norm.button'>
      <Texture filename='Scripts/Lotro/Icons/071350-glossy-waxed-wood-icon-alphanumeric-n2-solid.png' />
   </template>
   <template name='hover.two.button' template='hover.button'>
      <Texture filename='Scripts/Lotro/Icons/071350-glossy-waxed-wood-icon-alphanumeric-n2-solid-brighter.png' />
   </template>
   
   <template name='three.button' template='norm.button'>
      <Texture filename='Scripts/Lotro/Icons/071351-glossy-waxed-wood-icon-alphanumeric-n3-solid.png' />
   </template>
   <template name='hover.three.button' template='hover.button'>
      <Texture filename='Scripts/Lotro/Icons/071351-glossy-waxed-wood-icon-alphanumeric-n3-solid-brighter.png' />
   </template>
   
   <template name='four.button' template='norm.button'>
      <Texture filename='Scripts/Lotro/Icons/071352-glossy-waxed-wood-icon-alphanumeric-n4-solid.png' />
   </template>
   <template name='hover.four.button' template='hover.button'>
      <Texture filename='Scripts/Lotro/Icons/071352-glossy-waxed-wood-icon-alphanumeric-n4-solid-brighter.png' />
   </template>
   
   <template name='five.button' template='norm.button'>
      <Texture filename='Scripts/Lotro/Icons/071353-glossy-waxed-wood-icon-alphanumeric-n5-solid.png' />
   </template>
   <template name='hover.five.button' template='hover.button'>
      <Texture filename='Scripts/Lotro/Icons/071353-glossy-waxed-wood-icon-alphanumeric-n5-solid-brighter.png' />
   </template>
   
   <template name='six.button' template='norm.button'>
      <Texture filename='Scripts/Lotro/Icons/071354-glossy-waxed-wood-icon-alphanumeric-n6-solid.png' />
   </template>
   <template name='hover.six.button' template='hover.button'>
      <Texture filename='Scripts/Lotro/Icons/071354-glossy-waxed-wood-icon-alphanumeric-n6-solid-brighter.png' />
   </template>
   
   <Window name='SLOT-SELECT'>
      <OnLoad>
         echo ${This.GetMetadata[menu].Escape}
         echo ${UIElement["SlotNumberPopup"].ID}
         ;MenuMan.Menus.Element["SlotNumberPopup"]:CenterOnCursor
         ;Popup:Set[1]
         ;MenuMan.Menus.Element["${menu_name.Escape}"]:StopGUI[
         ;UIElement["SlotNumberPopup"]:CenterOnCursor
         
         MenuMan.Menus.Element["${This.GetMetadata[menu].Escape}"]:HideTitleBar:CenterOnCursor
         
         
      </OnLoad>
      <Width>276</Width><Height>304</Height>  <!-- height needs to include the ISboxer title bar which is 16 pixels -->  <!-- 124 * 12 + 16-->
      <!--<Title>${This.GetMetadata[menu].Escape}</Title> -->
               
      <BackgroundColor />  <!--- This needs to be empty to make the window transparent and click through, i.e. I only want the buttons to respond to clicks, not the surrounding area -->
      <!-- <Texture filename='' />   this is set via ISBoxer now -->
      <Alpha>1.0</Alpha>
      <Visible>1</Visible>
      <Border>0</Border>
      <BorderColor>88FFFFFF</BorderColor>
      <Popup>TRUE</Popup>
      <StorePosition>0</StorePosition>
      <Children>
         <Frame Name='buttons'>
         <Popup>TRUE</Popup>
         
            <BackgroundColor>00000000</BackgroundColor>
            <Border>0</Border>

            <Width>100%</Width><Height>100%</Height>
            <Children>
               
               <Button name='norm.btn1' template='one.button'>-->
                  <X>90</X><Y>0</Y>
               </Button>
               <Button name='hover.btn1' template='hover.one.button'>
                  <X>90</X><Y>0</Y>
               </Button>
               <Button name='btn1' template='clickarea.button'>
                  <X>100</X><Y>10</Y>
               </Button>

               <Button name='norm.btn2' template='two.button'>
                  <X>180</X><Y>48</Y>
               </Button>
               <Button name='hover.btn2' template='hover.two.button'>
                  <X>180</X><Y>48</Y>
               </Button>
               <Button name='btn2' template='clickarea.button'>
                  <X>190</X><Y>58</Y>
               </Button>
               
               <Button name='norm.btn3' template='three.button'>
                  <X>180</X><Y>144</Y>
               </Button>
               <Button name='hover.btn3' template='hover.three.button'>
                  <X>180</X><Y>144</Y>
               </Button>
               <Button name='btn3' template='clickarea.button'>
                  <X>190</X><Y>154</Y>
               </Button>
               
               <Button name='norm.btn4' template='four.button'>
                  <X>90</X><Y>192</Y>
               </Button>
               <Button name='hover.btn4' template='hover.four.button'>
                  <X>90</X><Y>192</Y>
               </Button>
               <Button name='btn4' template='clickarea.button'>
                  <X>100</X><Y>202</Y>
               </Button>
               
               <Button name='norm.btn5' template='five.button'>
                  <X>0</X><Y>144</Y>
               </Button>
               <Button name='hover.btn5' template='hover.five.button'>
                  <X>0</X><Y>144</Y>
               </Button>
               <Button name='btn5' template='clickarea.button'>
                  <X>10</X><Y>154</Y>
               </Button>
               
               <Button name='norm.btn6' template='six.button'>
                  <X>0</X><Y>48</Y>
               </Button>
               <Button name='hover.btn6' template='hover.six.button'>
                  <X>0</X><Y>48</Y>
               </Button>               
               <Button name='btn6' template='clickarea.button'>
                  <X>10</X><Y>58</Y>
               </Button>
               
            </Children>
         </Frame>
      </Children>
   </Window>
</ISUI>
<<

notta

Posts: 6

Joined: Fri May 22, 2015 11:48 am

Post Tue Aug 25, 2020 9:09 am

Re: Stackable menu's (z value)

Thanks for the reply Bob. Yes they way I have it now there are multiple separate menus stacked on top of each other. It seems like it can be done but if you miss click on the background layer the front layers will go behind the background layer. For now I have just created a small menu to load and unload again if that happens. I didn't realize you could create those crazy menu's from the XML file. Mira's example is of a keyboard and not like the crazy layout I'm trying to create. I was picturing that they had to be in a row by column format. Now I see how you can create menu's out of the row by column format. I think you're still going to run into the z value issue, but I'll see what I can do. I found this post and the guy had the same issue.

viewtopic.php?f=44&t=4819

It looks like Lax seemed to have something that would help but didn't really specify how or what. I'll keep fooling with it.
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4587

Joined: Sat Feb 15, 2014 11:14 am

Location: In the dining room, with the lead pipe.

Post Tue Aug 25, 2020 9:21 am

Re: Stackable menu's (z value)

The difference there is that he was talking a single menu with buttons that overlapped and he needed the buttons so they could be updated within the ISBoxer config, even if they were not functional, rather than hardcode things e..g the text to display in the menu template, making it is single use template.

It sounds like you are taking about having multiple different defined menus, and hoping that they will stay in the order originally drawn.
Sounds more like you just need a single menu, and to implement "paging", where you swap the button sets.

Return to Menus

Who is online

Users browsing this forum: No registered users and 0 guests