ui border, fixes

This commit is contained in:
Sen 2025-03-20 15:33:08 +01:00
parent a378c69d26
commit 5300c9e4fc
18 changed files with 150 additions and 149 deletions

View file

@ -7,7 +7,7 @@ import game.vars.Variable;
import game.vars.Variable.IntType;
public enum Style implements IStringSerializable, Displayable {
DEFAULT("default", "Glänzend (Standard)"), GRAY("gray", "Grau"), BLUE("blue", "Blau"), CUSTOM("custom", "Angepasst");
DEFAULT("default", "Standard"), SHINY("shiny", "Glänzend"), GRAY("gray", "Grau"), BLUE("blue", "Blau"), CUSTOM("custom", "Angepasst");
public final String id;
public final String name;
@ -17,69 +17,52 @@ public enum Style implements IStringSerializable, Displayable {
this.name = name;
}
@Variable(type = IntType.COLOR, name = "color_border_top", category = CVarCategory.STYLE, display = "Umrahmung")
@Variable(type = IntType.COLOR, name = "color_border_top", category = CVarCategory.STYLE, display = "Umrahmung oben / l.")
public int brdr_top;
@Variable(type = IntType.COLOR, name = "color_border_btm", category = CVarCategory.STYLE)
@Variable(type = IntType.COLOR, name = "color_border_btm", category = CVarCategory.STYLE, display = "Umrahmung unten / r.")
public int brdr_btm;
@Variable(type = IntType.COLOR, name = "color_button_top", category = CVarCategory.STYLE, display = "Knopf")
@Variable(type = IntType.COLOR, name = "color_button_top", category = CVarCategory.STYLE, display = "Knopf oben")
public int fill_top;
@Variable(type = IntType.COLOR, name = "color_button_btm", category = CVarCategory.STYLE)
@Variable(type = IntType.COLOR, name = "color_button_btm", category = CVarCategory.STYLE, display = "Knopf unten")
public int fill_btm;
@Variable(type = IntType.COLOR, name = "color_textbox_top", category = CVarCategory.STYLE, display = "Textfeld")
@Variable(type = IntType.COLOR, name = "color_textbox_top", category = CVarCategory.STYLE, display = "Textfeld oben")
public int field_top;
@Variable(type = IntType.COLOR, name = "color_textbox_btm", category = CVarCategory.STYLE)
@Variable(type = IntType.COLOR, name = "color_textbox_btm", category = CVarCategory.STYLE, display = "Textfeld unten")
public int field_btm;
@Variable(type = IntType.COLOR, name = "color_label_text", category = CVarCategory.STYLE, display = "Beschriftung")
public int text_label;
@Variable(type = IntType.COLOR, name = "color_button_text", category = CVarCategory.STYLE, display = "Text Knopf")
@Variable(type = IntType.COLOR, name = "color_button_text", category = CVarCategory.STYLE, display = "Knopf Text")
public int text_base;
@Variable(type = IntType.COLOR, name = "color_textbox_text", category = CVarCategory.STYLE, display = "Textfeld Text")
public int text_field;
@Variable(type = IntType.COLOR, name = "color_background_t", category = CVarCategory.STYLE, display = "Hintergrund")
public int bg_top;
@Variable(type = IntType.COLOR, name = "color_background_b", category = CVarCategory.STYLE)
public int bg_btm;
@Variable(type = IntType.ALPHA, name = "color_press", category = CVarCategory.STYLE, display = "Gedrückt")
public int press;
@Variable(type = IntType.ALPHA, name = "color_hover", category = CVarCategory.STYLE, display = "Gewählt")
public int hover;
@Variable(type = IntType.ALPHA, name = "color_select", category = CVarCategory.STYLE, display = "Textauswahl")
public int select;
@Variable(type = IntType.ALPHA, name = "color_cursor", category = CVarCategory.STYLE, display = "Textmarke")
public int cursor;
static {
DEFAULT
.border(0xa0a0a0, 0x202020)
.base(0x606060, 0x404040, 0xffffff, 0xefefef)
.field(0x000000, 0x101010, 0xffffff);
SHINY
.border(0xffffff, 0x3f3f3f)
.background(0x000000, 0x000000)
.base(0x404040, 0x000000, 0xffffff, 0xefefef)
.field(0x000000, 0x202020, 0xdfdfdf)
.select(0x30ffffff, 0x28ffffff, 0x60dfdfdf, 0xffffffff);
.field(0x000000, 0x202020, 0xdfdfdf);
GRAY
.border(0x000000, 0x202020)
.background(0x404040, 0x0a0a0a)
.base(0x808080, 0x000000, 0xffffff, 0xffffff)
.field(0x404040, 0x808080, 0xffffff)
.select(0x18ffffff, 0x288080ff, 0x808080ff, 0xff000000);
.field(0x404040, 0x808080, 0xffffff);
BLUE
.border(0x0000df, 0x300020)
.background(0x20208f, 0x0a0a2d)
.base(0x2020a0, 0x000020, 0x8fffaf, 0x00cfaf)
.field(0x505090, 0x406060, 0xcfdfff)
.select(0x288f00ff, 0x28c080ff, 0x604020ff, 0xff2fff6f);
.field(0x505090, 0x406060, 0xcfdfff);
CUSTOM
.border(0x000000, 0x000000)
.background(0x404040, 0x404040)
.base(0x808080, 0x808080, 0xffffff, 0xffffff)
.field(0x808080, 0x808080, 0xffffff)
.select(0x18ffffff, 0x288080ff, 0x808080ff, 0xff000000);
.field(0x808080, 0x808080, 0xffffff);
}
private Style border(int top, int btm) {
@ -88,12 +71,6 @@ public enum Style implements IStringSerializable, Displayable {
return this;
}
private Style background(int top, int btm) {
this.bg_top = top | 0xff000000;
this.bg_btm = btm | 0xff000000;
return this;
}
private Style base(int top, int btm, int text, int label) {
this.fill_top = top | 0xff000000;
this.fill_btm = btm | 0xff000000;
@ -109,14 +86,6 @@ public enum Style implements IStringSerializable, Displayable {
return this;
}
private Style select(int prs, int hov, int sel, int cur) {
this.press = prs;
this.hover = hov;
this.select = sel;
this.cursor = cur;
return this;
}
public String getName() {
return this.id;
}
@ -124,4 +93,11 @@ public enum Style implements IStringSerializable, Displayable {
public String getDisplay() {
return this.name;
}
public void copyToCustom() {
CUSTOM
.border(this.brdr_top, this.brdr_btm)
.base(this.fill_top, this.fill_btm, this.text_base, this.text_label)
.field(this.field_top, this.field_btm, this.text_field);
}
}