mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancydialogs: One title is enough
This commit is contained in:
@@ -27,7 +27,6 @@ public class ConfirmationDialog {
|
|||||||
this.dialogData = new DialogData(
|
this.dialogData = new DialogData(
|
||||||
"confirmation_dialog_" + UUID.randomUUID(),
|
"confirmation_dialog_" + UUID.randomUUID(),
|
||||||
this.title,
|
this.title,
|
||||||
this.title,
|
|
||||||
false,
|
false,
|
||||||
List.of(
|
List.of(
|
||||||
new DialogBodyData(this.question)
|
new DialogBodyData(this.question)
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ public class NoticeDialog {
|
|||||||
this.dialogData = new DialogData(
|
this.dialogData = new DialogData(
|
||||||
"notice_dialog_" + UUID.randomUUID(),
|
"notice_dialog_" + UUID.randomUUID(),
|
||||||
this.title,
|
this.title,
|
||||||
this.title,
|
|
||||||
true,
|
true,
|
||||||
List.of(
|
List.of(
|
||||||
new DialogBodyData(this.text)
|
new DialogBodyData(this.text)
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
package com.fancyinnovations.fancydialogs.api.data;
|
package com.fancyinnovations.fancydialogs.api.data;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public record DialogData(
|
public record DialogData(
|
||||||
@NotNull String id,
|
@NotNull String id,
|
||||||
@NotNull String title,
|
@NotNull String title,
|
||||||
@Nullable String externalTitle,
|
|
||||||
boolean canCloseWithEscape,
|
boolean canCloseWithEscape,
|
||||||
@NotNull List<DialogBodyData> body,
|
@NotNull List<DialogBodyData> body,
|
||||||
@NotNull List<DialogButton> buttons
|
@NotNull List<DialogButton> buttons
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class DialogImpl extends Dialog {
|
|||||||
this.fsDialog = new FS_MultiActionDialog(
|
this.fsDialog = new FS_MultiActionDialog(
|
||||||
new FS_CommonDialogData(
|
new FS_CommonDialogData(
|
||||||
data.title(),
|
data.title(),
|
||||||
data.externalTitle(),
|
data.title(),
|
||||||
data.canCloseWithEscape(),
|
data.canCloseWithEscape(),
|
||||||
false,
|
false,
|
||||||
FS_DialogAction.CLOSE,
|
FS_DialogAction.CLOSE,
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ public class DefaultDialogs {
|
|||||||
DialogData data = new DialogData(
|
DialogData data = new DialogData(
|
||||||
"welcome_to_fancydialogs_dialog",
|
"welcome_to_fancydialogs_dialog",
|
||||||
"Welcome to FancyDialogs",
|
"Welcome to FancyDialogs",
|
||||||
"Welcome to FancyDialogs",
|
|
||||||
false,
|
false,
|
||||||
List.of(
|
List.of(
|
||||||
new DialogBodyData("Welcome to FancyDialogs! This is a sample dialog to get you started.")
|
new DialogBodyData("Welcome to FancyDialogs! This is a sample dialog to get you started.")
|
||||||
|
|||||||
Reference in New Issue
Block a user