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

Menu ITEMDRAW_RAWLINE Flag is ignored?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Marcus101RR
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 09-07-2016 , 02:09   Menu ITEMDRAW_RAWLINE Flag is ignored?
Reply With Quote #1

menu.AddItem(CHOICE1, "Choice 1");
menu.AddItem(menu, CHOICE2, "Choice 2", ITEMDRAW_RAWLINE );
menu.AddItem(menu, CHOICE3, "Choice 3");

So apparently "ITEMDRAW_RAWLINE" is suppose to make Choice 2 appear, but have no number:
1. Choice 1
Choice 2
2. Choice 3

Like this, however, it doesn't work. Is this a bug, or are your documentations not up to date?
__________________
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 09-07-2016 , 02:38   Re: Menu ITEMDRAW_RAWLINE Flag is ignored?
Reply With Quote #2

Menu or panel?
__________________
Neuro Toxin is offline
Marcus101RR
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 09-07-2016 , 13:39   Re: Menu ITEMDRAW_RAWLINE Flag is ignored?
Reply With Quote #3

Quote:
Originally Posted by Neuro Toxin View Post
Menu or panel?
Menu, I guess I need to use \n to bypass it.
__________________
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
Marcus101RR
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 09-07-2016 , 22:37   Re: Menu ITEMDRAW_RAWLINE Flag is ignored?
Reply With Quote #4

Quote:
Originally Posted by Hop View Post
A lot of the flags don't work as described in csgo at least for menus, not sure about panels.
I prefer menu over panels, because with panels you can't name the item via "strings" and instead have to be listed by int making it hard to create dynamic menus. So I just ended up using a line break with settitle.
__________________
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 09-08-2016 , 02:20   Re: Menu ITEMDRAW_RAWLINE Flag is ignored?
Reply With Quote #5

I use a custom define to achieve this:
HTML Code:
#define ITEMDRAW_SPACER_NOSLOT ((1<<1)|(1<<3)) //SPACER WITH NO SLOT
Tis a combo I made up with ITEMDRAW_RAWLINE and ITEMDRAW_SPACER. Has worked quite well for my purposes.
__________________

Last edited by ThatOneGuy; 09-08-2016 at 02:21.
ThatOneGuy is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 09-08-2016 , 02:34   Re: Menu ITEMDRAW_RAWLINE Flag is ignored?
Reply With Quote #6

Tricky!

__________________
Neuro Toxin is offline
ImACow
AlliedModders Donor
Join Date: Feb 2015
Old 06-13-2017 , 18:22   Re: Menu ITEMDRAW_RAWLINE Flag is ignored?
Reply With Quote #7

This is broken somehow? ITEMDRAW_RAWLINE |ITEMDRAW_SPACER

doesn't render anything?
__________________
ImACow is offline
hmmmmm
Great Tester of Whatever
Join Date: Mar 2017
Location: ...
Old 06-13-2017 , 18:59   Re: Menu ITEMDRAW_RAWLINE Flag is ignored?
Reply With Quote #8

For that situation, I just add a new line
e.g.

PHP Code:
Format(buffersizeof(buffer), "Choice 1\n");
Format(buffersizeof(buffer), "%sChoice 2"buffer);

menu.AddItem(bufferbuffer);
menu.AddItem("Choice 3""Choice 3"); 
Output should be (haven't tested):
1. Choice 1
Choice 2
3. Choice 3
hmmmmm is offline
Reply



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 19:30.


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