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

Menu items disabled and not listed


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-26-2017 , 13:35   Menu items disabled and not listed
Reply With Quote #1

How can I make a menu item be drawn as disabled and also not as part of the list?
Usually, ITEMDRAW_DISABLED just makes the text non-selectable but still gives the item its own number (1. or 2. etc).

Example:

The --------- dividers is what I'm talking about
__________________
condolent is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 06-26-2017 , 13:37   Re: Menu items disabled and not listed
Reply With Quote #2

Create a panel instead and use DrawPanelText().
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-26-2017 , 14:36   Re: Menu items disabled and not listed
Reply With Quote #3

Quote:
Originally Posted by DJ Tsunami View Post
Create a panel instead and use DrawPanelText().
You mean panel.DrawText() right?
__________________
condolent is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 06-26-2017 , 14:53   Re: Menu items disabled and not listed
Reply With Quote #4

Yes, DrawPanelText() is old syntax, panel.DrawText() is new syntax.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 06-26-2017 , 15:16   Re: Menu items disabled and not listed
Reply With Quote #5

Since you have the plugin which does what you want to do, why not looking into that plugin's source code?
__________________
Plugins: TeamGames
Includes: Menu stocks, ColorVariables, DownloadTableConfig

> No help through PM, make a topic.
KissLick is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-26-2017 , 15:21   Re: Menu items disabled and not listed
Reply With Quote #6

How do I even get a panel item? Instead of menu.GetItem

For example:
This was my old way of getting which item was clicked:
PHP Code:
char info[32];
menu.GetItem(param2infosizeof(info));
if(
StrEqual(infoCHOICE1)) {
    
openWeaponsMenu(client);

__________________
condolent is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-26-2017 , 15:23   Re: Menu items disabled and not listed
Reply With Quote #7

Quote:
Originally Posted by KissLick View Post
Since you have the plugin which does what you want to do, why not looking into that plugin's source code?
It's stamm, with a hell of alot of confusing code and files. Not really sure where to look tbh
__________________
condolent is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 06-26-2017 , 15:25   Re: Menu items disabled and not listed
Reply With Quote #8

You could also use menu.SetTitle with several \n not sure if it works in csgo or css but you can try
xerox8521 is offline
condolent
AlliedModders Donor
Join Date: Jan 2016
Location: gc_sLocation;
Old 06-26-2017 , 15:27   Re: Menu items disabled and not listed
Reply With Quote #9

Quote:
Originally Posted by xerox8521 View Post
You could also use menu.SetTitle with several \n not sure if it works in csgo or css but you can try
I mean, yeah that kind of works but it's not really possible to add the seperators on the bottom this way. Also it's a quite sloppy way when using translations
__________________

Last edited by condolent; 06-26-2017 at 15:34.
condolent is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 06-26-2017 , 15:51   Re: Menu items disabled and not listed
Reply With Quote #10

Menu API
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami 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 14:45.


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