diff options
author | Juuxel <kasperi.kauppi@gmail.com> | 2019-08-27 21:02:39 +0300 |
---|---|---|
committer | Juuxel <kasperi.kauppi@gmail.com> | 2019-08-27 21:02:39 +0300 |
commit | e6e0a169f43b20485f1bddf9993d21dd661f15d2 (patch) | |
tree | 7bfecfab456c7950a029497ee790e61c5e9d4cda | |
parent | 3b18d099fbc4758cc69f99a8dc046822395e6aa4 (diff) | |
download | LibGui-e6e0a169f43b20485f1bddf9993d21dd661f15d2.tar.gz LibGui-e6e0a169f43b20485f1bddf9993d21dd661f15d2.tar.bz2 LibGui-e6e0a169f43b20485f1bddf9993d21dd661f15d2.zip |
Revert some local changes, make slider paintBg formatting cleaner
-rw-r--r-- | build.gradle | 6 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java | 2 | ||||
-rw-r--r-- | src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java | 12 |
3 files changed, 10 insertions, 10 deletions
diff --git a/build.gradle b/build.gradle index 580618e..ad484fd 100644 --- a/build.gradle +++ b/build.gradle @@ -17,13 +17,13 @@ buildscript { } plugins { - id 'fabric-loom' version '0.2.4-SNAPSHOT' + //id 'fabric-loom' version '0.2.4-SNAPSHOT' id 'maven-publish' id "com.jfrog.artifactory" version "4.9.0" } -//apply plugin: "fabric-loom"; +apply plugin: "fabric-loom"; sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 @@ -150,4 +150,4 @@ artifactory { } else { println "Cannot configure artifactory; please define ext.artifactoryUsername and ext.artifactoryPassword before running artifactoryPublish" } -}
\ No newline at end of file +} diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java index 16a8d71..0f5159c 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java @@ -31,7 +31,7 @@ public class WButton extends WWidget { @Override public void paintForeground(int x, int y, int mouseX, int mouseY) { - //System.out.println("Mouse: { "+mouseX+", "+mouseY+" }"); + System.out.println("Mouse: { "+mouseX+", "+mouseY+" }"); boolean hovered = (mouseX>=x && mouseY>=y && mouseX<x+getWidth() && mouseY<y+getHeight()); int state = 1; //1=regular. 2=hovered. 0=disabled. diff --git a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java index 65ef7e3..e308b14 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java @@ -132,15 +132,15 @@ public class WSlider extends WWidget { if (axis == Axis.VERTICAL) { int trackX = x + width / 2 - TRACK_WIDTH / 2; - ScreenDrawing.rect(TEXTURE, trackX, y + 1, TRACK_WIDTH, 1, 16 * px, 0 * px, 22 * px, 1 * px, 0xFFFFFFFF); - ScreenDrawing.rect(TEXTURE, trackX, y + 2, TRACK_WIDTH, height - 2, 16 * px, 1 * px, 22 * px, 2 * px, 0xFFFFFFFF); - ScreenDrawing.rect(TEXTURE, trackX, y + height, TRACK_WIDTH, 1, 16 * px, 2 * px, 22 * px, 3 * px, 0xFFFFFFFF); + ScreenDrawing.rect(TEXTURE, trackX, y + 1, TRACK_WIDTH, 1, 16*px, 0*px, 22*px, 1*px, 0xFFFFFFFF); + ScreenDrawing.rect(TEXTURE, trackX, y + 2, TRACK_WIDTH, height - 2, 16*px, 1*px, 22*px, 2*px, 0xFFFFFFFF); + ScreenDrawing.rect(TEXTURE, trackX, y + height, TRACK_WIDTH, 1, 16*px, 2*px, 22*px, 3*px, 0xFFFFFFFF); } else { int trackY = y + height / 2 - TRACK_WIDTH / 2; - ScreenDrawing.rect(TEXTURE, x, trackY, 1, TRACK_WIDTH, 16 * px, 3 * px, 17 * px, 9 * px, 0xFFFFFFFF); - ScreenDrawing.rect(TEXTURE, x + 1, trackY, width - 2, TRACK_WIDTH, 17 * px, 3 * px, 18 * px, 9 * px, 0xFFFFFFFF); - ScreenDrawing.rect(TEXTURE, x + width - 1, trackY, 1, TRACK_WIDTH, 18 * px, 3 * px, 19 * px, 9 * px, 0xFFFFFFFF); + ScreenDrawing.rect(TEXTURE, x, trackY, 1, TRACK_WIDTH, 16*px, 3*px, 17*px, 9*px, 0xFFFFFFFF); + ScreenDrawing.rect(TEXTURE, x + 1, trackY, width - 2, TRACK_WIDTH, 17*px, 3*px, 18*px, 9*px, 0xFFFFFFFF); + ScreenDrawing.rect(TEXTURE, x + width - 1, trackY, 1, TRACK_WIDTH, 18*px, 3*px, 19*px, 9*px, 0xFFFFFFFF); } } } |