Raised This Month: $ Target: $400
 0% 

Menu Question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pob18
Member
Join Date: Jun 2014
Old 07-01-2014 , 07:11   Menu Question
Reply With Quote #1

How to delete the (back/next page) from a menu?
pob18 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-01-2014 , 07:22   Re: Menu Question
Reply With Quote #2

#define MPROP_PERPAGE 1 /* Number of items per page (param1 = number, 0=no paginating, 7=default) */

setting it to 0 will also remove the exit option, if you still want it you have to re-create it

Last edited by jimaway; 07-01-2014 at 07:23.
jimaway is offline
pob18
Member
Join Date: Jun 2014
Old 07-01-2014 , 10:10   Re: Menu Question
Reply With Quote #3

And how I re-create the exit function? (to 0) if MPROP_PERPAGE IS 0
pob18 is offline
jimaway
Heeeere's Jimmy!
Join Date: Jan 2009
Location: Estonia
Old 07-01-2014 , 16:16   Re: Menu Question
Reply With Quote #4

/**
* Adds a blank line to a menu.
*
* @param menu Menu resource identifier.
* @param slot 1 (default) if the line should shift the numbering down.
* 0 if the line should be a visual shift only.
* @noreturn
* @error Invalid menu resource.
*/
native menu_addblank(menu, slot=1);
jimaway is offline
pob18
Member
Join Date: Jun 2014
Old 07-01-2014 , 16:32   Re: Menu Question
Reply With Quote #5

What?
pob18 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-01-2014 , 16:49   Re: Menu Question
Reply With Quote #6

Quote:
Originally Posted by pob18 View Post
What?
Use that function to add blanks until you get to the zero key where you would add a item that says "Exit".
__________________
fysiks is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-01-2014 , 19:04   Re: Menu Question
Reply With Quote #7

You cannot add two blanks in a row, it won't work. The whole menu_addblank native seems flawed and you should use ^n in the previous item for a newline instead.

Also, this is completely unnecessary. MPROP_PERPAGE doesn't remove the exit button and while the .inc file says it's deprecated, it really isn't. menu_setprop( menu, MPROP_PERPAGE, 0 ) positions the Exit button at slot 0 and also removes the previous/next items IIRC.

Last edited by Backstabnoob; 07-01-2014 at 19:04.
Backstabnoob is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-01-2014 , 19:19   Re: Menu Question
Reply With Quote #8

Quote:
Originally Posted by Backstabnoob View Post
Also, this is completely unnecessary. MPROP_PERPAGE doesn't remove the exit button and while the .inc file says it's deprecated, it really isn't. menu_setprop( menu, MPROP_PERPAGE, 0 ) positions the Exit button at slot 0 and also removes the previous/next items IIRC.
I thought the same thing but I wrote a test plugin to verify. The exit option is indeed removed.
__________________

Last edited by fysiks; 07-01-2014 at 19:24.
fysiks is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 07-01-2014 , 19:24   Re: Menu Question
Reply With Quote #9

Oh, that sucks. Wouldn't force showing it again with MPROP_EXIT work? It probably won't, but it's worth trying at least.
Backstabnoob is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-01-2014 , 19:24   Re: Menu Question
Reply With Quote #10

The solution is to not put more than MPROP_PERPAGE items in the menu. If MPROP_PERPAGE is set to 3 and you have 3 menu items, there will be no paginating and thus no next/back options.
__________________
fysiks 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 21:08.


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