Skip to content

Commit fcda711

Browse files
committed
Fix Slider getTexture always returning TEXTURE
1 parent 3773a5f commit fcda711

File tree

1 file changed

+2
-2
lines changed
  • common/src/main/java/com/jsmacrosce/wagyourgui/elements

1 file changed

+2
-2
lines changed

common/src/main/java/com/jsmacrosce/wagyourgui/elements/Slider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ public void setSteps(int steps) {
9595
}
9696

9797
private ResourceLocation getTexture() {
98-
return this.isFocused() && !this.isFocused() ? HIGHLIGHTED_TEXTURE : TEXTURE;
98+
return (!this.isHovered && !this.isFocused()) ? HIGHLIGHTED_TEXTURE : TEXTURE;
9999
}
100100

101101
private ResourceLocation getHandleTexture() {
102-
return !this.isHovered && !this.isFocused() ? HANDLE_TEXTURE : HANDLE_HIGHLIGHTED_TEXTURE;
102+
return (!this.isHovered && !this.isFocused()) ? HANDLE_TEXTURE : HANDLE_HIGHLIGHTED_TEXTURE;
103103
}
104104

105105
@Override

0 commit comments

Comments
 (0)