mirror of
https://github.com/FancyInnovations/FancyPlugins.git
synced 2025-12-06 07:43:36 +00:00
fancydialogs: Add Button, ClickAction, and ClickEvent classes for dialog interactions
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package com.fancyinnovations.fancydialogs.api.click;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public record Button(
|
||||
@NotNull String label,
|
||||
@Nullable String tooltip,
|
||||
int width
|
||||
) {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.fancyinnovations.fancydialogs.api.click;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public record ClickAction(
|
||||
@NotNull Button button,
|
||||
@Nullable ClickEvent onClick
|
||||
) {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.fancyinnovations.fancydialogs.api.click;
|
||||
|
||||
public enum ClickEvent {
|
||||
OPEN_URL,
|
||||
OPEN_FILE,
|
||||
RUN_COMMAND,
|
||||
SUGGEST_COMMAND,
|
||||
SHOW_DIALOG,
|
||||
CHANGE_PAGE,
|
||||
COPY_TO_CLIPBOARD,
|
||||
CUSTOM,
|
||||
}
|
||||
Reference in New Issue
Block a user