Skip to content

Commit

Permalink
Textures Update (#7966)
Browse files Browse the repository at this point in the history
- Added Hover/Focus split on Buttons
- Updated 2 Tab Buttons to show the BACK Icon
- Updated the Creative colour palette for the Energy Cell and Cell
Housing
- Better blending on some GUI Elements (Upgrade and Tool Panel)
  • Loading branch information
Ridanisaurus committed Jun 24, 2024
1 parent 40583e4 commit 05f15aa
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/main/java/appeng/client/gui/Icon.java
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ public enum Icon {
HORIZONTAL_TAB_FOCUS(150, 128, 22, 22),
BACKGROUND_BLANK_PATTERN(240, 128),
TOOLBAR_BUTTON_BACKGROUND(176, 128, 18, 20),
TOOLBAR_BUTTON_BACKGROUND_HOVER(208, 128, 18, 20),
TOOLBAR_BUTTON_BACKGROUND_FOCUS(194, 128, 18, 20),
TOOLBAR_BUTTON_BACKGROUND_HOVER(212, 128, 18, 20),

// ROW 9
ACCESS_WRITE(0, 144),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import appeng.client.gui.AEBaseScreen;
import appeng.client.gui.AESubScreen;
import appeng.client.gui.ICompositeWidget;
import appeng.client.gui.Icon;
import appeng.client.gui.widgets.AECheckbox;
import appeng.client.gui.widgets.TabButton;
import appeng.menu.AEBaseMenu;
Expand All @@ -38,7 +39,7 @@ public KeyTypeSelectionScreen(P parent, ISubMenuHost subMenuHost, Component dial
private void addBackButton(ISubMenuHost subMenuHost) {
var icon = subMenuHost.getMainMenuIcon();
var label = icon.getHoverName();
TabButton button = new TabButton(icon, label, btn -> returnToParent());
TabButton button = new TabButton(Icon.BACK, label, btn -> returnToParent());
widgets.add("back", button);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

import appeng.api.stacks.GenericStack;
import appeng.client.gui.AESubScreen;
import appeng.client.gui.Icon;
import appeng.client.gui.NumberEntryType;
import appeng.client.gui.me.common.ClientDisplaySlot;
import appeng.client.gui.widgets.NumberEntryWidget;
Expand Down Expand Up @@ -61,7 +62,7 @@ public SetProcessingPatternAmountScreen(PatternEncodingTermScreen<C> parentScree

var icon = getMenu().getHost().getMainMenuIcon();
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer();
var button = new TabButton(icon, icon.getHoverName(), btn -> {
var button = new TabButton(Icon.BACK, icon.getHoverName(), btn -> {
returnToParent();
});
widgets.add("back", button);
Expand Down
7 changes: 4 additions & 3 deletions src/main/java/appeng/client/gui/widgets/IconButton.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float
this.height = 8;
}

var yOffset = isHoveredOrFocused() ? 1 : 0;
var yOffset = isHovered() ? 1 : 0;

if (this.halfSize) {
if (!disableBackground) {
Expand All @@ -87,8 +87,9 @@ public void renderWidget(GuiGraphics guiGraphics, int mouseX, int mouseY, float
}
} else {
if (!disableBackground) {
Icon bgIcon = isHoveredOrFocused() ? Icon.TOOLBAR_BUTTON_BACKGROUND_HOVER
: Icon.TOOLBAR_BUTTON_BACKGROUND;
Icon bgIcon = isHovered() ? Icon.TOOLBAR_BUTTON_BACKGROUND_HOVER
: isFocused() ? Icon.TOOLBAR_BUTTON_BACKGROUND_FOCUS : Icon.TOOLBAR_BUTTON_BACKGROUND;

bgIcon.getBlitter()
.dest(getX() - 1, getY() + yOffset, 18, 20)
.zOffset(2)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/ae2/textures/guis/extra_panels.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/main/resources/assets/ae2/textures/guis/states.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 05f15aa

Please sign in to comment.