New MaxGUI Menu Behaviour
BlitzMax Forums/MaxGUI Module/New MaxGUI Menu Behaviour
| ||
Have just updated MaxGUI via SVN for the first time and was wondering whether any changes were made to CreateMenu in the new version? When compiled, all my menus now display in the menu bar as "Alt+F Alt+E" etc. instead of "File Edit" etc. while clicking on them displays only separator menu items (I have not altered the source and they worked fine before the upgrade). I can't see anything immediately obvious, and haven't had any success searching on the forums - any info or help on what I'm doing wrong would be great! |
| ||
Do you use by chance the WindowMenu:TGadget( window:TGadget ) command on submenues? The behavoir has changed a bit May post your code. EDIT: When using Logic Gui load the old form and re-create the source with Version 3.1 |
| ||
I do. I'm a bit new to MaxGUI, but create all my menus that way:wndMain_mnuFile=CreateMenu("File",100,WindowMenu(wndMain:TGadget),KEY_F,MODIFIER_ALT) wndMain_mnuNew=CreateMenu("New",101,WindowMenu(wndMain_mnuFile:TGadget),KEY_N,MODIFIER_CONTROL) wndMain_mnuLoad=CreateMenu("Load",102,WindowMenu(wndMain_mnuFile:TGadget),KEY_L,MODIFIER_CONTROL) wndMain_mnuSaveAs=CreateMenu("Save As...",103,WindowMenu(wndMain_mnuFile:TGadget),KEY_S,MODIFIER_CONTROL) CreateMenu("",0,wndMain_mnuFile) wndMain_mnuQuit=CreateMenu("Quit",104,WindowMenu(wndMain_mnuFile:TGadget),KEY_Q,MODIFIER_CONTROL) Is this bad practice? [edit] Ok - will do that in Logic GUI - thanks jsp [edit] Yep - that did it - thanks again! In case it helps anyone having a similar problem, the working code looks like this: wndMain_mnuFile=CreateMenu("File",100,WindowMenu(wndMain:TGadget)) wndMain_mnuNew=CreateMenu("New",101,wndMain_mnuFile:TGadget,KEY_N,MODIFIER_CONTROL) wndMain_mnuLoad=CreateMenu("Load",102,wndMain_mnuFile:TGadget,KEY_L,MODIFIER_CONTROL) wndMain_mnuSaveAs=CreateMenu("Save As...",103,wndMain_mnuFile:TGadget,KEY_S,MODIFIER_CONTROL) CreateMenu("",0,wndMain_mnuFile) wndMain_mnuQuit=CreateMenu("Quit",104,wndMain_mnuFile:TGadget,KEY_Q,MODIFIER_CONTROL) |
| ||
It wasn't till the update and made things quite easy, but now the WindowMenu command can only be used for root menus. See also the edit in my first post. |
| ||
but now the WindowMenu command can only be used for root menus. As it was intended... ;-) |