Page 2 of 2

Re: Custom XML Menu Button Event Handling

PostPosted: Fri Mar 12, 2021 10:01 am
by Redsumm
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.

Re: Custom XML Menu Button Event Handling

PostPosted: Fri Mar 12, 2021 11:12 am
by bob
Try taking the : out of your mapped key name. replace with a - if you want a separator.

Re: Custom XML Menu Button Event Handling

PostPosted: Fri Mar 12, 2021 2:07 pm
by Redsumm
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 7449 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 7449 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 7449 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?

Re: Custom XML Menu Button Event Handling

PostPosted: Fri Mar 12, 2021 5:36 pm
by bob
if you have mouse events in your custom XML template, this may be interfering with the default mouse behaviours.

Re: Custom XML Menu Button Event Handling

PostPosted: Fri Mar 12, 2021 6:31 pm
by Redsumm
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.

Re: Custom XML Menu Button Event Handling

PostPosted: Sat Mar 13, 2021 5:44 am
by bob
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>

Re: Custom XML Menu Button Event Handling

PostPosted: Sat Mar 13, 2021 8:52 am
by Redsumm
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 7428 times

Re: Custom XML Menu Button Event Handling

PostPosted: Sat Mar 13, 2021 11:37 am
by bob
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.