-
Notifications
You must be signed in to change notification settings - Fork 2
Dialogs
dev2alert edited this page Feb 4, 2022
·
1 revision
Home ▸ Dialogs
Showing the dialog by explicitly specifying the ID:
player.dialog({
id: 0,
caption: "Caption",
info: "Info",
buttons: ["Ok", "Cancel"],
style: DialogStyles.MSGBOX
});
Showing a dialog with a pre-generated ID:
const dialog = new Dialog({
caption: "Caption",
info: "Info",
buttons: ["Ok", "Cancel"],
style: DialogStyles.MSGBOX
});
// <...>
player.dialog(dialog);
// <...>
Before you start creating event handlers for responses from dialogs, you need to initialize their work:
Dialog.response.init();
Creating handler:
Dialog.response(dialog, (player, response) => {
if(response.response)
return;
// <...>
});
- Getting started [RU]
- Configuration [RU]
- Command line interface (CLI) [RU]
- Examples [RU]
- Player commands [RU]
- Keyboard [RU]
- Dialogs [RU]
- Groups [RU]
- Context API [RU]
- AMX API [RU]