AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Solved Adding Back button to new menu system (https://forums.alliedmods.net/showthread.php?t=317910)

edon1337 08-04-2019 10:44

Adding Back button to new menu system
 
Is there a way to add back button to new menus? Aside from the manual menu_additem way?

HamletEagle 08-04-2019 13:12

Re: Adding Back button to new menu system
 
I'm not sure if I understood correctly but the back menu is added by default.

edon1337 08-04-2019 14:38

Re: Adding Back button to new menu system
 
Basically I want to add a back button just before the 'Exit' button that re-opens the latest menu. I tried menu_setprop but it didn't work, there's only 'Exit' button in my menu currently.

EDIT: Now I understand why you said it's added by default, I'm not talking about the default 'Back' button that switches pages within a menu.

JocAnis 08-04-2019 15:58

Re: Adding Back button to new menu system
 
Probably you want back button if your menu items arent > 7 ?
solution: just rename Exit? :D

edon1337 08-04-2019 16:04

Re: Adding Back button to new menu system
 
Quote:

Originally Posted by JocAnis (Post 2661885)
Probably you want back button if your menu items arent > 7 ?
solution: just rename Exit? :D

Just want a back button under Exit, I still want exit to be there..

EFFx 08-04-2019 16:32

Re: Adding Back button to new menu system
 
There's no native that you can use that automatically opens the previous menu if you don't create it manually.

JocAnis 08-04-2019 16:53

Re: Adding Back button to new menu system
 
Maybe try with menu_addblanks, and make last item as Back ? or mb something with MPROP_PERPAGE

edon1337 08-04-2019 17:09

Re: Adding Back button to new menu system
 
Quote:

Originally Posted by EFFx (Post 2661892)
There's no native that you can use that automatically opens the previous menu if you don't create it manually.

The issue is adding the back button not opening the previous menu.

Quote:

Originally Posted by JocAnis (Post 2661898)
Maybe try with menu_addblanks, and make last item as Back ? or mb something with MPROP_PERPAGE

I completely forgot about menu_addblanks, I might do something with that, I'll see. Thanks.

Natsheh 08-04-2019 17:30

Re: Adding Back button to new menu system
 
There is a way to add exit with a back button but you need to hold a use key or any key command start with +
To exit or return to the old menu depends on your menu order

For example

PHP Code:

menu_setprop(menuidMPROP_EXIT_NAME"RETURN ^n/
\rE0. \wExit"
)

public 
menuhandle(idmenu item)
{
        if(
item == MENU_EXIT &&  get_user_button(id) & IN_USE// EXITING THE MENU
        
else if(item == MENU_EXIT// Return old menu 

You probably need to check if user is still holding the key also

EFFx 08-05-2019 04:05

Re: Adding Back button to new menu system
 
Quote:

Originally Posted by edon1337 (Post 2661900)
The issue is adding the back button not opening the previous menu.

Jesus Christ...


All times are GMT -4. The time now is 17:20.

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