Hi,
I was working on button-shortcuts for menu actions.
Like closing a menu or taking all items from a container.
I got very well so far but now I've a problem with the closing of dialogues:
Begin MenuMode 1009Set MenuButtonClicked to GetControl 15if (OnKeyDown MenuButtonClicked) Set KeyWasDown to 1 endifif KeyWasDown && IsKeyPressed3 MenuButtonClicked == 0 Set KeyWasDown to 0 ClickMenuButton "#3" 1009endif End
This leads to the following result:
The dialogue with the NPC is closing even if the closing button is not visible yet.
Begin MenuMode 1009Set MenuButtonClicked to GetControl 15if (OnKeyDown MenuButtonClicked) Set KeyWasDown to 1 endifif KeyWasDown && IsKeyPressed3 MenuButtonClicked == 0 Set KeyWasDown to 0 If ((GetMenuFloatValue "dialog_topics\visible" 1009) == 2) ClickMenuButton "#3" 1009 Endifendif End
I tried a bit around and with this code the click of the menu button is only handled when the greetings message is over at least.
But still, even if there is NO "dialog_goodbye" button visible the complete dialogue ends if the menu button is pressed.
Is there any way to ask the visible status of the button?
Cheers
EDIT:
Well I ran into another problem...
If the barter menu is closed with the menu button the whole dialogue is closing too.
So I will stay with dialogues which are only closeable by click on the button with the mouse.