CreateMenu() bug with KEY_NUMx hotkeys?

Started by chalky, July 30, 2024, 12:32:26

Previous topic - Next topic

chalky

I am trying to create a menu which uses KEY_NUM0 with CTRL via the following:

CreateMenu("Menu",0,wHnd,KEY_NUM0,MODIFIER_COMMAND)
The resulting menu responds correctly to KEY_NUM0 and CTRL, but displays the text:

Menu    Ctrl+Num 1
instead of:

Menu    Ctrl+Num 0
In fact, ALL the KEY_NUMx values result in the wrong digit in the menu text (i.e. KEY_NUM9 -> Num 10 etc.).

I have tried looking in the MaxGUI code to see what's wrong and found calls to SetHotKey & SetHotKeyEvent, but cannot find where the actual hotkey text is generated.

Can anyone help?

Midimaster

Thank you for reporting this. I can verify the bug.

I started now an ISSUE at discord and Github. Please expect one of the next updates. (see Release on BlitzMax Discord Channel)

Discord-Discussion:
https://discord.com/channels/613699895139762176/679291789840089108


Github-Issue:
https://github.com/bmx-ng/maxgui.mod/issues/74
...back from North Pole.

Derron

I pushed a PullRequest to fix this issue.
The issue existed in "vanilla" already ... some copy-paste-missed-to-adjust-thing :D


bye
Ron 

Midimaster

It looks like the bug is now fixed.
Derron wrote a solution, and Brucey already confirmed it.

Thanks to @Derron

It will be updated with the next release at 2024/08/04

In 5 days you will find it here:

https://github.com/bmx-ng/bmx-ng/releases

...back from North Pole.

chalky

#4
Wow - how amazingly fast was that?! Thanks all. :)