I am trying to open a map window from a the right click menu of a game piece using a Global Hotkey. That works fine - but as I have many maps, I am not interested in all those buttons on the toolbar. If I create the map without a button - then the Global Hotkey cannot open the map. This is probably by design - but it would be a nice functionality to have.
As a last resort, I could of course write my own trait for doing that, but then I thought of creating a drop down menu and putting all the Map buttons in the menu. According to the documentation is is a rather simple task - just refer to the exact button text of the buttons you want in the menu. It doesn’t work, however. The buttons stay in the toolbar and the menu button is visible, but empty.
I have tried creating a Multi Action button and putting it in the menu. That works as intended.
I have reached 2 possible conclusions, I guess:
- Not all buttons are buttons
- I have completely misunderstood the documentation and am doing something fundamentally wrong. If this is the case, please enlighten me.
Thanks for your time
I don’t know what you are doing wrong. I currently have, for example, a module with 6 maps that are player hands. The maps all have toolbar buttons to show/hide, and all are in a Toolbar Menu I call “Hide” that has no button text or icon. This functions exactly as I want it to, making all buttons and the Toolbar Menu invisible.
I then have a visible Global Key Command button that targets an invisible piece that sends a player-specific Hotkey that opens the corresponding hand.
This corresponds well with your use case, and you should have no problem doing what you describe.
One thing I will note is that all this sometimes requires the module to be saved, closed, and loaded to work - you won’t see it functioning as expected from the editor itself.
I revisited the problem sometime later. And I couldn’t reproduce it…
I am sure, I had the correct spelling of the button name first time I tried. (I double checked it).
Your suggestion that not reloading the module might be the cause could very well be correct. To be honest, I don’t remember exactly what I did anymore
Thanks for your help.