SA-MP Forums Archive
[Include] Dialogs include - Adding new styles to SAMP GUI - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Dialogs include - Adding new styles to SAMP GUI (/showthread.php?tid=570213)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17


Re: Dialogs include - Adding new styles to SAMP GUI - PT - 08.11.2015

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Show your code.
Does any of your scripts uses OnPlayerClickTextDraw?

Update 2.0.3 (minor change):
  • Added return 1; in OnPlayerClickTextDraw callback to resist calling it on other scripts
  • Removed SVar code, now compatiable with SAMP 0.3 earlier versions (except the one which don't support preview models)
I think that is bad you should use all the recent things on the last version of sa-mp and not think on older versions, because they are outdated...


Re: Dialogs include - Adding new styles to SAMP GUI - Yarik1995 - 08.11.2015

Quote:
Originally Posted by PT
Посмотреть сообщение
That is an sa-mp problem not this include problem
you can write Russian text in the description in the next version of the script or not? or is it not possible?


Re: Respuesta: Dialogs include - Adding new styles to SAMP GUI - Gammix - 15.11.2015

Quote:
Originally Posted by Minikole
Посмотреть сообщение
Hello friends. I am using the include Dialog.inc created by Gammix. I have a problem with pages of dialogs:

I'm using DIALOG_STYLE_PREVMODEL_LIST whose maximum space are 5. I use 311 items (the skin of sa-mp), but it does not appear to move to the next page.
Hi there.

I can help you out if you can show me your code related to the dialog. Also make sure you have DIALOG_MAX_LISTITEMS greater than 311 (or more) so you can have that much items.


Respuesta: Dialogs include - Adding new styles to SAMP GUI - Minikole - 21.11.2015

Hi!, i have a problem with lettersize. Is there any solution? Because the letter size is very small and i cannot read well the text jejeje


Re: Dialogs include - Adding new styles to SAMP GUI - Eloctro - 21.11.2015

Код:
	    for(new i = 0;i < MAX_EQUIPEMENT_POINT;i++)
	    {
			if(EQUIP_CASE[EquipID][i][EQUIPC_TYPE]==cType)
			{
				format(string, sizeof(string), "%s%d\n%s\n",string,EQUIP_CASE[EquipID][i][EQUIPC_MODEL],EQUIP_CASE[EquipID][i][EQUIPC_NAME]);
			}
	    }
	    ShowPlayerDialog(playerid, DIALOGID+383, DIALOG_STYLE_PREVMODEL_LIST, EquipType[cType],string,"Changer","Retour");
If i have juste one line, box is show but i can't see my line, however if i have more two line, it's ok


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 22.11.2015

Quote:
Originally Posted by Minikole
Посмотреть сообщение
Hi!, i have a problem with lettersize. Is there any solution? Because the letter size is very small and i cannot read well the text jejeje
You can now edit your listitems via Dialog_SetListitem.

Read the How to use? > How to edit listitems?.

Quote:
Originally Posted by Eloctro
Посмотреть сообщение
Код:
	    for(new i = 0;i < MAX_EQUIPEMENT_POINT;i++)
	    {
			if(EQUIP_CASE[EquipID][i][EQUIPC_TYPE]==cType)
			{
				format(string, sizeof(string), "%s%d\n%s\n",string,EQUIP_CASE[EquipID][i][EQUIPC_MODEL],EQUIP_CASE[EquipID][i][EQUIPC_NAME]);
			}
	    }
	    ShowPlayerDialog(playerid, DIALOGID+383, DIALOG_STYLE_PREVMODEL_LIST, EquipType[cType],string,"Changer","Retour");
If i have juste one line, box is show but i can't see my line, however if i have more two line, it's ok
Thanks for reporting that bug, i haven't figured out what is causing that, but will be fixed early.

Update v2.1.0:


Re: Dialogs include - Adding new styles to SAMP GUI - Sioux - 22.11.2015

Can I use that with easyDialog by Emmet_?


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 23.11.2015

Quote:
Originally Posted by Sioux
Посмотреть сообщение
Can I use that with easyDialog by Emmet_?
Yes, there should be no problem with it. (*add this library before including easydialog).


Re: Dialogs include - Adding new styles to SAMP GUI - malikmna - 23.11.2015

nice work


Re: Dialogs include - Adding new styles to SAMP GUI - PT - 23.11.2015

Compatible with y_dialogs?


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 23.11.2015

Quote:
Originally Posted by PT
Посмотреть сообщение
Compatible with y_dialogs?
Should be because this include only adds new styles. It may cause error (in game*) if y_dialog have dialog style checks.

Just add this include before y_dialog or easydialog.


Re: Dialogs include - Adding new styles to SAMP GUI - Eloctro - 23.11.2015

I have resolve bug, when we have juste one line.
In
Код:
static Dialog_ShowList(playerid, info[], page, selected)
You must replace:
Код:
        if ((t_iSplitItems % 2) > 0) {
        t_iSplitItems -= 1;
	}
by
Код:
	if (t_iSplitItems == 0) {
        t_iSplitItems -= 1;
	}
And i find a solution for resolution problem with certain player.

Put this in the top of include:
Код:
#define T_DIALOG_SIZE 2
#define T_DIALOG_DECAL 4.0
In
Код:
static Dialog_PTDCreate
Replace:
Код:
PlayerTextDrawLetterSize(playerid, var, lettersizeX, lettersizeY);
by
Код:
PlayerTextDrawLetterSize(playerid, var, lettersizeX*T_DIALOG_SIZE, lettersizeY*T_DIALOG_SIZE);
And in:
Код:
static Dialog_ShowHUDS
Replace:
Код:
stock static Dialog_ShowHUDS(playerid, title[], button1[], button2[]) {
	Dialog_PTDCreate(g_PlayerDialogHUDS[playerid][e_txtPlayerDialogTitle], playerid, 173.000000, 121.000000, title, 50, 1, 0.129998, 0.799998, -36, 0, 0, 1, 1, 0);
	PlayerTextDrawShow(playerid, g_PlayerDialogHUDS[playerid][e_txtPlayerDialogTitle]);

	if (button2[0]) {
		Dialog_PTDCreate(g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonLeft], playerid, 278.000000, 311.000000, button1, 50, 1, 0.129998, 0.799998, -36, 2, 0, 1, 1, 0);
		PlayerTextDrawShow(playerid, g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonLeft]);

		Dialog_PTDCreate(g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonRight], playerid, 348.000000, 311.000000, button2, 50, 1, 0.140000, 0.899999, -36, 2, 0, 1, 1, 0);
		PlayerTextDrawShow(playerid, g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonRight]);

		g_PlayerDialogInfo[playerid][e_pDialogDualButtons] = true;
	}
	else {
		Dialog_PTDCreate(g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonCenter], playerid, 317.000000, 311.000000, button1, 50, 1, 0.140000, 0.899999, -36, 2, 0, 1, 1, 0);
		PlayerTextDrawShow(playerid, g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonCenter]);

		g_PlayerDialogInfo[playerid][e_pDialogDualButtons] = false;
	}
}
by:
Код:
stock static Dialog_ShowHUDS(playerid, title[], button1[], button2[]) {
	Dialog_PTDCreate(g_PlayerDialogHUDS[playerid][e_txtPlayerDialogTitle], playerid, 173.000000, 121.000000-T_DIALOG_DECAL, title, 50, 1, 0.129998, 0.799998, -36, 0, 0, 1, 1, 0);
	PlayerTextDrawShow(playerid, g_PlayerDialogHUDS[playerid][e_txtPlayerDialogTitle]);

	if (button2[0]) {
		Dialog_PTDCreate(g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonLeft], playerid, 278.000000, 311.000000-T_DIALOG_DECAL, button1, 50, 1, 0.129998, 0.799998, -36, 2, 0, 1, 1, 0);
		PlayerTextDrawShow(playerid, g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonLeft]);

		Dialog_PTDCreate(g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonRight], playerid, 348.000000, 311.000000-T_DIALOG_DECAL, button2, 50, 1, 0.140000, 0.899999, -36, 2, 0, 1, 1, 0);
		PlayerTextDrawShow(playerid, g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonRight]);

		g_PlayerDialogInfo[playerid][e_pDialogDualButtons] = true;
	}
	else {
		Dialog_PTDCreate(g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonCenter], playerid, 317.000000, 311.000000-T_DIALOG_DECAL, button1, 50, 1, 0.140000, 0.899999, -36, 2, 0, 1, 1, 0);
		PlayerTextDrawShow(playerid, g_PlayerDialogHUDS[playerid][e_txtPlayerDialogButtonCenter]);

		g_PlayerDialogInfo[playerid][e_pDialogDualButtons] = false;
	}
}
So if you want keep orginal dimension you have juste to set define, like that:
Код:
#define T_DIALOG_SIZE 1
#define T_DIALOG_DECAL 0.0



Re: Dialogs include - Adding new styles to SAMP GUI - Carper - 30.11.2015

Wow, very nice!


Re: Dialogs include - Adding new styles to SAMP GUI - vegaltasendai - 09.12.2015

Nice job.
as change the color of the box?
transparent color.


Re: Dialogs include - Adding new styles to SAMP GUI - Crayder - 09.12.2015

Quote:
Originally Posted by vegaltasendai
Посмотреть сообщение
Nice job.
as change the color of the box?
transparent color.
It's built to look like SA-MP's dialogs. I believe it should remain this way. If you want it changed do it in the code (easy thing to do, just modify the textdraw colors).


Re: Dialogs include - Adding new styles to SAMP GUI - ExTaZZ69 - 11.12.2015

I think this i have a problem with #pragma dynamic.

Any ideas?
Edit:
When i delete this line
Код:
#pragma dynamic (DIALOG_MAX_LISTITEMS * DIALOG_MAX_LISTITEM_SIZE * 4)
I recive an unknown command in game eror. I see the dialog but the listitems are not shown. I use a "print" debug method and this line not execute:
Код:
new t_sSplit[DIALOG_MAX_LISTITEMS][DIALOG_MAX_LISTITEM_SIZE];



Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 11.12.2015

Quote:
Originally Posted by ExTaZZ69
Посмотреть сообщение
I think this i have a problem with #pragma dynamic.

Any ideas?
Edit:
When i delete this line
Код:
#pragma dynamic (DIALOG_MAX_LISTITEMS * DIALOG_MAX_LISTITEM_SIZE * 4)
I recive an unknown command in game eror. I see the dialog but the listitems are not shown. I use a "print" debug method and this line not execute:
Код:
new t_sSplit[DIALOG_MAX_LISTITEMS][DIALOG_MAX_LISTITEM_SIZE];
That issue will be fixed in the upcoming new update with a resolution fix from Electro as well.But it might take time since i am busy in updating lot of my libraries.


Re: Dialogs include - Adding new styles to SAMP GUI - Romz - 11.12.2015

Quote:
Originally Posted by Gammix
Посмотреть сообщение
That issue will be fixed in the upcoming new update with a resolution fix from Electro as well.But it might take time since i am busy in updating lot of my libraries.
When the update?


Re: Dialogs include - Adding new styles to SAMP GUI - DRIFT_HUNTER - 11.12.2015

Try commenting #pragma dynamic line and replacing
stock static (line 100) with new


Re: Dialogs include - Adding new styles to SAMP GUI - Gammix - 12.12.2015

Quote:
Originally Posted by Kolstin
Посмотреть сообщение
When the update?
As soon as possible.

Quote:
Originally Posted by DRIFT_HUNTER
Посмотреть сообщение
Try commenting #pragma dynamic line and replacing
stock static (line 100) with new
That would cause trouble when storing the dialog info, resulting in less number of listitems than expected when using the new styles.