mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancydialog, docs: Update example dialog
This commit is contained in:
@@ -43,7 +43,7 @@ FancyDialogs uses a simple JSON format to define dialogs. Here is an example of
|
|||||||
"key": "fav_color",
|
"key": "fav_color",
|
||||||
"order": 1,
|
"order": 1,
|
||||||
"label": "<color:#ff7300>What is your favorite color?</color>",
|
"label": "<color:#ff7300>What is your favorite color?</color>",
|
||||||
"placeholder": "Gold",
|
"placeholder": "gold",
|
||||||
"maxLength": 50,
|
"maxLength": 50,
|
||||||
"maxLines": 1
|
"maxLines": 1
|
||||||
}
|
}
|
||||||
@@ -51,12 +51,12 @@ FancyDialogs uses a simple JSON format to define dialogs. Here is an example of
|
|||||||
},
|
},
|
||||||
"buttons": [
|
"buttons": [
|
||||||
{
|
{
|
||||||
"label": "Visit our website",
|
"label": "Show favorite color",
|
||||||
"tooltip": "Click to visit our website!",
|
"tooltip": "Click to show your favorite color",
|
||||||
"actions": [
|
"actions": [
|
||||||
{
|
{
|
||||||
"name": "message",
|
"name": "message",
|
||||||
"data": "Visit our website here: LINK TO WEBSITE"
|
"data": "Your favorite color is: <color:{fav_color}>{fav_color}</color>"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class DefaultDialogs {
|
|||||||
"fav_color",
|
"fav_color",
|
||||||
"<color:#ff7300>What is your favorite color?</color>",
|
"<color:#ff7300>What is your favorite color?</color>",
|
||||||
1,
|
1,
|
||||||
"Gold",
|
"gold",
|
||||||
50,
|
50,
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
@@ -64,7 +64,7 @@ public class DefaultDialogs {
|
|||||||
"<color:#ffd000>Show favourite color</color>",
|
"<color:#ffd000>Show favourite color</color>",
|
||||||
"<color:#ff4f19>Click to show your fav color :D</color>",
|
"<color:#ff4f19>Click to show your fav color :D</color>",
|
||||||
List.of(
|
List.of(
|
||||||
new DialogButton.DialogAction("message", "Your favorite color is: {fav_color}")
|
new DialogButton.DialogAction("message", "Your favorite color is: <color:{fav_color}>{fav_color}</color>")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user