[Include] mdialog - modern dialog system
#1

mdialog
About
Modern dialog system.

Functions
Open dialog
PHP код:
Dialog_Open(playerid, function[], stylecaption[], info[], button1[], button2[]); 
Close dialog
PHP код:
Dialog_Close(playerid); 
Check on openning dialog
PHP код:
Dialog_IsOpen(playerid); 
Show dialog by name
PHP код:
Dialog_Show(playerid, function[]); 
Show message dialog
PHP код:
Dialog_Message(playeridcaption[], info[], button1[]); 
Show message dialog with custom response callback
PHP код:
Dialog_MessageEx(playeridresponse[], caption[], info[], button1[], button2[]); 
zlang support
If MDIALOG_ZLANG_MODE is defined then some mdialog functions take a new view.

Open dialog
PHP код:
Dialog_Open(playerid, function[], stylecaption[], info[], button1[], button2[], {Float_}:...); 
Show message dialog
PHP код:
Dialog_Message(playeridcaption[], info[], button1[], {Float_}:...); 
Show message dialog with custom response callback
PHP код:
Dialog_MessageEx(playeridresponse[], caption[], info[], button1[], button2[], {Float_}:...); 
Tags support
You can use tags for markup your dialogs:

Tag
Description
\\c Centers the text
\\r Aligns the text to the right


Usage
You can use DialogCreate: and DialogResponse: prefixes:
PHP код:
DialogCreate:test(playerid)
{
    
Dialog_Open(playeridDialog:testDIALOG_STYLE_MSGBOX,
                
"Hello",
                
"Are you ok?",
                
"Yes""No");
}
DialogResponse:test(playeridresponselistiteminputtext[])
{
    if (!
response) {
        
SendClientMessage(playerid, -1"This club only for OK guys!");
        
Dialog_Show(playeridDialog:test);
        return 
1;
    }
    
SendClientMessage(playerid, -1"Welcome to the club");
    return 
1;

Usage with zlang mode
PHP код:
#define MDIALOG_ZLANG_MODE
#include "mdialog"
DialogCreate:test(playerid)
{
    
Dialog_Open(playeridDialog:testDIALOG_STYLE_MSGBOX,
                
"Hello",
                
"LANG_ARE_YOU_OK",
                
"Yes""BUTTON_NO",
                
playerid);
}
DialogResponse:test(playeridresponselistiteminputtext[])
{
    if (!
response) {
        
SendClientMessage(playerid, -1"This club only for OK guys!");
        
Dialog_Show(playeridDialog:test);
        return 
1;
    }
    
SendClientMessage(playerid, -1"Welcome to the club");
    return 
1;

Lang file:
PHP код:
LANG_ARE_YOU_OK Hey id %dare you ok?
BUTTON_NO No 
Download
- GitHub download page: https://github.com/Open-GTO/mdialog/releases
Reply


Messages In This Thread
mdialog - modern dialog system - by ZiGGi - 27.11.2016, 10:49
Re: mdialog - modern dialog system - by Darrenr - 31.12.2016, 15:30
Re: mdialog - modern dialog system - by ZiGGi - 31.12.2016, 16:18
Re: mdialog - modern dialog system - by Lordzy - 02.01.2017, 14:42
Re: mdialog - modern dialog system - by ZiGGi - 02.01.2017, 15:44
Re: mdialog - modern dialog system - by ZiGGi - 17.09.2017, 15:23
Re: mdialog - modern dialog system - by Tort - 17.09.2017, 17:53
Re: mdialog - modern dialog system - by Paulice - 20.09.2017, 04:03
Re: mdialog - modern dialog system - by Cyuan - 22.09.2017, 04:43

Forum Jump:


Users browsing this thread: 1 Guest(s)