aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.gradle6
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WButton.java2
-rw-r--r--src/main/java/io/github/cottonmc/cotton/gui/widget/WSlider.java12
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);
}
}
}