FAQ  •  Register  •  Login

Showing Custom XML Menu

Moderator: MiRai

<<

Redsumm

Posts: 14

Joined: Wed Mar 03, 2021 11:41 pm

Post Sat Mar 06, 2021 9:53 pm

Showing Custom XML Menu

I am trying to create a custom XML menu. However, I am having difficulty just getting the menu to show.


I created a really simple Custom XML consisting of a simplified version of http://www.lavishsoft.com/wiki/index.ph ... _XML_Files.
Here is the XML: https://pastebin.com/raw/pDE6kHPy.

I added a new Menu called EQ Action Menu. Under Menu Templates, I added EQ Action with a XML Layout Style, filename at location, and XML Element "EQ Action Menu". On the EQ Action Menu (left panel), I selected the EQ Action as the menu template.

I created a simple button set with one button and just set the background and text. On the EQ Action Menu (left panel), I selected this button set.

I added the menu to my character set.

I have a Mapped Key for showing/hiding certain VFX windows (consisting of two steps for showing/hiding). I added a Menu State Action to each step, one for loading and the other unloading "EQ Action Menu".

When I switch to my character, there is no menu and using my mapped key for the VFX windows does not result in the menu showing.
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4295

Joined: Sat Feb 15, 2014 11:14 am

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

Post Sun Mar 07, 2021 8:29 am

Re: Showing Custom XML Menu

The buttons themselves need to be housed in a container element with the name of buttons.

So, you could try <TabControl name='buttons'>

Not 100% that will work. Because the UI itself is generally handled by the menu system, I've not tried using a Tab Control. Usually I throw the buttons into a Frame, and be done with it. Which is pretty much how the standard menu system works.
<<

Redsumm

Posts: 14

Joined: Wed Mar 03, 2021 11:41 pm

Post Sun Mar 07, 2021 9:39 pm

Re: Showing Custom XML Menu

Removing TabControls did not fix it.

Is there a way to see where the XML parse is failing?

I made my previous XML far more simple and it would not work. Then I pulled a custom XML template from viewtopic.php?f=44&t=3951.

My XML does not load, but Lax's does.
Why?

My XML
Code:
<ISUI>
   <Window Name='EQ Action Menu'>
      <Width>392</Width>
      <Height>225</Height>
      <BackgroundColor>00000000</BackgroundColor>
      <Visible>1</Visible>
      <Border>0</Border>
      <Children>
         <Frame Name='buttons'>
            <Width>100%</Width>
            <Height>100%<Height>
            <BackgroundColor>ff333333</BackgroundColor>
            <Children>
               <Button Name='btn1'>
                  <X>5</X>
                  <Y>5</Y>
                  <Width>64</Width>
                  <Height>48</Height>
                  <Border>1</Border>
                  <BackgroundColor>ff000000</BackgroundColor>
                  <BorderColor>ffffffff</BorderColor>
                  <Font Template='button.Font'>
                     <Color>ffffffff</Color>
                  </Font>
                  <Text>Test</Text>
                  <Texture/>
                  <TexturePressed/>
                  <TextureHover/>
                  <OnMouseEnter>noop ${MenuMan:OnMenuButtonState["${This.GetMetadata[menu].Escape}","${This.GetMetadata[menu_button].Escape}","Enter"]}</OnMouseEnter>
                  <OnMouseExit>noop ${MenuMan:OnMenuButtonState["${This.GetMetadata[menu].Escape}","${This.GetMetadata[menu_button].Escape}","Exit"]}</OnMouseExit>
                  <OnLeftDown>noop ${MenuMan:OnMenuButtonState["${This.GetMetadata[menu].Escape}","${This.GetMetadata[menu_button].Escape}","Press",Mouse1]}</OnLeftDown>
                  <OnLeftClick>noop ${MenuMan:OnMenuButtonState["${This.GetMetadata[menu].Escape}","${This.GetMetadata[menu_button].Escape}","Release",Mouse1]}</OnLeftClick>
               </Button>
            </Children>
         </Frame>
      </Children>
   </Window>
</ISUI>


Lax's XML
Code:
<ISUI>
   <Window Name='EQ Action Menu'> <!-- Also used as the Element name in ISBoxer -->
      <Width>392</Width>
      <Height>225</Height>
<!--      <Title>${This.GetMetadata[menu].Escape}</Title>  -->
      <BackgroundColor>00000000</BackgroundColor>
<!--      <Alpha>1.0</Alpha>   -->
      <Visible>1</Visible>
      <Border>0</Border>
         
         <Children>
            <Frame Name='buttons'>
               <Width>100%</Width>
               <Height>100%</Height>
               <BackgroundColor>ff333333</BackgroundColor>


            <Children>
               <Button Name='btn1'>
                  <X>3</X>
                  <Y>3</Y>
                  <Width>64</Width>
                  <Height>48</Height>
                  <Border>1</Border>
                  <BackgroundColor>FF000000</BackgroundColor>
                  <BorderColor>FFFFFFFF</BorderColor>
                  <Font Template='button.Font'>
                     <Color>FFFFFFFF</Color>
                  </Font>
                  <Text>G1</Text>
                  <Texture/>
                  <TexturePressed/>
                  <TextureHover/>
                  <OnMouseEnter>noop ${MenuMan:OnMenuButtonState["${This.GetMetadata[menu].Escape}","${This.GetMetadata[menu_button].Escape}","Enter"]}</OnMouseEnter>
                  <OnMouseExit>noop ${MenuMan:OnMenuButtonState["${This.GetMetadata[menu].Escape}","${This.GetMetadata[menu_button].Escape}","Exit"]}</OnMouseExit>
                  <OnLeftDown>noop ${MenuMan:OnMenuButtonState["${This.GetMetadata[menu].Escape}","${This.GetMetadata[menu_button].Escape}","Press",Mouse1]}</OnLeftDown>
                  <OnLeftClick>noop ${MenuMan:OnMenuButtonState["${This.GetMetadata[menu].Escape}","${This.GetMetadata[menu_button].Escape}","Release",Mouse1]}</OnLeftClick>
               </Button>
            </Children>
            </Frame>
         </Children>
   </Window>
</ISUI>
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4295

Joined: Sat Feb 15, 2014 11:14 am

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

Post Sun Mar 07, 2021 11:53 pm

Re: Showing Custom XML Menu

Your XML is not valid.

Specifically, your Height tag for the Frame is not closed properly.

Image

I found it with a text compare, but also Notepad++ XMLTools plugin pick it up if you do a Check XML Syntax and a pretty print wont align nicely which also indicates a non closed tag.
<<

Redsumm

Posts: 14

Joined: Wed Mar 03, 2021 11:41 pm

Post Mon Mar 08, 2021 1:36 am

Re: Showing Custom XML Menu

Thank you! I did not know about the XML plugin. I was beating my head against this for a while.
<<

Redsumm

Posts: 14

Joined: Wed Mar 03, 2021 11:41 pm

Post Mon Mar 08, 2021 2:32 am

Re: Showing Custom XML Menu

It also solved my earlier problem. I was able to put the tabcontrols back in and the menu shows. Thanks bob!
<<

Xukil

Posts: 34

Joined: Tue Feb 07, 2017 9:02 am

Post Thu Mar 18, 2021 11:58 am

Re: Showing Custom XML Menu

I edit XML files with the free version of visual studio. It shows un-closed tags and errors. You can also make a blank project and add files to it if you have a lot going on. I keep a couple of everquest UI's up to date and there are dozens of .xml files. Keeps it all strait for me and I can search the whole project instead of going file by file.

Just a suggestion. :eek:

Return to Menus

Who is online

Users browsing this forum: No registered users and 1 guest