Skip to content

Commit c58380c

Browse files
committed
fix
1 parent ff0a71c commit c58380c

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

src/main/java/com/cleanroommc/modularui/api/IThemeApi.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ public interface IThemeApi {
6464
WidgetThemeKey<SlotTheme> ITEM_SLOT_PLAYER_MAIN_INV = ITEM_SLOT_PLAYER.createSubKey("playerMainInventory");
6565
WidgetThemeKey<SlotTheme> ITEM_SLOT_PLAYER_OFFHAND = ITEM_SLOT_PLAYER.createSubKey("playerOffhand");
6666
WidgetThemeKey<SlotTheme> ITEM_SLOT_PLAYER_ARMOR = ITEM_SLOT_PLAYER.createSubKey("playerArmor");
67+
/* copy and paste into theme for testing
68+
"itemSlot:player": {
69+
"color": "#FF914354"
70+
},
71+
"itemSlot:playerHotbar": {
72+
"color": "#FF60917c"
73+
}
74+
*/
6775

6876
String HOVER_SUFFIX = ":hover";
6977

src/main/java/com/cleanroommc/modularui/drawable/Icon.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ public Box getMargin() {
4848
return this.margin;
4949
}
5050

51-
public int getColor() {
52-
return color;
53-
}
54-
5551
@SideOnly(Side.CLIENT)
5652
@Override
5753
public void draw(GuiContext context, int x, int y, int width, int height, WidgetTheme widgetTheme) {

src/main/java/com/cleanroommc/modularui/widgets/SchemaWidget.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import com.cleanroommc.modularui.api.widget.Interactable;
66
import com.cleanroommc.modularui.drawable.GuiTextures;
77
import com.cleanroommc.modularui.screen.viewport.ModularGuiContext;
8-
import com.cleanroommc.modularui.theme.WidgetTheme;
8+
import com.cleanroommc.modularui.theme.WidgetThemeEntry;
99
import com.cleanroommc.modularui.utils.MathUtils;
1010
import com.cleanroommc.modularui.utils.Vector3f;
1111
import com.cleanroommc.modularui.utils.fakeworld.BaseSchemaRenderer;
@@ -44,10 +44,10 @@ public SchemaWidget(BaseSchemaRenderer schema) {
4444
}
4545

4646
@Override
47-
public void draw(ModularGuiContext context, WidgetTheme widgetTheme) {
47+
public void draw(ModularGuiContext context, WidgetThemeEntry<?> widgetTheme) {
4848
Vec3d f = this.schema.getSchema().getFocus();
4949
this.schema.getCamera().setLookAtAndAngle((float) (f.x + this.offset.x), (float) (f.y + this.offset.y), (float) (f.z + this.offset.z), scale, yaw, pitch);
50-
this.schema.drawAtZero(context, getArea(), widgetTheme);
50+
this.schema.drawAtZero(context, getArea(), widgetTheme.getTheme());
5151
}
5252

5353
@Override
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
{
2-
"parent": "DEFAULT",
3-
"itemSlot:player": {
4-
"color": "#FF914354"
5-
},
6-
"itemSlot:player_hotbar": {
7-
"color": "#FF60917c"
8-
}
9-
}
2+
"parent": "DEFAULT"
3+
}

0 commit comments

Comments
 (0)