Raised This Month: $32 Target: $400
 8% 

Menu Question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 05-02-2016 , 15:59   Menu Question
Reply With Quote #1

Its possible to make a menu with the NEWEST SYSTEM like this?

PHP Code:
Store

1. Item1    Price
x
2. Item2    Price
y
3. Item3    Price

Like, the price will be in the same place as the others
__________________

Last edited by skz; 05-02-2016 at 16:00.
skz is offline
klippy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 05-02-2016 , 16:56   Re: Menu Question
Reply With Quote #2

What do you mean by "newest system"?

That's most likely not possible with any "system". Menu fonts can vary, and they are usually not monospace. You can't have the exact position, but you can make it quite precise with some string formatting rules: http://www.cplusplus.com/reference/cstdio/printf/.
klippy is offline
Artifact
Veteran Member
Join Date: Jul 2010
Old 05-02-2016 , 17:43   Re: Menu Question
Reply With Quote #3

Code:
menu_additem(menu, const name[], const info[]="", paccess=0, callback=-1);
so you need something like
PHP Code:
menu_additem(menu"Item1""Price X"); 
__________________
Artifact is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-02-2016 , 19:47   Re: Menu Question
Reply With Quote #4

It is not possible to guarantee that they would line up perfectly when using non-fixed-width fonts. However, there is a way to "right align" part of the text (but it's farther to the right than you might think; on my monitor, it's in the middle of my screen). For some reason I'm thinking "\r" is right-align but that doesn't seem correct since it might be red.
__________________
fysiks is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-03-2016 , 04:30   Re: Menu Question
Reply With Quote #5

Why don't you put 2 colums?
Item Price
1. Item1. 50$
.......

???

Last edited by siriusmd99; 05-03-2016 at 04:31.
siriusmd99 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-03-2016 , 07:19   Re: Menu Question
Reply With Quote #6

Or use brackets... Item [Price]
You can use \R to align the text to the right.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Baws
Veteran Member
Join Date: Oct 2012
Old 05-04-2016 , 23:19   Re: Menu Question
Reply With Quote #7

Why don't you just put the name of the item like this: "Item 1 \y[\rPrice $\y]"
Simple.
__________________
Like my clean plugins and work?
Baws is offline
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 05-05-2016 , 10:50   Re: Menu Question
Reply With Quote #8

Quote:
Originally Posted by Baws View Post
Why don't you just put the name of the item like this: "Item 1 \y[\rPrice $\y]"
Simple.
I think you didn't read what I requested

I want something like that:

item 1 <--distance------> price
item 2 <--same distance> price
item 3 <--same same---> price
__________________
skz is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 05-05-2016 , 11:28   Re: Menu Question
Reply With Quote #9

Quote:
Originally Posted by skz View Post
I think you didn't read what I requested

I want something like that:

item 1 <--distance------> price
item 2 <--same distance> price
item 3 <--same same---> price
>>

Quote:
Originally Posted by fysiks View Post
It is not possible to guarantee that they would line up perfectly when using non-fixed-width fonts. However, there is a way to "right align" part of the text (but it's farther to the right than you might think; on my monitor, it's in the middle of my screen). For some reason I'm thinking "\r" is right-align but that doesn't seem correct since it might be red.
__________________
gabuch2 is offline
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 05-05-2016 , 11:36   Re: Menu Question
Reply With Quote #10

Quote:
Originally Posted by Shattered Heart Lynx View Post
>>

Quote:
Originally Posted by fysiks View Post
It is not possible to guarantee that they would line up perfectly when using non-fixed-width fonts. However, there is a way to "right align" part of the text (but it's farther to the right than you might think; on my monitor, it's in the middle of my screen). For some reason I'm thinking "\r" is right-align but that doesn't seem correct since it might be red.
__________________
skz 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 23:52.


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