Jump to content

OBSE ClickMenuButton


Recommended Posts

In my controller mod for Oblivion, I'm attempting the daunting task of replicating the XBox control style. It's working really well, actually, but it's not perfect (you know what I mean). What I'm trying to get working now is the ability to click a menu button with a keyboard key without having to highlight the button with the cursor first. I'm trying to eliminate the need to drag the cursor around anywhere but in the map menu, and I'm close...so close. I'm beginning with the Haggle button in the barter menu. On the XBox, pressing the Y button on the controller opens the barter menu. With the setup I'm using, the Y button on the controller is mapped to the E key on the keyboard. The script so far is as follows:

    If GetActiveMenuMode == 1008
        If OnKeyDown 18 ;E key
;            Set QualifiedName To GetActiveUIComponentFullName
;            Set iCurrentMenuMode To GetActiveMenuMode
;            PrintToConsole "%z", QualifiedName
;            PrintToConsole "%.0f", iCurrentMenuMode
            ClickMenuButton "cont_background\page_layout\cont_contents\cont_button_haggle" 1008
        EndIf
    EndIf

The commented out lines are just used for gathering info in my own testing. It works, but only if the Haggle button is highlighted with the cursor. I'm really unfamiliar with XML (to me, it sort of looks like what you'd be left with if weasels attacked your Scrabble game...but I'm slowly catching on). So, I have two questions;

 

1) What IS the fully qualified name for an un-highlighted Haggle button?

2) How do actually find that info in the xml file? I'm pretty sure it's somewhere in container_menu.xml...

 

Thanks in advance!

Edited by digitaltrucker
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...