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

@@ -13,8 +13,8 @@ class ControlSpeciexBoxOption extends ControlTextOption<IAlleleSpecies> {
public ControlSpeciexBoxOption(final ControlList<IAlleleSpecies> controlList, final IAlleleSpecies option, final int y) {
super(controlList, option, option.getName(), y);
this.setSize(new IPoint(this.getSize().x(), 20.0f));
(this.controlBee = new ControlDatabaseIndividualDisplay(this, 2.0f, 2.0f)).setSpecies(this.getValue(), EnumDiscoveryState.Undetermined);
this.setSize(new IPoint(this.getSize().x(), 20));
(this.controlBee = new ControlDatabaseIndividualDisplay(this, 2, 2)).setSpecies(this.getValue(), EnumDiscoveryState.Undetermined);
if (this.controlBee.discovered == EnumDiscoveryState.Discovered) {
this.controlBee.discovered = EnumDiscoveryState.Show;
}
@@ -22,8 +22,8 @@ class ControlSpeciexBoxOption extends ControlTextOption<IAlleleSpecies> {
if (this.controlBee.discovered == EnumDiscoveryState.Show) {
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));