-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot tab between fields in editor #758
Comments
This appears to be a limitation of the way the DLL is integrating with the emulator, and the way windows handles tabbing between fields. In order to process a TAB as a move-to-the-next-field message, the message loop in the emulator must call While it could be possible to provide a function for the client to call inside it's message loop so we could call |
A possible alternative is to subclass each of the input controls on an editor window and add code to handle the WM_KEYDOWN for VK_TAB that issues a WM_NEXTDLGCTL message. My attempts to implement a solution in this regard did move focus between fields, but the controls still generated the "ding" sound suggesting that they didn't support that key. While not an exact replacement for |
IsDialogMessage ends up producing an interesting problem here. That filters out some messages sent to the controls, such as Enter and Tab events. This a bit bad for the code notes editor as that ends up not able to enter in code notes and tabbing doesn't work as expected. There's other cases where this produces undesirable results. This can be avoided however, by simply responding to the WM_GETDLGCODE message sent: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-isdialogmessagew#remarks https://learn.microsoft.com/en-us/windows/win32/dlgbox/wm-getdlgcode BizHawk's WIP implementation actually does IsDialogMessage for message pumping RA's windows (this is buried in WinForm's message pumping code, not really controllable). So tabbing between fields does work, but it leads to the issues described above due to WM_GETDLGCODE not being properly responded to. |
Seems that while WM_GETDLGCODE is a "solution," it's not really the proper one (well, not in all cases). These issues ultimately seem to just come from improperly created dialogs. For example here: RAIntegration/src/RA_Shared.rc Line 61 in 73140a3
For Enter to be processed as a line break, ES_WANTRETURN needs to be set. Since this was not set, Enter does not have any effect when IsDialogMessage is used.
Although unfortunately in the case of tabbing, it seems WM_GETDLGCODE is the only solution (and that also requires subclassing the dialog in order to actually respond to it). |
As a developer, I expect to be able to tab between fields in an editor. In particular, from the title to the description and points fields in the achievement editor.
The text was updated successfully, but these errors were encountered: