gui and text drawing, gui misc
This commit is contained in:
parent
c906760bd4
commit
4ec8affe85
37 changed files with 799 additions and 646 deletions
|
@ -23,16 +23,15 @@ public class Dropdown<T> extends Element {
|
|||
}
|
||||
|
||||
public void updateText() {
|
||||
this.r_dirty = true;
|
||||
}
|
||||
|
||||
protected boolean isTextCenteredX() {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected boolean isTextCenteredY() {
|
||||
return false;
|
||||
}
|
||||
// protected boolean isTextCenteredX() {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// protected boolean isTextCenteredY() {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
public boolean canClick() {
|
||||
return false;
|
||||
|
@ -60,10 +59,7 @@ public class Dropdown<T> extends Element {
|
|||
public void drawHover() {
|
||||
int m = ((this.gm.mouse_y - (this.pos_y + this.margin_y1)) * Dropdown.this.values.length / (this.size_y - (this.margin_y1 + this.margin_y2)));
|
||||
// if((sys.mouse_y - this.pos_y) < (this.size_y - this.margin_y2))
|
||||
Drawing.drawRectColor(this.pos_x + this.margin_x1,
|
||||
this.pos_y + this.margin_y1 + ExtMath.clampi(m, 0, Dropdown.this.values.length - 1) * ((this.size_y - (this.margin_y1 + this.margin_y2)) / Dropdown.this.values.length),
|
||||
this.size_x - (this.margin_x1 + this.margin_x2),
|
||||
(this.size_y - (this.margin_y1 + this.margin_y2)) / Dropdown.this.values.length, this.gm.style.hover);
|
||||
Drawing.drawRect(this.pos_x + this.margin_x1, this.pos_y + this.margin_y1 + ExtMath.clampi(m, 0, Dropdown.this.values.length - 1) * ((this.size_y - (this.margin_y1 + this.margin_y2)) / Dropdown.this.values.length), this.size_x - (this.margin_x1 + this.margin_x2), (this.size_y - (this.margin_y1 + this.margin_y2)) / Dropdown.this.values.length, this.gm.style.hover);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue