From aedb35b546e2a76b0712fc2a70e297bebc0fdb73 Mon Sep 17 00:00:00 2001 From: winterflyt <36+winterflyt@noreply.skidsolutions.xyz> Date: Mon, 30 Nov 2026 05:51:24 +0200 Subject: [PATCH] Upload files to "src/openonyx/features/hud/group_d" --- .../features/hud/group_d/Notification.java | 7 ++ .../hud/group_d/NotificationLevel.java | 68 +++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 src/openonyx/features/hud/group_d/Notification.java create mode 100644 src/openonyx/features/hud/group_d/NotificationLevel.java diff --git a/src/openonyx/features/hud/group_d/Notification.java b/src/openonyx/features/hud/group_d/Notification.java new file mode 100644 index 0000000..d2d3c87 --- /dev/null +++ b/src/openonyx/features/hud/group_d/Notification.java @@ -0,0 +1,7 @@ +package openonyx.features.hud.group_d; + +public record Notification(String title, String message, NotificationLevel level, Integer accent) { + public Notification(String string, String string1, NotificationLevel notificationLevel) { + this(string, string1, notificationLevel, null); + } +} diff --git a/src/openonyx/features/hud/group_d/NotificationLevel.java b/src/openonyx/features/hud/group_d/NotificationLevel.java new file mode 100644 index 0000000..c86265f --- /dev/null +++ b/src/openonyx/features/hud/group_d/NotificationLevel.java @@ -0,0 +1,68 @@ +package openonyx.features.hud.group_d; + +import openonyx.history.DisplayNamed; +import openonyx.theme.Palette; + +public enum NotificationLevel implements DisplayNamed { + SUCCESS("Success"), + ERROR("Error"), + INFO("Info"), + WARNING("Warning"); + + private final String d; + + private static NotificationLevel[] L() { + NotificationLevel[] notificationLevels = new NotificationLevel[4]; + boolean bl = true; + notificationLevels[0] = INFO; + notificationLevels[1] = SUCCESS; + notificationLevels[2] = WARNING; + notificationLevels[3] = ERROR; + return notificationLevels; + } + + NotificationLevel(String string1) { + this.d = string1; + } + + @Override + public String getDisplayName() { + return this.d; + } + + public String d() { + switch (this) { + case SUCCESS: + while (false) { + } + + return "\ue88e"; + case ERROR: + return "\ue5ca"; + case INFO: + return "\ue002"; + case WARNING: + return "\ue001"; + default: + throw new MatchException(null, null); + } + } + + public int L(Palette palette) { + switch (this) { + case SUCCESS: + while (false) { + } + + return palette.primary(); + case ERROR: + return palette.tertiary(); + case INFO: + return palette.secondary(); + case WARNING: + return palette.error(); + default: + throw new MatchException(null, null); + } + } +}