FAQ  •  Register  •  Login

Custom XML Menu Button Event Handling

Moderator: MiRai

<<

Redsumm

Posts: 14

Joined: Wed Mar 03, 2021 11:41 pm

Post Fri Mar 12, 2021 10:01 am

Re: Custom XML Menu Button Event Handling

Thanks Bob, I appreciate the second pair of eyes.

I will try out the debugging and in-session consoles to see what information I get.
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4585

Joined: Sat Feb 15, 2014 11:14 am

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

Post Fri Mar 12, 2021 11:12 am

Re: Custom XML Menu Button Event Handling

Try taking the : out of your mapped key name. replace with a - if you want a separator.
<<

Redsumm

Posts: 14

Joined: Wed Mar 03, 2021 11:41 pm

Post Fri Mar 12, 2021 2:07 pm

Re: Custom XML Menu Button Event Handling

I updated the keymaps to replace ":" with "=".

When debugging with both consoles open, the only updates I see (when attempting to activate the menu buttons) are on the ISBoxer Debugging Console.

When I left click on D/M1, I get the desired result: the character targets extended target 1, and uses the macro hotkey 2 for tash/slow. This entry appears in the Console.
debug1.jpg
debug1.jpg (7.48 KiB) Viewed 6637 times


When I press 'z' and left click on D/M1, nothing appears to happen with the character. These two entries appear in the Console:
debug2.jpg
debug2.jpg (15.53 KiB) Viewed 6637 times


Yes, there are two entries for the one attempted action with the 'z' pressed while left clicking once. The below image shows that I tested with no key press and left click and then tested with 'z' pressed while left clicked.
debug3.jpg
debug3.jpg (24.2 KiB) Viewed 6637 times


However, even though it shows both lines, the character does neither keymapped action. Is there a setting I am missing that may be interfering?
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4585

Joined: Sat Feb 15, 2014 11:14 am

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

Post Fri Mar 12, 2021 5:36 pm

Re: Custom XML Menu Button Event Handling

if you have mouse events in your custom XML template, this may be interfering with the default mouse behaviours.
<<

Redsumm

Posts: 14

Joined: Wed Mar 03, 2021 11:41 pm

Post Fri Mar 12, 2021 6:31 pm

Re: Custom XML Menu Button Event Handling

I commented out the event handling in the XML file.
Code:
<ISUI>
   <template name='btnStd'>
      <X>2</X>
      <Y>2</Y>
      <Width>50</Width>
      <Height>26</Height>
      <Border>1</Border>
      <BackgroundColor>ff000000</BackgroundColor>
      <BorderColor>ffffffff</BorderColor>
      <Font Template='button.Font'>
         <Color>ffffffff</Color>
         <Name>palantino linotype</Name>
         <Size>14</Size>
      </Font>
      <Text>D/M1</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>
-->   </template>

   <Window Name='EQ Action Menu'>
      <Width>150</Width>
      <Height>230</Height>
      <BackgroundColor>00000000</BackgroundColor>
      <Visible>1</Visible>
      <Border>0</Border>
      <Children>
         <TabControl Name='buttons'>
            <Width>100%</Width>
            <Height>100%</Height>
            <Tabs>
               <Tab Name='Combat'>
                  <Button Name='btn1' Template='btnStd'>
                     <Text>D/M1</Text>
                  </Button>
                  <Button Name='btn2' Template='btnStd'>
                     <Y>30</Y>
                     <Text>D/M2</Text>
                  </Button>
                  <Button Name='btn3' Template='btnStd'>
                     <Y>58</Y>
                     <Text>D/M3</Text>
                  </Button>
                  <Button Name='btn4' Template='btnStd'>
                     <Y>86</Y>
                     <Text>D/M4</Text>
                  </Button>
                  <Button Name='btn5' Template='btnStd'>
                     <Y>114</Y>
                     <Text>D/M5</Text>
                  </Button>
                  <Button Name='btn6' Template='btnStd'>
                     <Y>142</Y>
                     <Text>D/M6</Text>
                  </Button>
                  <Button Name='btn7' Template='btnStd'>
                     <Y>170</Y>
                     <Text>GAE</Text>
                  </Button>
               </Tab>
               <Tab Name='Utility'>
                  <Button Name='btn8' Template='btnStd'>
                     <X>50</X>
                     <Y>5</Y>
                     <Width>64</Width>
                     <Height>48</Height>
                     <Text>Test</Text>
                  </Button>
               </Tab>
            </Tabs>
         </TabControl>
      </Children>
   </Window>
</ISUI>


The result was the none of the menu buttons worked. I uncommented and got back the left click functionality. Still striking out on the 'z' + left click.
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4585

Joined: Sat Feb 15, 2014 11:14 am

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

Post Sat Mar 13, 2021 5:44 am

Re: Custom XML Menu Button Event Handling

Ok. For my buttons, I've always inherited the template from the base menu button template where I wanted a functional button. e.g.
Note the first line.

So for your btnStd template I'd add in the inheritance.
The other choice, is that you have to put in all the handling operations yourself (i.e. the bits you commented out) - In what I was doing with custom templates it was to make the menu configurable via the toolkit, so to do that, you need the template inheritance.

Code:
<template name='description.button' template='MenuMan.Button'>
      <Width>30</Width>
      <Height>200</Height><Alpha>1.0</Alpha>
      <Border>0</Border>
      <BorderColor>FF646464</BorderColor>
      <Texture/><TexturePressed/><TextureHover/>
      <BackgroundColor>00999999</BackgroundColor>

      <Alignment>Center</Alignment>
      <VerticalAlignment>Center</VerticalAlignment>
      <Wrap>1</Wrap>
      <Font>
         <Name>Tahoma</Name>
         <Size>72</Size>
         <Color>FF870011</Color>
      </Font>

   </template>
<<

Redsumm

Posts: 14

Joined: Wed Mar 03, 2021 11:41 pm

Post Sat Mar 13, 2021 8:52 am

Re: Custom XML Menu Button Event Handling

I updated the XML to inherit MenuMan.Button in my btnStd and removed the event handling.

Code:
<ISUI>
   <template name='btnStd' Template='MenuMan.Button'>
      <X>2</X>
      <Y>2</Y>
      <Width>50</Width>
      <Height>26</Height>
      <Border>1</Border>
      <BackgroundColor>ff000000</BackgroundColor>
      <BorderColor>ffffffff</BorderColor>
      <Font Template='button.Font'>
         <Color>ffffffff</Color>
         <Name>palantino linotype</Name>
         <Size>14</Size>
      </Font>
      <Text>D/M1</Text>
      <Texture/>
      <TexturePressed/>
      <TextureHover/>
   </template>

   <Window Name='EQ Action Menu'>
      <Width>150</Width>
      <Height>230</Height>
      <BackgroundColor>00000000</BackgroundColor>
      <Visible>1</Visible>
      <Border>0</Border>
      <Children>
         <TabControl Name='buttons'>
            <Width>100%</Width>
            <Height>100%</Height>
            <Tabs>
               <Tab Name='Combat'>
                  <Button Name='btn1' Template='btnStd'>
                     <Text>D/M1</Text>
                  </Button>
                  <Button Name='btn2' Template='btnStd'>
                     <Y>30</Y>
                     <Text>D/M2</Text>
                  </Button>
                  <Button Name='btn3' Template='btnStd'>
                     <Y>58</Y>
                     <Text>D/M3</Text>
                  </Button>
                  <Button Name='btn4' Template='btnStd'>
                     <Y>86</Y>
                     <Text>D/M4</Text>
                  </Button>
                  <Button Name='btn5' Template='btnStd'>
                     <Y>114</Y>
                     <Text>D/M5</Text>
                  </Button>
                  <Button Name='btn6' Template='btnStd'>
                     <Y>142</Y>
                     <Text>D/M6</Text>
                  </Button>
                  <Button Name='btn7' Template='btnStd'>
                     <Y>170</Y>
                     <Text>GAE</Text>
                  </Button>
               </Tab>
               <Tab Name='Utility'>
                  <Button Name='btn8' Template='btnStd'>
                     <X>50</X>
                     <Y>5</Y>
                     <Width>64</Width>
                     <Height>48</Height>
                     <Text>Test</Text>
                  </Button>
               </Tab>
            </Tabs>
         </TabControl>
      </Children>
   </Window>
</ISUI>


Result is that the left clicks on 1-7 still work. However, the 'z'+ left click still does not work. In the console, I am getting the same two lines.
debug2.jpg
debug2.jpg (15.53 KiB) Viewed 6616 times
<<

bob

User avatar

League of Extraordinary Multiboxers

Posts: 4585

Joined: Sat Feb 15, 2014 11:14 am

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

Post Sat Mar 13, 2021 11:37 am

Re: Custom XML Menu Button Event Handling

OK. It's a bug. The "no modifers" conditional on the menu button is only excluding CTRL/ALT/SHIFT. Looking at how to fix it.
Previous

Return to Menus

Who is online

Users browsing this forum: No registered users and 0 guests

cron