AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=7)
-   -   [REQ] menu proprieties (https://forums.alliedmods.net/showthread.php?t=303560)

Depresie 12-13-2017 13:34

Re: [REQ] menu proprieties
 
True, i missed that..

PHP Code:

forward_menu_display(iPlayeriMenu)
forward_menu_destroy(iPlayeriMenu)
forward_menu_select(iPlayeriMenuiSelect

I was also thinking about strings
A native to retrieve how many times a string contains a character
Adding a param to return on what cells it is present would also be nice

PHP Code:

// Prototype
stroc(const string[], "c")

//Functionality
new iNumO stroc("cool shirt""o")
// iNumO would be equal to 2 in this case 


Arkshine 12-13-2017 13:49

Re: [REQ] menu proprieties
 
@Depresie what is your reason/usage to hide the current page/max page? It should be displayed only when you have multiple pages. Is it because you want to format yourself? Others reasons?

Depresie 12-13-2017 14:02

Re: [REQ] menu proprieties
 
My primary reason is that it keeps me from formatting my menu title the way i want (i want to create some boxes around the title) and since it is placed at the end of the title, it messes my boxes up

Other reason would be it's not so nice to force it on users, some may not want it

Here is what i am doing, but when the menu has more pages, it displays the menu pages out of the box, and i cannot get rid of it
https://imgur.com/a/mGNTM

OciXCrom 12-13-2017 14:27

Re: [REQ] menu proprieties
 
Isn't it better to add a MPROP_PAGE_FORMAT option so you can customize it the way you want? If it's possible I mean.

Also, let's not forget about menu_getprop - this is needed.

Depresie 12-13-2017 14:31

Re: [REQ] menu proprieties
 
Quote:

Isn't it better to add a MPROP_PAGE_FORMAT option so you can customize it the way you want?
More details please :D

Quote:

Also, let's not forget about menu_getprop - this is needed.
Up

OciXCrom 12-13-2017 14:47

Re: [REQ] menu proprieties
 
PHP Code:

menu_setprop(iMenuMPROP_PAGE_FORMAT"\[$1/$2]"

Where $1 is the current page and $2 is the total number of pages.
(the $1 and $2 symbols are just an example - make them as you wish)

OciXCrom 12-14-2017 08:01

Re: [REQ] menu proprieties
 
Also, number formatiing:

PHP Code:

menu_setprop(iMenuMPROP_NUMBER_FORMAT"$1$2."

$1 = color according to whether the item is enabled or disabled.
$2 = item number.

PRoSToTeM@ 12-14-2017 20:34

Re: [REQ] menu proprieties
 
Current format is like this:
Code:

\y{title} {page}/{page_count}
\w
{dynamic_items}

{static_items}

{control_items}

X_items:
Code:

{item}
{item}
...
{item}

item:
Code:

{item_num}.\w {item_text}
item_num:
Code:

\r{num}
We can add functions to customize them separately.

OciXCrom 12-15-2017 08:54

Re: [REQ] menu proprieties
 
That would be great. By the way, what do you mean by {static_items}?

PRoSToTeM@ 12-15-2017 10:28

Re: [REQ] menu proprieties
 
Quote:

Originally Posted by OciXCrom (Post 2566346)
That would be great. By the way, what do you mean by {static_items}?

User-items that are shown on every page with fixed slot. (like bantime in banmenu)


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

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