Re: Dialogs include - Adding new styles to SAMP GUI -
TakeiT - 05.01.2016
It seems to screw with other includes/functions using OnPlayerClickPlayerTextDraw, basically, no matter what IDs you choose for each it triggers OnDialogResponse. An mSelection feature was triggering my login system, resolved when i removed the include.
Re: Dialogs include - Adding new styles to SAMP GUI -
Gammix - 05.01.2016
Quote:
Originally Posted by TakeiT
It seems to screw with other includes/functions using OnPlayerClickPlayerTextDraw, basically, no matter what IDs you choose for each it triggers OnDialogResponse. An mSelection feature was triggering my login system, resolved when i removed the include.
|
I am working on a new version which will be fixing all known issues.
Re: Dialogs include - Adding new styles to SAMP GUI -
OstGot - 27.03.2016
Quote:
Originally Posted by Gammix
Sometimes (or maybe most of the times) it goes above the scroll button (the down one) and when the pages are less it stays a bit up than sticking its bottom to the scroll down button. (best understand by going in game)
|
Fixed. Check your github
UPD:
Images
Re: Dialogs include - Adding new styles to SAMP GUI -
Gammix - 27.03.2016
Quote:
Originally Posted by OstGot
Fixed. Check your github
UPD: Images
|
Thanks! Updated the include!
Re: Dialogs include - Adding new styles to SAMP GUI -
Sanady - 27.03.2016
How textdraw looks on diffrent screen resolution? By the way nice design.
Re: Dialogs include - Adding new styles to SAMP GUI -
Gammix - 27.03.2016
Quote:
Originally Posted by Sanady
How textdraw looks on diffrent screen resolution? By the way nice design.
|
They were initially built on standard resolution of 16x9.
Re: Dialogs include - Adding new styles to SAMP GUI -
Gammix - 26.06.2016
Update v2.5
- Bug fixes: Showing a dialog simultaneously ended up in no dialog on screen (now fixed).
- New dialog function to add content through arrays: (faster method than "ShowPlayerDialog")
pawn Код:
ShowPlayerPreviewModelDialog(playerid, dialogid, style, caption[], models[], labels[][], button1[], button2[], limit = sizeof (models));
Re: Dialogs include - Adding new styles to SAMP GUI -
maraz1987 - 07.07.2016
Hi, how to take the model ID of the selected list item?
Re: Dialogs include - Adding new styles to SAMP GUI -
Gammix - 07.07.2016
Quote:
Originally Posted by maraz1987
Hi, how to take the model ID of the selected list item?
|
Hi. Reading the model id is similar to how you read listitems from other dialog styles. You create the list so you should know which listitem belongs to which model id.
For example:
pawn Код:
new models[] = {0, 1, 2};
new labels[][] = {"item1", "item2", "item3"};
// Show dialog to player
ShowPlayerPreviewModelDialog(playerid, 0, DIALOG_STYLE_PREVMODEL, "Dialog:", models, labels, "Button1", "Button2");
// Response
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 0)
{
if (response)
{
new str[45];
format(str, sizeof (str), "Listitem: %i, Modelid: %i", listitem, models[listitem]);
SendClientMessage(playerid,-1, str);
}
}
}
Re: Dialogs include - Adding new styles to SAMP GUI -
Romz - 07.07.2016
Gammix, It is possible to specify the position of the model and the size of it?
Re: Dialogs include - Adding new styles to SAMP GUI -
maraz1987 - 07.07.2016
Quote:
Originally Posted by Gammix
Hi. Reading the model id is similar to how you read listitems from other dialog styles. You create the list so you should know which listitem belongs to which model id.
For example:
pawn Код:
new models[] = {0, 1, 2}; new labels[][] = {"item1", "item2", "item3"};
// Show dialog to player ShowPlayerPreviewModelDialog(playerid, 0, DIALOG_STYLE_PREVMODEL, "Dialog:", models, labels, "Button1", "Button2");
// Response public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if (dialogid == 0) { if (response) { new str[45]; format(str, sizeof (str), "Listitem: %i, Modelid: %i", listitem, models[listitem]); SendClientMessage(playerid,-1, str); } } }
|
're Interested in on the thank you, I'm doing it , but you do not have the easier way to do this? For example Dialog_GetModel... use ?
Re: Dialogs include - Adding new styles to SAMP GUI -
Gammix - 08.07.2016
Quote:
Originally Posted by Kolstin
Gammix, It is possible to specify the position of the model and the size of it?
|
Yes, checkout
Dialog_SetListitem.
Quote:
Originally Posted by maraz1987
're Interested in on the thank you, I'm doing it , but you do not have the easier way to do this? For example Dialog_GetModel... use ?
|
Are you using arrays with ShowPlayerPreviewModelDialog?
Or are you using ShowPlayerDialog ?
Re: Dialogs include - Adding new styles to SAMP GUI -
maraz1987 - 08.07.2016
Quote:
Originally Posted by Gammix
Yes, checkout Dialog_SetListitem.
Are you using arrays with ShowPlayerPreviewModelDialog?
Or are you using ShowPlayerDialog ?
|
I use them both.
Re: Dialogs include - Adding new styles to SAMP GUI -
Gammix - 08.07.2016
Quote:
Originally Posted by maraz1987
I use them both.
|
Edit the include with this piece of code at the end:
pawn Код:
stock Dialog_GetModel(playerid, listitem)
{
if (playerid < 0 || playerid >= MAX_PLAYERS)
{
return false;
}
if (pDialogStyle[playerid] == -1)
{
return false;
}
new index;
switch (pDialogStyle[playerid])
{
case DIALOG_STYLE_PREVMODEL,
DIALOG_STYLE_PREVMODEL_LIST:
{
if (listitem >= pDialogTotalListitems[playerid])
{
return false;
}
index = listitem - (floatround(Float:(listitem - (6 * 4)), floatround_floor) * (6 * 4));
if (index >= (6 * 4))
{
return false;
}
return Dialog_GetModel(playerid, listitem);
}
}
return true;
}
Re: Dialogs include - Adding new styles to SAMP GUI -
maraz1987 - 08.07.2016
Quote:
Originally Posted by Gammix
Edit the include with this piece of code at the end:
pawn Код:
stock Dialog_GetModel(playerid, listitem) { if (playerid < 0 || playerid >= MAX_PLAYERS) { return false; }
if (pDialogStyle[playerid] == -1) { return false; }
new index;
switch (pDialogStyle[playerid]) { case DIALOG_STYLE_PREVMODEL, DIALOG_STYLE_PREVMODEL_LIST: { if (listitem >= pDialogTotalListitems[playerid]) { return false; }
index = listitem - (floatround(Float:(listitem - (6 * 4)), floatround_floor) * (6 * 4)); if (index >= (6 * 4)) { return false; }
return Dialog_GetModel(playerid, listitem); } }
return true; }
|
Thank you for your interest!
Re: Dialogs include - Adding new styles to SAMP GUI -
Romz - 08.07.2016
sorry del...
Re: Dialogs include - Adding new styles to SAMP GUI -
maraz1987 - 08.07.2016
Quote:
Originally Posted by Gammix
Edit the include with this piece of code at the end:
pawn Код:
stock Dialog_GetModel(playerid, listitem) { if (playerid < 0 || playerid >= MAX_PLAYERS) { return false; }
if (pDialogStyle[playerid] == -1) { return false; }
new index;
switch (pDialogStyle[playerid]) { case DIALOG_STYLE_PREVMODEL, DIALOG_STYLE_PREVMODEL_LIST: { if (listitem >= pDialogTotalListitems[playerid]) { return false; }
index = listitem - (floatround(Float:(listitem - (6 * 4)), floatround_floor) * (6 * 4)); if (index >= (6 * 4)) { return false; }
return Dialog_GetModel(playerid, listitem); } }
return true; }
|
Function does not work, does not return the model ID.
Returned number: 0
Re: Dialogs include - Adding new styles to SAMP GUI -
Gammix - 08.07.2016
Quote:
Originally Posted by maraz1987
Function does not work, does not return the model ID.
Returned number: 0
|
Wait you cannot use this actually because OnDialogResponse will be delayed due to CallRemoteFunction and in that time, the player dialog data gets reset.
I'll modify the include soon.
Re: Dialogs include - Adding new styles to SAMP GUI -
Jensenn - 11.08.2016
Quote:
Originally Posted by Gammix
It was caused due to the limit of PVars, i am still using PVars but now only 1 PVar per listitem. So if any of your other scripts uses say 100 PVars, you can still have a maximum of 700 preview model listitems.
And the random labels or text appearance has also been fixed.
Update v2.7.2:
- Increased the dialog listitems limit (maximum allowed 800 - depends on the usage of PVars)
- Fixed random labels or text appearance when there was none set.
|
thanks! +rep
Re: Dialogs include - Adding new styles to SAMP GUI -
Max_Andolini - 11.08.2016
Quote:
Originally Posted by Jensenn
thanks! +rep
|
YN'ye mi ekleyeceksin