File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed
src/main/java/com/cleanroommc/modularui Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -685,7 +685,7 @@ private static Class<?> getGuiActionClass(IGuiAction action) {
685685
686686 public ITheme getCurrentTheme () {
687687 if (this .currentTheme == null ) {
688- useTheme (null );
688+ useTheme (this . context . getUISettings (). getTheme () );
689689 }
690690 return this .currentTheme ;
691691 }
Original file line number Diff line number Diff line change 99import net .minecraft .util .math .BlockPos ;
1010
1111import org .jetbrains .annotations .ApiStatus ;
12+ import org .jetbrains .annotations .Nullable ;
1213
1314import java .util .function .Predicate ;
1415import java .util .function .Supplier ;
@@ -19,6 +20,7 @@ public class UISettings {
1920
2021 private Supplier <ModularContainer > containerSupplier ;
2122 private Predicate <EntityPlayer > canInteractWith ;
23+ private String theme ;
2224 private final RecipeViewerSettings recipeViewerSettings ;
2325
2426 public UISettings () {
@@ -77,6 +79,10 @@ public void canInteractWithinDefaultRange(PosGuiData guiData) {
7779 canInteractWithinRange (guiData , DEFAULT_INTERACT_RANGE );
7880 }
7981
82+ public void useTheme (String theme ) {
83+ this .theme = theme ;
84+ }
85+
8086 public RecipeViewerSettings getRecipeViewerSettings () {
8187 return recipeViewerSettings ;
8288 }
@@ -93,4 +99,8 @@ public boolean hasContainer() {
9399 public boolean canPlayerInteractWithUI (EntityPlayer player ) {
94100 return canInteractWith == null || canInteractWith .test (player );
95101 }
102+
103+ public @ Nullable String getTheme () {
104+ return theme ;
105+ }
96106}
Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ public class EventHandler {
3232 .selectedColor (Color .WHITE .main )
3333 .selectedIconColor (Color .RED .brighter (0 )))
3434 .widgetThemeHover (IThemeApi .TOGGLE_BUTTON , new SelectableTheme .Builder <>()
35- .selectedIconColor (Color .DEEP_PURPLE .brighter (0 )));
35+ .selectedIconColor (Color .DEEP_PURPLE .brighter (0 )))
36+ .textColor (IThemeApi .TEXT_FIELD , Color .DEEP_PURPLE .main );
3637
3738 private static final IIcon tooltipLine = new IDrawable () {
3839 @ Override
You can’t perform that action at this time.
0 commit comments