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

Paginating Menus without Numbers


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spunkster21
Senior Member
Join Date: Aug 2008
Old 06-05-2011 , 08:40   Paginating Menus without Numbers
Reply With Quote #1

Hi,

I've built ranking plugin and I want to display all ranked players via a top command. Currently I'm using menus to build a paginated menu, unfortunately this results in the default numbering. e.g. displaying ranks 54 to 57 results in:

Top Players by Score
-----------------------
1. 54) A
2. 55) B
3. 56) C
4. 57) D

Ideally I'd like to get rid of the default numbering if possible, but I've been unable to do so.

Any help would be appreciated.

Thanks.
spunkster21 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-05-2011 , 10:31   Re: Paginating Menus without Numbers
Reply With Quote #2

PHP Code:
AddMenuItem(menu"info""display"ITEMDRAW_RAWLINE); 
http://docs.sourcemod.net/api/index....ad=file&id=13&
__________________
Peace-Maker is offline
spunkster21
Senior Member
Join Date: Aug 2008
Old 06-05-2011 , 13:43   Re: Paginating Menus without Numbers
Reply With Quote #3

Quote:
Originally Posted by Peace-Maker View Post
PHP Code:
AddMenuItem(menu"info""display"ITEMDRAW_RAWLINE); 
http://docs.sourcemod.net/api/index....ad=file&id=13&
Unfortunately ITEMDRAW_RAWLINE does not appear to work for menus the way it does for panels. In fact, I can't get it to show up at all in the menu, see screen shot below.

http://**************/photo/my-images/62/menujo.png/

The ITEMDRAW_RAWLINE item is at position 3, but isn't visible.

Here's what I used to build the test menu:

PHP Code:
new Handle:h_Menu CreateMenu(Handler_Menu);
    
SetMenuTitle(h_Menu"Test Menu");
AddMenuItem(h_Menu"ITEMDRAW_DEFAULT""ITEMDRAW_DEFAULT"ITEMDRAW_DEFAULT);
AddMenuItem(h_Menu"ITEMDRAW_DISABLED""ITEMDRAW_DISABLED"ITEMDRAW_DISABLED);
AddMenuItem(h_Menu"ITEMDRAW_RAWLINE""ITEMDRAW_RAWLINE"ITEMDRAW_RAWLINE);
AddMenuItem(h_Menu"ITEMDRAW_NOTEXT""ITEMDRAW_NOTEXT"ITEMDRAW_NOTEXT);
AddMenuItem(h_Menu"ITEMDRAW_SPACER""ITEMDRAW_SPACER"ITEMDRAW_SPACER);
AddMenuItem(h_Menu"ITEMDRAW_IGNORE""ITEMDRAW_IGNORE"ITEMDRAW_IGNORE);
AddMenuItem(h_Menu"ITEMDRAW_CONTROL""ITEMDRAW_CONTROL"ITEMDRAW_CONTROL);

DisplayMenu(h_MenuclientMENU_TIME_FOREVER); 
Thanks.
spunkster21 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-05-2011 , 16:33   Re: Paginating Menus without Numbers
Reply With Quote #4

Use a panel then.
__________________
Peace-Maker is offline
spunkster21
Senior Member
Join Date: Aug 2008
Old 06-05-2011 , 16:37   Re: Paginating Menus without Numbers
Reply With Quote #5

Quote:
Originally Posted by Peace-Maker View Post
Use a panel then.
Is there an easy way to get panels to paginate?
spunkster21 is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 06-05-2011 , 17:15   Re: Paginating Menus without Numbers
Reply With Quote #6

Nope.. But there's a almost-what-you-want way with menus. Each new option in the menu ist just a newline in the internal string. So doing AddMenuItem(menu, "bla", "54. Player1\n55. Player2\n56. Player3", ITEMDRAW_DISABLED); could be somewhat what you need. You'd still have the 1. showing up at the top though.
__________________
Peace-Maker is offline
spunkster21
Senior Member
Join Date: Aug 2008
Old 06-05-2011 , 17:45   Re: Paginating Menus without Numbers
Reply With Quote #7

Quote:
Originally Posted by Peace-Maker View Post
Nope.. But there's a almost-what-you-want way with menus. Each new option in the menu ist just a newline in the internal string. So doing AddMenuItem(menu, "bla", "54. Player1\n55. Player2\n56. Player3", ITEMDRAW_DISABLED); could be somewhat what you need. You'd still have the 1. showing up at the top though.
Very interesting, I hadn't thought of that.

I'll go try that now. Thanks for the help.
spunkster21 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 17:54.


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