Make the rows straight in dialogs
#1

I was wondering, is there any option to make the dialog rows straight? For example, if I make one line as "Item (Value: 100)", and the second one "Item2 (Value: 100)", and then I chenge "Item2" to longer word which make the final text look like:
pawn Код:
Item       (Value: 100)
Item2isnowlonger       (Value: 100)
What I want, is to make the text look straight, instead of how this looks, for example:
pawn Код:
[LEFT]Item [/LEFT]                           [RIGHT](Value: 100)[/RIGHT]
[LEFT]Item2isnowlonger [/LEFT]               [RIGHT](Value: 100)[/RIGHT]
Got me? There is a live example of my server, just took this screenshot:


I would be glad to get some suggestions.
Reply
#2

use \t
Reply
#3

Can you show me an example of a code using the '\t' function?
Reply
#4

pawn Код:
ShowPlayerDialog( playerid, 1, DIALOG_STYLE_LIST, "TEST", "Ak47\t\tCost $20\nBerreta\t\tCost $30", "Buy", "Close");
Reply
#5

'\t' inserts a tabulation (check how is Slice using tabulations in his signature). You can use tabulations on your strings using \t.
Reply
#6

Still not the solution.
This is what happened after I used your hint:



This is my string:
pawn Код:
format(String, sizeof(String), "1. %s\t\t\t(Value: %d)\n2. %s\t\t\t(Value: %d)\n3. %s\t\t\t(Value: %d)\n4. %s\t\t\t(Value: %d)\n5. %s\t\t\t(Value: %d)\n6. %s\t\t\t(Value: %d)\n7. %s\t\t\t(Value: %d)\n8. %s\t\t\t(Value: %d)\n9. %s\t\t\t(Value: %d)\n10. %s\t\t\t(Value: %d)\n"
Reply
#7

Stupid question: How does your tabulator-key works? ;P
Simply remove one "\t" (tabulator)
Reply
#8

Quote:
Originally Posted by !Phoenix!
Посмотреть сообщение
Stupid question: How does your tabulator works? ;P
Simply remove one "\t" (tabulator)
Well I don't really think thats the case since the results are the same.
It still shows me what It was showing me before I removed one tabulator, and this is my new string:
pawn Код:
format(String, sizeof(String), "1. %s\t\t(Value: %d)\n2. %s\t\t(Value: %d)\n3. %s\t\t(Value: %d)\n4. %s\t\t(Value: %d)\n5. %s\t\t(Value: %d)\n6. %s\t\t(Value: %d)\n7. %s\t\t(Value: %d)\n8. %s\t\t(Value: %d)\n9. %s\t\t(Value: %d)\n10. %s\t\t(Value: %d)\n",
Reply
#9

It's common sense that you have used more than One tabulator
Reply
#10

Quote:
Originally Posted by Steven Paul
Посмотреть сообщение
It's common sense that you have used more than One tabulator
Please read my last reply, it still doesn't work.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)