Upload files to "src/openonyx/theme"
This commit is contained in:
1 parent
a6ef66bbfb
commit
c45e518c50
5 files changed
+307
No files matched your search
@@ -0,0 +1,51 @@
|
|||||||
|
package openonyx.theme;
|
||||||
|
|
||||||
|
import openonyx.render.group_e.FontFamilyMode;
|
||||||
|
import openonyx.render.group_e.FontStyle;
|
||||||
|
import openonyx.render.group_e.TargetHudTextSettingsWeightMode;
|
||||||
|
|
||||||
|
public final class Fonts {
|
||||||
|
public static final FontStyle FONT_STYLE = new FontStyle(FontFamilyMode.PT72, TargetHudTextSettingsWeightMode.REGULAR, 36.0F, 44.0F);
|
||||||
|
public static final FontStyle FONT_STYLE2 = new FontStyle(FontFamilyMode.PT9, TargetHudTextSettingsWeightMode.MEDIUM, 11.0F, 16.0F);
|
||||||
|
public static final FontStyle FONT_STYLE3 = new FontStyle(FontFamilyMode.PT120, TargetHudTextSettingsWeightMode.REGULAR, 57.0F, 64.0F);
|
||||||
|
public static final FontStyle FONT_STYLE4 = new FontStyle(FontFamilyMode.PT36, TargetHudTextSettingsWeightMode.REGULAR, 24.0F, 32.0F);
|
||||||
|
public static final FontStyle FONT_STYLE5 = new FontStyle(FontFamilyMode.PT24, TargetHudTextSettingsWeightMode.MEDIUM, 16.0F, 24.0F);
|
||||||
|
public static final FontStyle FONT_STYLE6 = new FontStyle(FontFamilyMode.PT72, TargetHudTextSettingsWeightMode.REGULAR, 28.0F, 36.0F);
|
||||||
|
public static final FontStyle FONT_STYLE7 = new FontStyle(FontFamilyMode.PT24, TargetHudTextSettingsWeightMode.REGULAR, 14.0F, 20.0F);
|
||||||
|
public static final FontStyle FONT_STYLE8 = new FontStyle(FontFamilyMode.PT9, TargetHudTextSettingsWeightMode.MEDIUM, 10.0F, 12.0F);
|
||||||
|
public static final FontStyle FONT_STYLE9 = new FontStyle(FontFamilyMode.PT9, TargetHudTextSettingsWeightMode.MEDIUM, 11.0F, 14.0F);
|
||||||
|
public static final FontStyle FONT_STYLE10 = new FontStyle(FontFamilyMode.PT24, TargetHudTextSettingsWeightMode.REGULAR, 16.0F, 24.0F);
|
||||||
|
public static final FontStyle FONT_STYLE11 = new FontStyle(FontFamilyMode.PT9, TargetHudTextSettingsWeightMode.MEDIUM, 9.0F, 12.0F);
|
||||||
|
public static final FontStyle FONT_STYLE12 = new FontStyle(FontFamilyMode.PT24, TargetHudTextSettingsWeightMode.MEDIUM, 11.0F, 14.0F);
|
||||||
|
public static final FontStyle FONT_STYLE13 = new FontStyle(FontFamilyMode.PT9, TargetHudTextSettingsWeightMode.MEDIUM, 8.0F, 10.0F);
|
||||||
|
public static final FontStyle FONT_STYLE14 = new FontStyle(FontFamilyMode.PT24, TargetHudTextSettingsWeightMode.MEDIUM, 14.0F, 20.0F);
|
||||||
|
public static final FontStyle FONT_STYLE15 = new FontStyle(FontFamilyMode.PT9, TargetHudTextSettingsWeightMode.REGULAR, 12.0F, 16.0F);
|
||||||
|
public static final FontStyle FONT_STYLE16 = new FontStyle(FontFamilyMode.PT9, TargetHudTextSettingsWeightMode.MEDIUM, 12.0F, 16.0F);
|
||||||
|
public static final FontStyle FONT_STYLE17 = new FontStyle(FontFamilyMode.PT36, TargetHudTextSettingsWeightMode.REGULAR, 22.0F, 28.0F);
|
||||||
|
public static final FontStyle FONT_STYLE18 = new FontStyle(FontFamilyMode.PT24, TargetHudTextSettingsWeightMode.MEDIUM, 14.0F, 20.0F);
|
||||||
|
public static final FontStyle FONT_STYLE19 = new FontStyle(FontFamilyMode.PT120, TargetHudTextSettingsWeightMode.REGULAR, 45.0F, 52.0F);
|
||||||
|
public static final FontStyle FONT_STYLE20 = new FontStyle(FontFamilyMode.PT72, TargetHudTextSettingsWeightMode.REGULAR, 32.0F, 40.0F);
|
||||||
|
|
||||||
|
public static FontStyle getFontstylE18() {
|
||||||
|
return FONT_STYLE18;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FontStyle getFontstylE2() {
|
||||||
|
return FONT_STYLE2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FontStyle getFontstylE16() {
|
||||||
|
return FONT_STYLE16;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FontStyle getFontstylE14() {
|
||||||
|
return FONT_STYLE14;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static FontStyle getFontstylE15() {
|
||||||
|
return FONT_STYLE15;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Fonts() {
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
package openonyx.theme;
|
||||||
|
|
||||||
|
import openonyx.theme.internal.ColorUtils;
|
||||||
|
import openonyx.theme.internal.Hct;
|
||||||
|
import openonyx.theme.internal.TonalPalette;
|
||||||
|
|
||||||
|
public record Palette(
|
||||||
|
int primary,
|
||||||
|
int onPrimary,
|
||||||
|
int primaryContainer,
|
||||||
|
int onPrimaryContainer,
|
||||||
|
int secondary,
|
||||||
|
int onSecondary,
|
||||||
|
int secondaryContainer,
|
||||||
|
int onSecondaryContainer,
|
||||||
|
int tertiary,
|
||||||
|
int onTertiary,
|
||||||
|
int tertiaryContainer,
|
||||||
|
int onTertiaryContainer,
|
||||||
|
int error,
|
||||||
|
int onError,
|
||||||
|
int errorContainer,
|
||||||
|
int onErrorContainer,
|
||||||
|
int surface,
|
||||||
|
int onSurface,
|
||||||
|
int surfaceVariant,
|
||||||
|
int onSurfaceVariant,
|
||||||
|
int x,
|
||||||
|
int surfaceBright,
|
||||||
|
int surfaceContainerLowest,
|
||||||
|
int y,
|
||||||
|
int surfaceContainer,
|
||||||
|
int surfaceContainerHigh,
|
||||||
|
int surfaceContainerHighest,
|
||||||
|
int outline,
|
||||||
|
int outlineVariant,
|
||||||
|
int inverseSurface,
|
||||||
|
int inverseOnSurface,
|
||||||
|
int inversePrimary,
|
||||||
|
int scrim,
|
||||||
|
int shadow
|
||||||
|
) {
|
||||||
|
private static final double t = 36.0;
|
||||||
|
private static final double G = 56.0;
|
||||||
|
private static final double D = 30.0;
|
||||||
|
private static final double I = 50.0;
|
||||||
|
private static final double e = 64.0;
|
||||||
|
|
||||||
|
public static Palette L(int i, float f) {
|
||||||
|
int j = i;
|
||||||
|
Hct hct;
|
||||||
|
float[] g;
|
||||||
|
return L((hct = Hct.L(ColorUtils.hsvToArgb((g = ColorUtils.toRgbFloats(j))[0], g[1], 1.0F, 255))).D(), hct.L(), g[1], g[2], f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static double L(double d, double e) {
|
||||||
|
return Math.clamp(d - ex * d / 100.0, 0.0, 100.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Palette L(double d, double e, float f, float g, float h) {
|
||||||
|
double i = Math.clamp(h, 0.0F, 1.0F) * Math.clamp(f, 0.0F, 1.0F);
|
||||||
|
double j;
|
||||||
|
double k = (j = 1.0 - Math.clamp(g, 0.0F, 1.0F)) * 30.0;
|
||||||
|
j *= 50.0;
|
||||||
|
TonalPalette tonalPalette3 = TonalPalette.L(d, ex);
|
||||||
|
TonalPalette tonalPalette4 = TonalPalette.L(d, ex / 3.0);
|
||||||
|
TonalPalette tonalPalette5 = TonalPalette.L(d + 60.0, ex / 2.0);
|
||||||
|
TonalPalette tonalPalette2 = TonalPalette.L(d, 36.0 * i);
|
||||||
|
TonalPalette tonalPalette1 = TonalPalette.L(d, 56.0 * i);
|
||||||
|
TonalPalette tonalPalette = TonalPalette.L(d, 64.0 * i);
|
||||||
|
TonalPalette tonalPalette6 = TonalPalette.L(25.0, 84.0);
|
||||||
|
return new Palette(
|
||||||
|
tonalPalette3.L(L(80.0, k)),
|
||||||
|
tonalPalette3.L(20),
|
||||||
|
tonalPalette3.L(L(30.0, k)),
|
||||||
|
tonalPalette3.L(90),
|
||||||
|
tonalPalette4.L(L(80.0, k)),
|
||||||
|
tonalPalette4.L(20),
|
||||||
|
tonalPalette4.L(L(30.0, k)),
|
||||||
|
tonalPalette4.L(90),
|
||||||
|
tonalPalette5.L(L(80.0, k)),
|
||||||
|
tonalPalette5.L(20),
|
||||||
|
tonalPalette5.L(L(30.0, k)),
|
||||||
|
tonalPalette5.L(90),
|
||||||
|
tonalPalette6.L(80),
|
||||||
|
tonalPalette6.L(20),
|
||||||
|
tonalPalette6.L(30),
|
||||||
|
tonalPalette6.L(90),
|
||||||
|
tonalPalette1.L(L(6.0, j)),
|
||||||
|
tonalPalette2.L(90),
|
||||||
|
tonalPalette.L(L(30.0, j)),
|
||||||
|
tonalPalette.L(80),
|
||||||
|
tonalPalette1.L(L(6.0, j)),
|
||||||
|
tonalPalette1.L(L(24.0, j)),
|
||||||
|
tonalPalette1.L(L(4.0, j)),
|
||||||
|
tonalPalette1.L(L(10.0, j)),
|
||||||
|
tonalPalette1.L(L(12.0, j)),
|
||||||
|
tonalPalette1.L(L(17.0, j)),
|
||||||
|
tonalPalette1.L(L(22.0, j)),
|
||||||
|
tonalPalette.L(L(60.0, j)),
|
||||||
|
tonalPalette.L(L(30.0, j)),
|
||||||
|
tonalPalette2.L(90),
|
||||||
|
tonalPalette2.L(20),
|
||||||
|
tonalPalette3.L(L(40.0, k)),
|
||||||
|
tonalPalette2.L(0),
|
||||||
|
tonalPalette2.L(0)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package openonyx.theme;
|
||||||
|
|
||||||
|
import openonyx.theme.internal.ColorUtils;
|
||||||
|
|
||||||
|
public final class ThemeManager {
|
||||||
|
private static int accentColor = -10006364;
|
||||||
|
public static final float L = 0.12F;
|
||||||
|
public static final float j = 0.25F;
|
||||||
|
public static final float m = 0.1F;
|
||||||
|
private static Palette palette = Palette.L(-10006364, 0.25F);
|
||||||
|
public static final float l = 0.08F;
|
||||||
|
public static final float I = 0.38F;
|
||||||
|
private static float uiScale = 1.0F;
|
||||||
|
public static final float i = 0.16F;
|
||||||
|
public static final int f = -10006364;
|
||||||
|
private static float H = 0.25F;
|
||||||
|
public static final float e = 0.1F;
|
||||||
|
|
||||||
|
public static float getUiScale() {
|
||||||
|
return uiScale;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Palette getPalette() {
|
||||||
|
return palette;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void d(float f) {
|
||||||
|
H = Math.clamp(fx, 0.0F, 1.0F);
|
||||||
|
palette = Palette.L(accentColor, H);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static float L() {
|
||||||
|
return H;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getAccentColor() {
|
||||||
|
return accentColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setUiScale(float f) {
|
||||||
|
uiScale = Math.clamp(fx, 0.3F, 1.5F);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int scrim(float f) {
|
||||||
|
return withAlpha(palette.scrim(), fx);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int disabled(int i) {
|
||||||
|
return withAlpha(ix, 0.38F);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ThemeManager() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setAccentColor(int i) {
|
||||||
|
accentColor = ix | 0xFF000000;
|
||||||
|
palette = Palette.L(accentColor, H);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int stateColor(int i, boolean bl, boolean bl1) {
|
||||||
|
if (bl1) {
|
||||||
|
return withAlpha(ix, 0.1F);
|
||||||
|
} else {
|
||||||
|
return bl ? withAlpha(ix, 0.08F) : 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int withAlpha(int i, float f) {
|
||||||
|
return ColorUtils.withAlpha(ix, fx);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
package openonyx.theme;
|
||||||
|
|
||||||
|
public final class ThemeSupport_056 {
|
||||||
|
public static final float c = 50.0F;
|
||||||
|
public static final float a = 350.0F;
|
||||||
|
public static final float k = 450.0F;
|
||||||
|
public static final float g = 400.0F;
|
||||||
|
public static final float M = 700.0F;
|
||||||
|
public static final float L = 200.0F;
|
||||||
|
public static final float j = 550.0F;
|
||||||
|
public static final float m = 300.0F;
|
||||||
|
public static final float h = 800.0F;
|
||||||
|
public static final float l = 1000.0F;
|
||||||
|
public static final float I = 500.0F;
|
||||||
|
public static final float d = 600.0F;
|
||||||
|
public static final float i = 900.0F;
|
||||||
|
public static final float f = 150.0F;
|
||||||
|
public static final float H = 250.0F;
|
||||||
|
public static final float e = 100.0F;
|
||||||
|
|
||||||
|
private ThemeSupport_056() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String decrypt(String string) {
|
||||||
|
String string1 = string;
|
||||||
|
int n = --4 << 3;
|
||||||
|
String string2;
|
||||||
|
int p = (string2 = string1).length();
|
||||||
|
char[] ex = new char[p];
|
||||||
|
boolean bl = true;
|
||||||
|
int jx;
|
||||||
|
int o = jx = p - 1;
|
||||||
|
char[] cx = ex;
|
||||||
|
byte b = 18;
|
||||||
|
byte dx = 109;
|
||||||
|
int kx = o;
|
||||||
|
int ix = n;
|
||||||
|
|
||||||
|
while (kx >= 0) {
|
||||||
|
int lx = jx;
|
||||||
|
int mx = string2.charAt(jx);
|
||||||
|
jx--;
|
||||||
|
cx[lx] = (char)(mx ^ ix);
|
||||||
|
if (jx < 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
mx = jx--;
|
||||||
|
cx[mx] = (char)(string2.charAt(mx) ^ b);
|
||||||
|
kx = jx;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new String(cx);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package openonyx.theme;
|
||||||
|
|
||||||
|
public final class ThemeSupport_058 {
|
||||||
|
public static final float j = 32.0F;
|
||||||
|
public static final float m = 12.0F;
|
||||||
|
public static final float h = 28.0F;
|
||||||
|
public static final float l = 0.0F;
|
||||||
|
public static final float I = 48.0F;
|
||||||
|
public static final float d = 4.0F;
|
||||||
|
public static final float i = 16.0F;
|
||||||
|
public static final float f = 8.0F;
|
||||||
|
public static final float H = 20.0F;
|
||||||
|
public static final float e = Float.MAX_VALUE;
|
||||||
|
|
||||||
|
private ThemeSupport_058() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static float L(float f, float g, float h) {
|
||||||
|
return Math.min(fx, Math.min(g, hx) / 2.0F);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user