Skip to content

Commit

Permalink
[ui] fix argument order in TextureComponent 'drawTexture' call
Browse files Browse the repository at this point in the history
  • Loading branch information
gliscowo committed Nov 7, 2024
1 parent b6b0914 commit 617b877
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ minecraft_version=1.21.2
yarn_mappings=1.21.2+build.1
loader_version=0.16.7
# Mod Properties
mod_version=0.12.17
mod_version=0.12.18-pre.1
maven_group=io.wispforest
archives_base_name=owo-lib
# Dependencies
Expand Down
21 changes: 10 additions & 11 deletions src/main/java/io/wispforest/owo/ui/component/TextureComponent.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import io.wispforest.owo.ui.core.*;
import io.wispforest.owo.ui.parsing.UIModel;
import io.wispforest.owo.ui.parsing.UIParsing;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.util.Identifier;
import org.w3c.dom.Element;

Expand Down Expand Up @@ -69,16 +68,16 @@ public void draw(OwoUIDrawContext context, int mouseX, int mouseY, float partial
int rightEdge = Math.min(visibleArea.x() + visibleArea.width(), regionWidth);

context.drawTexture(identifier -> OwoUIRenderLayers.getGuiTextured(identifier, this.blend),
this.texture,
visibleArea.x(),
visibleArea.y(),
rightEdge - visibleArea.x(),
bottomEdge - visibleArea.y(),
this.u + visibleArea.x(),
this.v + visibleArea.y(),
rightEdge - visibleArea.x(),
bottomEdge - visibleArea.y(),
this.textureWidth, this.textureHeight
this.texture,
visibleArea.x(),
visibleArea.y(),
this.u + visibleArea.x(),
this.v + visibleArea.y(),
rightEdge - visibleArea.x(),
bottomEdge - visibleArea.y(),
rightEdge - visibleArea.x(),
bottomEdge - visibleArea.y(),
this.textureWidth, this.textureHeight
);

if (this.blend) {
Expand Down

0 comments on commit 617b877

Please sign in to comment.