Move static rendering methods to RenderUtil

This commit is contained in:
mezz committed 2017-01-24 21:36:55 -08:00
1 parent 9c4b081f6d
commit 460a7db190
42 files changed
+442 -414

No files matched your search

@@ -3,9 +3,9 @@ package binnie.genetics.gui;
import binnie.core.genetics.Gene;
import binnie.craftgui.controls.listbox.ControlList;
import binnie.craftgui.controls.listbox.ControlOption;
import binnie.craftgui.core.CraftGUI;
import binnie.craftgui.core.geometry.IArea;
import binnie.craftgui.core.geometry.TextJustification;
import binnie.craftgui.core.renderer.RenderUtil;
public class ControlGenesisOption extends ControlOption<Gene> {
public ControlGenesisOption(final ControlList<Gene> parent, final Gene gene, final int y) {
@@ -23,9 +23,9 @@ public class ControlGenesisOption extends ControlOption<Gene> {
@Override
public void onRenderBackground(int guiWidth, int guiHeight) {
super.onRenderBackground(guiWidth, guiHeight);
CraftGUI.render.text(new IArea(0, 0, 70, 22), TextJustification.MiddleCenter, this.getChromosomeName(), this.getColour());
CraftGUI.render.text(new IArea(75, 0, 80, 22), TextJustification.MiddleCenter, this.getAlleleName(), this.getColour());
CraftGUI.render.solid(new IArea(70, 2, 1, 16), -16777216 + this.getColour());
RenderUtil.drawText(new IArea(0, 0, 70, 22), TextJustification.MiddleCenter, this.getChromosomeName(), this.getColour());
RenderUtil.drawText(new IArea(75, 0, 80, 22), TextJustification.MiddleCenter, this.getAlleleName(), this.getColour());
RenderUtil.drawSolidRect(new IArea(70, 2, 1, 16), -16777216 + this.getColour());
}
}