Skip to content

Commit

Permalink
Fix WWidget.onMouseMove using X pos for Y pos
Browse files Browse the repository at this point in the history
  • Loading branch information
Juuxel committed Jan 25, 2020
1 parent afb2f5c commit 4340326
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.7.5+build.178

# Mod Properties
mod_version = 1.5.0
mod_version = 1.5.1
maven_group = io.github.cottonmc
archives_base_name = LibGui

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public void mouseMoved(double mouseX, double mouseY) {

WPanel root = description.getRootPanel();
int containerX = (int)mouseX-left;
int containerY = (int)mouseX-top;
int containerY = (int)mouseY-top;

WWidget child = root.hit(containerX, containerY);
child.onMouseMove(containerX - child.getAbsoluteX(), containerY - child.getAbsoluteY());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public void mouseMoved(double mouseX, double mouseY) {

WPanel root = description.getRootPanel();
int containerX = (int)mouseX-x;
int containerY = (int)mouseX-y;
int containerY = (int)mouseY-y;

WWidget child = root.hit(containerX, containerY);
child.onMouseMove(containerX - child.getAbsoluteX(), containerY - child.getAbsoluteY());
Expand Down

0 comments on commit 4340326

Please sign in to comment.