Raised This Month: $12 Target: $400
 3% 

Can't see the menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-19-2007 , 07:03   Can't see the menu
Reply With Quote #1

I have a menu like this:
Code:
public Handle:Menu_Stats(client)
    {
    new Handle:menu= CreateMenu(MHandler_Options);
    //
    SetMenuTitle(menu, "[Heroes: Source] %t", "HeroesSourceMenu Stats");
    //
    decl String:text[128];
    //
    Format(text, sizeof(text), "%t: %i", "HeroesSourceMenuItem XP", client_xp[client]);
    AddMenuItem(menu, "a", text, ITEMDRAW_RAWLINE);
    //
    new xpfornextlevel= LevelToXP(client_level[client]+1);
    Format(text, sizeof(text), "%t: %i", "HeroesSourceMenuItem XPForNextLevel", xpfornextlevel);
    AddMenuItem(menu, "a", text, ITEMDRAW_RAWLINE);
    //
    Format(text, sizeof(text), "%t: %i", "HeroesSourceMenuItem BankMoney", client_bankmoney[client]);
    AddMenuItem(menu, "a", text, ITEMDRAW_RAWLINE);
    //
    SetMenuExitButton(menu, true);
    //
    return menu;
    }
I can't see this menu! No error log, nothing! I am using r1137 and the menu works if I make "ITEMDRAW_RAWLINE"s "ITEMDRAW_DISABLED".
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-19-2007 , 09:19   Re: Can't see the menu
Reply With Quote #2

You never display the menu? You set the menu exist button the true, then return the handle. What do you do with the handle? If you're trying to remove the item option #1s, I'd suggest a panel rather than a menu.

See Gungame and sm_msay from BaseChats. They use panels to display information like you seem to be after.
__________________
I'm a blast from the past!
ferret is offline
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-19-2007 , 09:34   Re: Can't see the menu
Reply With Quote #3

I tried to use a panel; but I think a panel's returns are different then a menu's returns.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-19-2007 , 11:29   Re: Can't see the menu
Reply With Quote #4

You can not use ITEMDRAW_RAWLINE on menus. You only can use that flag on panels.
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Shaman
Senior Member
Join Date: Dec 2006
Location: Istanbul, Turkey
Old 07-19-2007 , 11:35   Re: Can't see the menu
Reply With Quote #5

But why SourceMod doesn't report anything? I think an error should be logged when ITEMDRAW_RAWLINE used on menus.
__________________
Shaman is offline
Send a message via ICQ to Shaman Send a message via AIM to Shaman Send a message via MSN to Shaman Send a message via Yahoo to Shaman
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 07-19-2007 , 11:38   Re: Can't see the menu
Reply With Quote #6

Quote:
Originally Posted by Shaman View Post
But why SourceMod doesn't report anything? I think an error should be logged when ITEMDRAW_RAWLINE used on menus.
[url=http://bugs.alliedmods.net/?project=5]Bug Reports[url] << Do a feature request
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
BAILOPAN
Join Date: Jan 2004
Old 07-19-2007 , 12:23   Re: Can't see the menu
Reply With Quote #7

It's not a bug, it's moreso missing documentation. The Menu System does not draw customized text. Those draw styles are intended for panels.
__________________
egg
BAILOPAN is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:29.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode