Re: easyDialog.inc - Dialogs made easier! -
Hansrutger - 10.12.2013
Noob scripter here, hi!
Uhm' when doing something with DIALOG_STYLE_LIST, can you use just like with normal dialogs with "cases" or also with like "listitem == 0" etc?
Re: easyDialog.inc - Dialogs made easier! - Emmet_ - 10.12.2013
Yeah - of course! I'm using switch statements with this and it works nice.
Re: easyDialog.inc - Dialogs made easier! -
Swisher - 14.01.2014
what is the correct way to use this
On my server when cop issues ticket a dialog pops up saying pay or dont pay. if i click pay it says incorrect password please re-enter if i click dont pay it kicks me from server,
I just need to keep them from getting mixed up. Sorry for being a noob. This is all new to me Im not sure which function or callback to use nor where to put it,
Re: easyDialog.inc - Dialogs made easier! - Emmet_ - 14.01.2014
Quote:
Originally Posted by Swisher
what is the correct way to use this
On my server when cop issues ticket a dialog pops up saying pay or dont pay. if i click pay it says incorrect password please re-enter if i click dont pay it kicks me from server,
I just need to keep them from getting mixed up. Sorry for being a noob. This is all new to me Im not sure which function or callback to use nor where to put it,
|
Check out the example script in the first post.
I'm working on a way to fix this.
Re: easyDialog.inc - Dialogs made easier! -
kurta999 - 14.01.2014
Sorry, but:
(Dialog_Reset(%0), ShowPlayerDialog(
playerid, -1, DIALOG_STYLE_MSGBOX, " ", " ", " ", ""))
Re: easyDialog.inc - Dialogs made easier! - Emmet_ - 24.01.2014
An optional update:
- Updated the hooking method.
- Removed "Dialog_Call" since you can call dialogs directly now.
- Dialog_Show now accepts formatting parameters, which automatically formats the info string.
- Updated the callback layout. It now uses the traditional "dialog_x" instead of the other wacky one.
An example:
pawn Код:
Dialog_Show(playerid, Rules, DIALOG_STYLE_MSGBOX, "Rules", "Do you accept the rules, %s?", "Yes", "No", GetName(playerid));
I've also renamed "OnDialogReceived" to "OnDialogPerformed" and added a response parameter:
pawn Код:
public OnDialogPerformed(playerid, dialog[], response, success)
{
return 1;
}
I'm also considering to integrate y_dialog into this library. When I'm not busy then I'll get around to doing it.
Quote:
Originally Posted by kurta999
Sorry, but:
(Dialog_Reset(%0), ShowPlayerDialog(playerid, -1, DIALOG_STYLE_MSGBOX, " ", " ", " ", ""))
|
Fixed, thanks.
Re: easyDialog.inc - Dialogs made easier! -
Isolated - 26.01.2014
I've found somewhat of a bug within the script. I for one, prefer the look of:
pawn Код:
#define DIALOG_LOGIN (1001)
// instead of
#define DIALOG_LOGIN 1001
However this include does not support this.
Re: easyDialog.inc - Dialogs made easier! - Emmet_ - 27.01.2014
Quote:
Originally Posted by Isolated
I've found somewhat of a bug within the script. I for one, prefer the look of:
pawn Код:
#define DIALOG_LOGIN (1001) // instead of #define DIALOG_LOGIN 1001
However this include does not support this.
|
Yeah, sorry. Due to limitations on the pre-processor, it doesn't detect macros being used within other macros. Since dialog ID's are redundant in this script, you can just do this:
pawn Код:
Dialog:DIALOG_LOGIN(playerid, response, listitem, inputtext[])
{
// ...
}
Without
DIALOG_LOGIN being an actual definition / macro.
Re: easyDialog.inc - Dialogs made easier! -
Translator - 11.02.2014
Do you know why I get this error? easyDialog.inc(129) : error 025: function heading differs from prototype
Re: easyDialog.inc - Dialogs made easier! -
Fornew - 12.02.2014
One question, їIs this optimized?. Thanks
Re: easyDialog.inc - Dialogs made easier! -
SecretBoss - 02.11.2015
Quote:
Originally Posted by Crayder
Yes, it obviously does. This include doesn't touch the types at all. It just passes them on.
|
I think that
DIALOG_STYLE_TABLIST, added on 0.3.7 and since Emmet_ update the version
DIALOG_STYLE_TABLIST is not supported, anyway you can always use
DIALOG_STYLE_TABLIST with normal function
ShowPlayerDialog
Re: easyDialog.inc - Dialogs made easier! -
vannesenn - 03.11.2015
I think that Emmet_ should answer on that big question.
Re: easyDialog.inc - Dialogs made easier! -
SecretBoss - 03.11.2015
Quote:
Originally Posted by Ralfie
The include has nothing to do with the style of the dialog. What emmet is doing is only "converting" the response of the dialogs you have into callbacks to make your coding easier, hence easyDialog.
All styles work, and even (if) in the future we had new styles, they will work too.
|
I never checked the code
Re: easyDialog.inc - Dialogs made easier! -
vannesenn - 04.11.2015
Nice work and include Emmet_! I recommend to use macro definition because original 1st line has a lot text and params for writing(if you understand me.
Код:
#define DIALOG(%0) \
Dialog:%0(playerid, response, listitem, inputtext[])
So code will look
Код:
DIALOG(DIALOG_NAME)
{
/* CODE HERE */
return (true);
}
Re: easyDialog.inc - Dialogs made easier! -
Uberanwar - 06.03.2016
Nice include! Great work, Emmet!
Re: easyDialog.inc - Dialogs made easier! -
DRIFT_HUNTER - 06.03.2016
Quote:
Originally Posted by vannesenn
Nice work and include Emmet_! I recommend to use macro definition because original 1st line has a lot text and params for writing(if you understand me.
Код:
#define DIALOG(%0) \
Dialog:%0(playerid, response, listitem, inputtext[])
So code will look
Код:
DIALOG(DIALOG_NAME)
{
/* CODE HERE */
return (true);
}
|
You can redefine that in your script. Adding that would hide function arguments that are being passed, while that is your point many people like to know where that comes from.
Re: easyDialog.inc - Dialogs made easier! -
awsomedude - 14.03.2016
Download link:
https://github.com/Awsomedude/easyDialog
New Thread:
https://sampforum.blast.hk/showthread.php?tid=602886
Re: easyDialog.inc - Dialogs made easier! -
Crayder - 14.03.2016
Quote:
Originally Posted by awsomedude
|
Dude... Just make a copy of this thread. You can just hit the quote button to get all of the bbcode, then just make a new thread with the new link and a message saying that Emmet_ is the original author.
However, if you do not plan on maintaining this include then let someone else do it.
Re: easyDialog.inc - Dialogs made easier! -
VexHex - 04.05.2016
Download link needs to be updated.
Re: easyDialog.inc - Dialogs made easier! -
Crayder - 04.05.2016
Quote:
Originally Posted by VexHex
Download link needs to be updated.
|
Read the post above my post that is just before yours. This script has a new maintainer. Emmet_ is gone.