Skip to content

Commit

Permalink
:servernotforrendering:
Browse files Browse the repository at this point in the history
move draw calls to a more appropriate method
  • Loading branch information
ghzdude committed Mar 7, 2024
1 parent ffd5fa9 commit f66cf3b
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package gregtech.common.mui.widget.orefilter;

import com.cleanroommc.modularui.theme.WidgetTheme;

import gregtech.api.mui.GTGuiTextures;
import gregtech.api.unification.OreDictUnifier;
import gregtech.api.util.function.BooleanConsumer;
Expand Down Expand Up @@ -105,14 +107,14 @@ public void updatePreview() {
}

@Override
public void drawForeground(GuiContext context) {
super.drawForeground(context);
public void draw(GuiContext context, WidgetTheme widgetTheme) {
super.draw(context, widgetTheme);
if (this.matchSuccess) {
GTGuiTextures.OREDICT_MATCH.draw(context, this.getArea().x + 12, this.getArea().y - 2, 9, 6,
getWidgetTheme(context.getTheme()));
GTGuiTextures.OREDICT_MATCH
.draw(context, 12, -2, 9, 6, widgetTheme);
} else if (testResult.size() > 0) {
GTGuiTextures.OREDICT_NO_MATCH.draw(context, this.getArea().x + 12, this.getArea().y - 3, 7, 7,
getWidgetTheme(context.getTheme()));
GTGuiTextures.OREDICT_NO_MATCH
.draw(context, 12,-3,7, 7, widgetTheme);
}
}

Expand Down

0 comments on commit f66cf3b

Please sign in to comment.