Gui rendering cleanup

This commit is contained in:
mezz committed 2017-01-24 20:53:27 -08:00
1 parent 17f036522e
commit 31a305ffc2
173 files changed
+1317 -1349

No files matched your search

@@ -14,15 +14,15 @@ public class ControlColourOption extends ControlTextOption<IFlowerColour> {
public ControlColourOption(final ControlList<IFlowerColour> controlList, final IFlowerColour option, final int y) {
super(controlList, option, option.getColourName(), y);
this.setSize(new IPoint(this.getSize().x(), 20.0f));
(this.controlBee = new ControlColourDisplay(this, 2.0f, 2.0f)).setValue(option);
this.setSize(new IPoint(this.getSize().x(), 20));
(this.controlBee = new ControlColourDisplay(this, 2, 2)).setValue(option);
this.addAttribute(Attribute.MouseOver);
CraftGUIUtil.moveWidget(this.textWidget, new IPoint(22.0f, 0.0f));
this.textWidget.setSize(this.textWidget.getSize().sub(new IPoint(24.0f, 0.0f)));
CraftGUIUtil.moveWidget(this.textWidget, new IPoint(22, 0));
this.textWidget.setSize(this.textWidget.getSize().sub(new IPoint(24, 0)));
final int th = (int) CraftGUI.render.textHeight(this.textWidget.getValue(), this.textWidget.getSize().x());
final int height = Math.max(20, th + 6);
this.setSize(new IPoint(this.size().x(), height));
this.textWidget.setSize(new IPoint(this.textWidget.getSize().x(), height));
this.boxPosition = new IPoint(2.0f, (height - 18) / 2);
this.boxPosition = new IPoint(2, (height - 18) / 2);
}
}