From cab1b5899cfe3e746be46614d098e5b7a03c1209 Mon Sep 17 00:00:00 2001 From: CrushedPixel Date: Tue, 2 Jun 2015 12:02:48 +0200 Subject: [PATCH] Added black outline to GuiColorPicker's Color Preview and Picker Realigned Color Preview on Button --- .../crushedpixel/replaymod/gui/elements/GuiColorPicker.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/crushedpixel/replaymod/gui/elements/GuiColorPicker.java b/src/main/java/eu/crushedpixel/replaymod/gui/elements/GuiColorPicker.java index 94c8a207..964853d2 100644 --- a/src/main/java/eu/crushedpixel/replaymod/gui/elements/GuiColorPicker.java +++ b/src/main/java/eu/crushedpixel/replaymod/gui/elements/GuiColorPicker.java @@ -54,10 +54,13 @@ public class GuiColorPicker extends GuiButton { int strWidth = fontrenderer.getStringWidth(this.displayString); this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2 - 10, this.yPosition + (this.height - 8) / 2, l); - this.drawGradientRect(this.xPosition + (width+strWidth)/2, this.yPosition + 5, this.xPosition + (width+strWidth)/2 + 10, + this.drawGradientRect(this.xPosition + (width+strWidth)/2 - 6, this.yPosition + 4, this.xPosition + (width+strWidth)/2 + 6, + this.yPosition + 4 + 12, Color.BLACK.getRGB(), Color.BLACK.getRGB()); + this.drawGradientRect(this.xPosition + (width+strWidth)/2 - 5, this.yPosition + 5, this.xPosition + (width+strWidth)/2 + 5, this.yPosition + 5 + 10, pickedColor, pickedColor); if(pickerVisible && this.enabled) { + this.drawGradientRect(pickerX-1, pickerY-1, pickerX+PICKER_SIZE+1, pickerY+PICKER_SIZE+1, Color.BLACK.getRGB(), Color.BLACK.getRGB()); for(int x=0; x < PICKER_SIZE; x++) { for(int y=0; y < PICKER_SIZE; y++) { int color = getColorAtPosition(x, y);