![short menu api configuration short menu api configuration](https://docs.virtuemart.net/images/Tutorials/Administration/menus_select.png)
- #Short menu api configuration how to#
- #Short menu api configuration update#
- #Short menu api configuration code#
- #Short menu api configuration windows#
![short menu api configuration short menu api configuration](https://developers.marketo.com/wp-content/uploads/2016/06/GeoCode.png)
We are going to need to parse shortcuts string efficiently.So this tester could list the keys and make sure you can input them.)
#Short menu api configuration code#
Unfortunately I didn't add those initially, my bad :( (Been thinking about adding a "Tester" to the demo code that helps you verify your ImGui integration, test things like clipping rectangle, texture changes, all sort of inputs.
![short menu api configuration short menu api configuration](https://metamug.com/article/images/api-integration/jira-custom-field-1.png)
If you can do a test let me know which version of GLFW you are using.
![short menu api configuration short menu api configuration](https://docs.broadsign.com/broadsign-direct/Resources/Images/sf-config-custom-settings-setup.png)
#Short menu api configuration how to#
See following rely for instructions on how to perform the test. I'd be curious to know whether GLFW 3.1 gives you character inputs in ImGui_ImplGlfw_CharCallback when ALT or CTRL are pressed on MacOS, Linux, etc. Or user can freely do their own cheap conversions if they don't care about funky localisation things. GLFW has been patched in the 3.1 branch to support the ALT key but not the CTRL key yet (would be nice if it does so), what that means is that support for those inputs won't be widespread in most applications soon and it is only likely to be widely available in GLFW when 3.2 ships (also means that support for CTRL key would better be pushed in GLFW before they release 3.2!).
#Short menu api configuration windows#
For Windows messages user can copy demo code if they are pointed to it. End-user would need a similar mechanism which is rather annoying. It is a little scary but appears to work. Keys = (GetKeyState(VK_SHIFT) & 0x8000) ? 0x80 : 0 Ĭonst int scancode = (lParam > 16) & 0x1ff Ĭonst int buf_sz = ToUnicodeEx(wParam, scancode, keys, buf, 4, 0, NULL) By adding this in a Windows message handler I seem to be able to retrieve those characters. No CHAR messages are sent when CTRL is pressed. WM_SYSCHAR is only sent when ALT is pressed. The WM_CHAR message isn't sent when ALT or CTRL are pressed. However, and that's very surprising, retrieve this information under Windows is NOT straightforward. So the end-user application needs to feed those inputs probably via io.AddInputCharacter() and this isn't really a problem for ImGui to solve. We are going to need translated characters, aka the "A" in "CTRL+A" or "ALT+A" is a translated character. PART A, for regular shortcuts (typically global shortcuts, but they can be local to a window)
#Short menu api configuration update#
Unfortunately some of those will need the user to update their ImGui integration to provide the necessary inputs, but there won't be any breakage. So here is a rough list of what I think we need. The user should also be able to display the label for a shortcut in the menu without letting ImGui handle the shortcut itself. The scope of shortcuts can be dependent on factor such as if the parent window is focused so they aren't always "global". In its "closed" state, the system has to be as lightweight as if the user were testing a bunch of shortcuts themselves. In particular, procedurally generated menus that may have infinite depth will need to be able to disable the global shortcut scheme. The shortcut scheme can be disabled on a per-menu/window/global basis. The way it would work is that when a global shortcut scheme is activated, the menu functions always notify the user code to develop its content so ImGui can parse and execute the shortcuts as they are declared, but the actual menu is not layed out nor rendered. So the program can have a single entry point for "Save" whether it is activated via clicking in the menu or via pressing the shortcut. It will be optional but likely available by default. As a design goal of ImGui we want to avoid code and state duplication, so I'd like the ImGui system to handle shortcuts for the user. Support local keyboard shortcuts, We can use Windows syntax of using & (e.g. In the old Menus API #126 thread I said we'd need Consider that MenuItem() can takes both a "checked" and "enabled" parameter which may need to be fetch/computed from your application state, duplicating that code can be pretty annoying and ImGui strive to reduce redundancy so it's quite a flaw to have to do that. Without shortcuts the user is required to duplicate code to handle menu items and shortcuts for a same action. I have started using menus more extensively in my own applications, and the lack of support for shortcuts has become a little annoying. Writing down notes about implementing a shortcut system.