Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog

War3:Source

Development => Development and Programming Help => Topic started by: M.A.C.A.B.R.A on June 14, 2012, 01:55:01 PM



Title: Creating HelpMenu
Post by: M.A.C.A.B.R.A on June 14, 2012, 01:55:01 PM
Hi. I have a little problem with creating helpmenu in one of my plugins. I would like to create help command which would create a window with usage description but I dont know how to create a menu like this:

(http://i.imgur.com/odOao.jpg)
I know how to create menu and add items to pick, but I don't know how to Write a text like that what I marked.

I want to create just a simple window with only exit button without any other items to pick. Exactly as sm_msay, but visible only to a single player.
What command should I use when I create menu?


Title: Re: Creating HelpMenu
Post by: Revan on June 14, 2012, 02:04:35 PM
just use the title with newlines, so do something like:
Code:
SetMenuTitle(hMenu,"U GOTTA CHECK THIS OUT:\n\im going to pwn\n\n\n\n\lol");

or just use the MENUITEM_DISABLED flag (or similar) when using AddMenuItem


Title: Re: Creating HelpMenu
Post by: M.A.C.A.B.R.A on June 14, 2012, 02:14:52 PM
I tried to do this, but I need to put a function which will receive menu action while creating menu. The only button I want to add is exit button and putting there empty function works but seems to be lame :P
Is there any flag for display only title of menu, which i could use with CreateMenu() command??


Title: Re: Creating HelpMenu
Post by: Revan on June 14, 2012, 02:41:16 PM
So there's no big deal just leave that function callback "empty/default"


Title: Re: Creating HelpMenu
Post by: Necavi on June 15, 2012, 06:26:46 AM
Will the menu handle be properly closed afterwards? That's fine for a static help menu, but if you want it to incorporate ANY non-static information...you need a callback, if only to close the handle.