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

[REQ] menu proprieties


Post New Thread Reply   
 
Thread Tools Display Modes
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-13-2017 , 13:34   Re: [REQ] menu proprieties
Reply With Quote #11

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 
__________________

Last edited by Depresie; 12-13-2017 at 13:43.
Depresie is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-13-2017 , 13:49   Re: [REQ] menu proprieties
Reply With Quote #12

@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?
__________________

Last edited by Arkshine; 12-13-2017 at 13:49.
Arkshine is offline
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-13-2017 , 14:02   Re: [REQ] menu proprieties
Reply With Quote #13

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
__________________

Last edited by Depresie; 12-13-2017 at 14:20.
Depresie is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-13-2017 , 14:27   Re: [REQ] menu proprieties
Reply With Quote #14

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.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Depresie
Veteran Member
Join Date: Nov 2013
Old 12-13-2017 , 14:31   Re: [REQ] menu proprieties
Reply With Quote #15

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

Quote:
Also, let's not forget about menu_getprop - this is needed.
Up
__________________
Depresie is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-13-2017 , 14:47   Re: [REQ] menu proprieties
Reply With Quote #16

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)
__________________

Last edited by OciXCrom; 12-13-2017 at 14:48.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-14-2017 , 08:01   Re: [REQ] menu proprieties
Reply With Quote #17

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.
__________________

Last edited by OciXCrom; 12-14-2017 at 08:01.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
[email protected]
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 12-14-2017 , 20:34   Re: [REQ] menu proprieties
Reply With Quote #18

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.
__________________

Last edited by [email protected]; 12-14-2017 at 20:35.
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-15-2017 , 08:54   Re: [REQ] menu proprieties
Reply With Quote #19

That would be great. By the way, what do you mean by {static_items}?
__________________

Last edited by OciXCrom; 12-15-2017 at 08:54.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
[email protected]
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 12-15-2017 , 10:28   Re: [REQ] menu proprieties
Reply With Quote #20

Quote:
Originally Posted by OciXCrom View Post
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)
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Reply


Thread Tools
Display Modes

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 15:19.


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