gui disabled colors
This commit is contained in:
parent
6a6a820963
commit
3316c42ed8
10 changed files with 64 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
|||
package game.gui.element;
|
||||
|
||||
import game.renderer.Drawing;
|
||||
import game.util.Util;
|
||||
|
||||
public class SelectableButton extends ActButton {
|
||||
private boolean selected;
|
||||
|
@ -11,8 +12,12 @@ public class SelectableButton extends ActButton {
|
|||
}
|
||||
|
||||
protected void drawBackground() {
|
||||
if(this.selected)
|
||||
Drawing.drawGradientBorder(this.pos_x, this.pos_y, this.size_x, this.size_y, this.gm.style.fill_btm, this.gm.style.fill_top, 0xff000000, this.gm.style.brdr_top, this.gm.style.brdr_btm);
|
||||
if(this.selected) {
|
||||
if(this.enabled)
|
||||
Drawing.drawGradientBorder(this.pos_x, this.pos_y, this.size_x, this.size_y, this.gm.style.fill_btm, this.gm.style.fill_top, 0xff000000, this.gm.style.brdr_top, this.gm.style.brdr_btm);
|
||||
else
|
||||
Drawing.drawGradientBorder(this.pos_x, this.pos_y, this.size_x, this.size_y, Util.mulColor(this.gm.style.fill_btm, 0.5f), Util.mulColor(this.gm.style.fill_top, 0.5f), 0xff000000, Util.mulColor(this.gm.style.brdr_top, 0.5f), Util.mulColor(this.gm.style.brdr_btm, 0.5f));
|
||||
}
|
||||
else
|
||||
super.drawBackground();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue