AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Menus (https://forums.alliedmods.net/showthread.php?t=254966)

yan1255 01-08-2015 21:39

Menus
 
Is there anyway of keeping the number of a disabled item on a menu red instead of grey ?

RateX 01-08-2015 22:20

Re: Menus
 
What menu? If it's the default cs menu, not possible.

yan1255 01-09-2015 11:46

Re: Menus
 
Quote:

Originally Posted by RateX (Post 2246690)
What menu? If it's the default cs menu, not possible.

the menu from newmenus.inc :)

Natsheh 01-10-2015 11:21

Re: Menus
 
PHP Code:

             public Menu(id)
             {
             new 
Txt[64]
             
formatex(Txtcharsmax(Txt), "%s" Check() ? "Item":"\dItem")
             
menu_additem(MenuTxt"info"0)
             }
            public 
Handle_menu(idmenu ,item)
            {
                            switch( 
item )
                              case 
0:
                              {
                                              if(
Check()) //Code...
                                              
else Menu(id)
                                }
             } 

Check if item is disabled by function Check if it return's false then item is disable but the number color wont get grey, if returns true then item is enabled & his num color be white!.

i hope you get my idea

yan1255 01-11-2015 13:13

Re: Menus
 
Quote:

Originally Posted by Natsheh (Post 2247436)
PHP Code:

             public Menu(id)
             {
             new 
Txt[64]
             
formatex(Txtcharsmax(Txt), "%s" Check() ? "Item":"\dItem")
             
menu_additem(MenuTxt"info"0)
             }
            public 
Handle_menu(idmenu ,item)
            {
                            switch( 
item )
                              case 
0:
                              {
                                              if(
Check()) //Code...
                                              
else Menu(id)
                                }
             } 

Check if item is disabled by function Check if it return's false then item is disable but the number color wont get grey, if returns true then item is enabled & his num color be white!.

i hope you get my idea

I understand your idea of course and I even had it on my own but I want to see if theres any way of disabling the item while continuing seeing the number in red :)

fysiks 01-11-2015 14:07

Re: Menus
 
You can do it manually using the default menus. You cannot do it using newmenus.inc if you still want the text to be greyed out using the callback.

Natsheh 01-15-2015 16:56

Re: Menus
 
You can replace the additem with addtext but the menu should be started first with any additem.


All times are GMT -4. The time now is 15:32.

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