fancydialog, docs: Update example dialog

This commit is contained in:
Oliver
2025-06-21 15:01:03 +02:00
parent 531e3a4ab3
commit 1067ffa635
2 changed files with 6 additions and 6 deletions

View File

@@ -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>"
} }
] ]
} }

View File

@@ -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>")
) )
) )
) )