mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 13:09:47 +00:00
Move static rendering methods to RenderUtil
This commit is contained in:
1 parent
9c4b081f6d
commit
460a7db190
42 files changed
+442
-414
No files matched your search
@@ -8,6 +8,7 @@ import binnie.craftgui.core.ITooltip;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.core.Tooltip;
|
||||
import binnie.craftgui.core.geometry.IArea;
|
||||
import binnie.craftgui.core.renderer.RenderUtil;
|
||||
import binnie.craftgui.resource.minecraft.CraftGUITexture;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
@@ -76,7 +77,7 @@ public class ControlClimateBar extends Control implements ITooltip {
|
||||
} else {
|
||||
colour = this.tempColours[i];
|
||||
}
|
||||
CraftGUI.render.solid(new IArea(x + 1, 1, w, this.getSize().y() - 2), colour);
|
||||
RenderUtil.drawSolidRect(new IArea(x + 1, 1, w, this.getSize().y() - 2), colour);
|
||||
}
|
||||
}
|
||||
CraftGUI.render.texture(CraftGUITexture.EnergyBarGlass, this.getArea());
|
||||
|
||||
@@ -7,6 +7,7 @@ import binnie.craftgui.core.CraftGUI;
|
||||
import binnie.craftgui.core.ITooltip;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.core.Tooltip;
|
||||
import binnie.craftgui.core.renderer.RenderUtil;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
|
||||
public class ControlChromosome extends Control implements IControlValue<IChromosomeType>, ITooltip {
|
||||
@@ -31,7 +32,7 @@ public class ControlChromosome extends Control implements IControlValue<IChromos
|
||||
@Override
|
||||
public void onRenderBackground(int guiWidth, int guiHeight) {
|
||||
CraftGUI.render.texture(ExtraBeeGUITexture.Chromosome, this.getArea());
|
||||
CraftGUI.render.colour(16711680);
|
||||
RenderUtil.setColour(16711680);
|
||||
CraftGUI.render.texture(ExtraBeeGUITexture.Chromosome2, this.getArea());
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ package binnie.extrabees.gui.punnett;
|
||||
|
||||
import binnie.craftgui.controls.ControlText;
|
||||
import binnie.craftgui.controls.core.Control;
|
||||
import binnie.craftgui.core.CraftGUI;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.core.geometry.IArea;
|
||||
import binnie.craftgui.core.geometry.TextJustification;
|
||||
import binnie.craftgui.core.renderer.RenderUtil;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
@@ -24,10 +24,10 @@ public class ControlPunnett extends Control {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground(int guiWidth, int guiHeight) {
|
||||
CraftGUI.render.solid(new IArea(0, ControlPunnett.boxHeight, ControlPunnett.boxWidth * 3, 1), 11184810);
|
||||
CraftGUI.render.solid(new IArea(ControlPunnett.boxWidth / 2, ControlPunnett.boxHeight * 2, Math.round(ControlPunnett.boxWidth * 2.5f), 1), 11184810);
|
||||
CraftGUI.render.solid(new IArea(ControlPunnett.boxWidth, 0, 1, ControlPunnett.boxHeight * 3), 11184810);
|
||||
CraftGUI.render.solid(new IArea(ControlPunnett.boxWidth * 2, ControlPunnett.boxHeight / 2, 1, Math.round(ControlPunnett.boxHeight * 2.5f)), 11184810);
|
||||
RenderUtil.drawSolidRect(new IArea(0, ControlPunnett.boxHeight, ControlPunnett.boxWidth * 3, 1), 11184810);
|
||||
RenderUtil.drawSolidRect(new IArea(ControlPunnett.boxWidth / 2, ControlPunnett.boxHeight * 2, Math.round(ControlPunnett.boxWidth * 2.5f), 1), 11184810);
|
||||
RenderUtil.drawSolidRect(new IArea(ControlPunnett.boxWidth, 0, 1, ControlPunnett.boxHeight * 3), 11184810);
|
||||
RenderUtil.drawSolidRect(new IArea(ControlPunnett.boxWidth * 2, ControlPunnett.boxHeight / 2, 1, Math.round(ControlPunnett.boxHeight * 2.5f)), 11184810);
|
||||
}
|
||||
|
||||
public void setup(final IChromosomeType chromosome, final IIndividual ind1, final IIndividual ind2, final ISpeciesRoot root) {
|
||||
|
||||
@@ -43,7 +43,7 @@ public class WindowPunnettSquare extends Window {
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Punnett Square");
|
||||
CraftGUI.render.stylesheet(new StyleSheetPunnett());
|
||||
CraftGUI.render.setStyleSheet(new StyleSheetPunnett());
|
||||
}
|
||||
|
||||
static class StyleSheetPunnett extends StyleSheet {
|
||||
|
||||
Reference in new issue
Block a user