PDA

View Full Version : ShowPlayerDialog


akos127
26/02/2018, 05:28 PM
Hello!
I need help for dialog size.
I want a dialog with long caption, but i cant see the end of string.
Is it solvable without long text?(_______________________)

new string[128];
string = "abcdefghijklmnopqrstuvwxyz0123456789,abcdefghijklm nopqrstuvwxyz0123456789";
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, string, "Text", "Ok", "Cancel");
Result

abcdefghijklmnopqrstuvwxyz0123456789,abcdefghijklm n
http://oi63.tinypic.com/mt4emf.jpg

new string[128];
string = "abcdefghijklmnopqrstuvwxyz0123456789,abcdefghijklm nopqrstuvwxyz0123456789";
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, string, "Text______________________________________________ ____________________", "Ok", "Cancel");
Result
http://oi64.tinypic.com/xlgoht.jpg

Eoussama
26/02/2018, 06:04 PM
It dunno if this would work, trying padding the list items with spaces.

akos127
26/02/2018, 07:51 PM
Does not work

insus100
27/02/2018, 01:29 PM
http://wiki.sa-mp.com/wiki/Dialog_Styles
Add ”\t” without “” . The more you add, more space you will have.
Something like:
new string[128];
string = "abcdefghijklmnopqrstuvwxyz0123456789,abcdefghijklm nopqrstuvwxyz0123456789";
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, string, "Text\t\t\t\t", "Ok", "Cancel");

Sew_Sumi
27/02/2018, 03:00 PM
^^ This guy thinks outside the box.

akos127
27/02/2018, 06:45 PM
http://wiki.sa-mp.com/wiki/Dialog_Styles
Add \t without . The more you add, more space you will have.
Something like:

Not working.

ISmokezU
27/02/2018, 06:49 PM
There's a limit to chars in a dialog. http://wiki.sa-mp.com/wiki/Strcat

new string[128];
strcat(string, "abcdefghijklmnopqrstuvwxyz0123456789,abcdefghijklm nopqrstuvwxyz0123456789");
strcat(string, "abcdefghijklmnopqrstuvwxyz0123456789,abcdefghijklm nopqrstuvwxyz0123456789");
ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, string, "Text", "Ok", "Cancel");

Increase the string size if needed.

Nonetheless, If this is what you mean.

Sew_Sumi
27/02/2018, 06:54 PM
Nonetheless, If this is what you mean.

Na, he's meaning the title of the dialog won't expand unless the contents of the dialog are long enough.

A title that is long, gets cut unless he makes the list, wide enough to make it expand.

insus100
27/02/2018, 07:57 PM
Not working.
Make sure you use \t and NOT /t

akos127
27/02/2018, 08:22 PM
I know, but does not work.

insus100
27/02/2018, 08:42 PM
I know, but does not work.
try \t\n\t\n.... But that'll insert new lines too:
ShowPlayerDialog(playerid, YOUR_DIALOGID, DIALOG_STYLE_MSGBOX, "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz zzz", "Info\n\t\tInfo", "Button 1", "");

Sew_Sumi
27/02/2018, 09:52 PM
Just as a random idea, why not have the bottom line being a 'refresh' or something, and let it look right to have the entire line being that wide? Even using colorcodes to make it 'hidden' a bit that that is what it's for?