mirror of
https://github.com/GTNewHorizons/JustEnoughCalculation.git
synced 2026-11-25 22:34:26 +00:00
chore [WIP]
This commit is contained in:
1 parent
ea0253a359
commit
1939619ed4
34 files changed
+265
-167
No files matched your search
@@ -37,10 +37,11 @@ public class WButtonText extends WButton {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(JecaGui gui, int xMouse, int yMouse) {
|
||||
super.onDraw(gui, xMouse, yMouse);
|
||||
public boolean onDraw(JecaGui gui, int xMouse, int yMouse) {
|
||||
boolean ret = super.onDraw(gui, xMouse, yMouse);
|
||||
JecaGui.Font font = mouseIn(xMouse, yMouse) ? focused : normal;
|
||||
float x = xPos + Math.max(3, xSize / 2.0f - font.getTextWidth(text) / 2.0f);
|
||||
gui.drawText(x, yPos + ySize / 2.0f - font.getTextHeight() / 2.0f, xSize - 6, font, text);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user