diff --git a/plugins/fancydialogs/dialog-exmaples/dialog-list.json b/plugins/fancydialogs/dialog-exmaples/dialog-list.json new file mode 100644 index 00000000..41162e42 --- /dev/null +++ b/plugins/fancydialogs/dialog-exmaples/dialog-list.json @@ -0,0 +1,42 @@ +{ + "type": "dialog_list", + "title": "Dialog List Dialog", + "body": [ + { + "type": "plain_message", + "contents": "Welcome to the server! Please read the rules carefully.", + "width": 200 + }, + { + "type": "plain_message", + "contents": "The rules are: blah blah blah.", + "width": 400 + } + ], + "dialogs": [ + { + "type": "notice", + "title": "Rules", + "external_title": "Go to rules dialog", + "body": [ + { + "type": "plain_message", + "contents": "Some important information 1.", + "width": 200 + } + ] + }, + { + "type": "notice", + "title": "Notice Dialog 2", + "external_title": "Go to dialog 2", + "body": [ + { + "type": "plain_message", + "contents": "ome important information 2.", + "width": 200 + } + ] + } + ] +} \ No newline at end of file diff --git a/plugins/fancydialogs/dialog-exmaples/multi-action.json b/plugins/fancydialogs/dialog-exmaples/multi-action.json new file mode 100644 index 00000000..5bdfab7b --- /dev/null +++ b/plugins/fancydialogs/dialog-exmaples/multi-action.json @@ -0,0 +1,42 @@ +{ + "type": "multi_action", + "title": "Multi Action Dialog", + "body": [ + { + "type": "plain_message", + "contents": "Welcome to the server! Please read the rules carefully.", + "width": 200 + }, + { + "type": "plain_message", + "contents": "The rules are: blah blah blah.", + "width": 400 + } + ], + "actions": [ + { + "label": "Action 1", + "id":"whatever", + "on_submit": { + "type": "command_template", + "template": "tellraw @a '$(example) $(extra1) $(extra2)'" + } + }, + { + "label": "Action 2", + "id":"whatever2", + "on_submit": { + "type": "command_template", + "template": "tellraw @a '$(example) $(extra1) $(extra2)'" + } + }, + { + "label": "Action 3", + "id":"whatever3", + "on_submit": { + "type": "command_template", + "template": "tellraw @a '$(example) $(extra1) $(extra2)'" + } + } + ] +} \ No newline at end of file diff --git a/plugins/fancydialogs/dialog-exmaples/notice.json b/plugins/fancydialogs/dialog-exmaples/notice.json new file mode 100644 index 00000000..fcdebcf4 --- /dev/null +++ b/plugins/fancydialogs/dialog-exmaples/notice.json @@ -0,0 +1,24 @@ +{ + "type": "notice", + "title": "Notice Dialog", + "body": [ + { + "type": "plain_message", + "contents": "Welcome to the server! Please read the rules carefully.", + "width": 200 + }, + { + "type": "plain_message", + "contents": "The rules are: blah blah blah.", + "width": 400 + } + ], + "action": { + "label": "Understood!", + "id":"whatever", + "on_submit": { + "type": "command_template", + "template": "tellraw @a '$(example) $(extra1) $(extra2)'" + } + } +} \ No newline at end of file diff --git a/plugins/fancydialogs/dialog-exmaples/simple-input-form.json b/plugins/fancydialogs/dialog-exmaples/simple-input-form.json new file mode 100644 index 00000000..ab39f30f --- /dev/null +++ b/plugins/fancydialogs/dialog-exmaples/simple-input-form.json @@ -0,0 +1,43 @@ +{ + "type": "simple_input_form", + "title": "Simple Input Form Dialog", + "inputs": [ + { + "type":"text", + "label": "Text input", + "key": "key1" + }, + { + "type":"boolean", + "label": "Checkbox", + "key": "key2" + }, + { + "type": "number_range", + "label": "Number Range", + "start": 50.0, + "end": 420.0, + "steps": 5, + "initial": 200.0, + "key": "key2" + }, + { + "type": "single_option", + "label": "Single Option", + "options": [ + {"id": "opt1", "display": "Option 1", "initial": true}, + {"id": "opt1", "display": "Option 2"}, + {"id": "opt1", "display": "Option 3"} + ], + "key": "key3" + } + ], + "action": { + "label": "Create!", + "id":"whatever", + "on_submit": { + "type": "command_template", + "template": "tellraw @a '$(example) $(extra1) $(extra2)'" + } + } +} \ No newline at end of file diff --git a/plugins/fancydialogs/src/README.md b/plugins/fancydialogs/src/README.md index 5d3ee377..36bec6dc 100644 --- a/plugins/fancydialogs/src/README.md +++ b/plugins/fancydialogs/src/README.md @@ -1,6 +1,6 @@
-![Banner](../../docs/src/static/logos-and-banners/fancydialogs-banner.png) +![Banner](../../../docs/src/static/logos-and-banners/fancydialogs-banner.png) [![Supports Folia](https://img.shields.io/badge/folia-supported-%23F9D879?labelColor=%2313154E&color=%234A44A6)](https://papermc.io/software/folia) [![Discord](https://img.shields.io/discord/899740810956910683?cacheSeconds=3600&logo=discord&logoColor=white&label=%20&labelColor=%235865F2&color=%23707BF4)](https://discord.gg/ZUgYCEJUEx)