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

@@ -24,8 +24,8 @@ public class ControlChromosome extends Control implements IControlValue<IChromos
IChromosomeType chromo;
ISpeciesRoot species;
public ControlChromosome(final IWidget parent, final float x, final float y) {
super(parent, x, y, 96.0f, 96.0f);
public ControlChromosome(final IWidget parent, final int x, final int y) {
super(parent, x, y, 96, 96);
this.BeeTexture = new StandardTexture(0, 0, 96, 96, BinnieCoreTexture.GUIBreeding);
this.TreeTexture = new StandardTexture(96, 0, 96, 96, BinnieCoreTexture.GUIBreeding);
this.MothTexture = new StandardTexture(96, 96, 96, 96, BinnieCoreTexture.GUIBreeding);
@@ -43,61 +43,61 @@ public class ControlChromosome extends Control implements IControlValue<IChromos
this.species = root;
this.deleteAllChildren();
if (root == Binnie.GENETICS.getBeeRoot()) {
new ControlChromoPicker(this, 28.0f, 47.0f, EnumBeeChromosome.SPECIES);
new ControlChromoPicker(this, 28.0f, 72.0f, EnumBeeChromosome.SPEED);
new ControlChromoPicker(this, 19.0f, 20.0f, EnumBeeChromosome.LIFESPAN);
new ControlChromoPicker(this, 55.0f, 65.0f, EnumBeeChromosome.FERTILITY);
new ControlChromoPicker(this, 28.0f, 1.0f, EnumBeeChromosome.TEMPERATURE_TOLERANCE);
new ControlChromoPicker(this, 61.0f, 37.0f, EnumBeeChromosome.NEVER_SLEEPS);
new ControlChromoPicker(this, 81.0f, 76.0f, EnumBeeChromosome.HUMIDITY_TOLERANCE);
new ControlChromoPicker(this, 44.0f, 21.0f, EnumBeeChromosome.TOLERATES_RAIN);
new ControlChromoPicker(this, 3.0f, 37.0f, EnumBeeChromosome.CAVE_DWELLING);
new ControlChromoPicker(this, 4.0f, 65.0f, EnumBeeChromosome.FLOWER_PROVIDER);
new ControlChromoPicker(this, 83.0f, 27.0f, EnumBeeChromosome.FLOWERING);
new ControlChromoPicker(this, 71.0f, 10.0f, EnumBeeChromosome.TERRITORY);
new ControlChromoPicker(this, 84.0f, 54.0f, EnumBeeChromosome.EFFECT);
new ControlChromoPicker(this, 28, 47, EnumBeeChromosome.SPECIES);
new ControlChromoPicker(this, 28, 72, EnumBeeChromosome.SPEED);
new ControlChromoPicker(this, 19, 20, EnumBeeChromosome.LIFESPAN);
new ControlChromoPicker(this, 55, 65, EnumBeeChromosome.FERTILITY);
new ControlChromoPicker(this, 28, 1, EnumBeeChromosome.TEMPERATURE_TOLERANCE);
new ControlChromoPicker(this, 61, 37, EnumBeeChromosome.NEVER_SLEEPS);
new ControlChromoPicker(this, 81, 76, EnumBeeChromosome.HUMIDITY_TOLERANCE);
new ControlChromoPicker(this, 44, 21, EnumBeeChromosome.TOLERATES_RAIN);
new ControlChromoPicker(this, 3, 37, EnumBeeChromosome.CAVE_DWELLING);
new ControlChromoPicker(this, 4, 65, EnumBeeChromosome.FLOWER_PROVIDER);
new ControlChromoPicker(this, 83, 27, EnumBeeChromosome.FLOWERING);
new ControlChromoPicker(this, 71, 10, EnumBeeChromosome.TERRITORY);
new ControlChromoPicker(this, 84, 54, EnumBeeChromosome.EFFECT);
} else if (root == Binnie.GENETICS.getTreeRoot()) {
new ControlChromoPicker(this, 48.0f, 48.0f, EnumTreeChromosome.SPECIES);
new ControlChromoPicker(this, 43.0f, 12.0f, EnumTreeChromosome.GROWTH);
new ControlChromoPicker(this, 43.0f, 84.0f, EnumTreeChromosome.HEIGHT);
new ControlChromoPicker(this, 25.0f, 63.0f, EnumTreeChromosome.FERTILITY);
new ControlChromoPicker(this, 72.0f, 57.0f, EnumTreeChromosome.FRUITS);
new ControlChromoPicker(this, 21.0f, 43.0f, EnumTreeChromosome.YIELD);
new ControlChromoPicker(this, 38.0f, 32.0f, EnumTreeChromosome.PLANT);
new ControlChromoPicker(this, 15.0f, 17.0f, EnumTreeChromosome.SAPPINESS);
new ControlChromoPicker(this, 75.0f, 78.0f, EnumTreeChromosome.TERRITORY);
new ControlChromoPicker(this, 67.0f, 15.0f, EnumTreeChromosome.EFFECT);
new ControlChromoPicker(this, 70.0f, 34.0f, EnumTreeChromosome.MATURATION);
new ControlChromoPicker(this, 45.0f, 67.0f, EnumTreeChromosome.GIRTH);
new ControlChromoPicker(this, 5.0f, 70.0f, EnumTreeChromosome.FIREPROOF);
new ControlChromoPicker(this, 48, 48, EnumTreeChromosome.SPECIES);
new ControlChromoPicker(this, 43, 12, EnumTreeChromosome.GROWTH);
new ControlChromoPicker(this, 43, 84, EnumTreeChromosome.HEIGHT);
new ControlChromoPicker(this, 25, 63, EnumTreeChromosome.FERTILITY);
new ControlChromoPicker(this, 72, 57, EnumTreeChromosome.FRUITS);
new ControlChromoPicker(this, 21, 43, EnumTreeChromosome.YIELD);
new ControlChromoPicker(this, 38, 32, EnumTreeChromosome.PLANT);
new ControlChromoPicker(this, 15, 17, EnumTreeChromosome.SAPPINESS);
new ControlChromoPicker(this, 75, 78, EnumTreeChromosome.TERRITORY);
new ControlChromoPicker(this, 67, 15, EnumTreeChromosome.EFFECT);
new ControlChromoPicker(this, 70, 34, EnumTreeChromosome.MATURATION);
new ControlChromoPicker(this, 45, 67, EnumTreeChromosome.GIRTH);
new ControlChromoPicker(this, 5, 70, EnumTreeChromosome.FIREPROOF);
} else if (root == Binnie.GENETICS.getFlowerRoot()) {
new ControlChromoPicker(this, 35.0f, 81.0f, EnumFlowerChromosome.SPECIES);
new ControlChromoPicker(this, 36.0f, 28.0f, EnumFlowerChromosome.PRIMARY);
new ControlChromoPicker(this, 27.0f, 13.0f, EnumFlowerChromosome.SECONDARY);
new ControlChromoPicker(this, 47.0f, 15.0f, EnumFlowerChromosome.FERTILITY);
new ControlChromoPicker(this, 54.0f, 31.0f, EnumFlowerChromosome.TERRITORY);
new ControlChromoPicker(this, 15.0f, 55.0f, EnumFlowerChromosome.EFFECT);
new ControlChromoPicker(this, 23.0f, 38.0f, EnumFlowerChromosome.LIFESPAN);
new ControlChromoPicker(this, 17.0f, 77.0f, EnumFlowerChromosome.TEMPERATURE_TOLERANCE);
new ControlChromoPicker(this, 52.0f, 51.0f, EnumFlowerChromosome.HUMIDITY_TOLERANCE);
new ControlChromoPicker(this, 54.0f, 80.0f, EnumFlowerChromosome.PH_TOLERANCE);
new ControlChromoPicker(this, 41.0f, 42.0f, EnumFlowerChromosome.SAPPINESS);
new ControlChromoPicker(this, 37.0f, 63.0f, EnumFlowerChromosome.STEM);
new ControlChromoPicker(this, 35, 81, EnumFlowerChromosome.SPECIES);
new ControlChromoPicker(this, 36, 28, EnumFlowerChromosome.PRIMARY);
new ControlChromoPicker(this, 27, 13, EnumFlowerChromosome.SECONDARY);
new ControlChromoPicker(this, 47, 15, EnumFlowerChromosome.FERTILITY);
new ControlChromoPicker(this, 54, 31, EnumFlowerChromosome.TERRITORY);
new ControlChromoPicker(this, 15, 55, EnumFlowerChromosome.EFFECT);
new ControlChromoPicker(this, 23, 38, EnumFlowerChromosome.LIFESPAN);
new ControlChromoPicker(this, 17, 77, EnumFlowerChromosome.TEMPERATURE_TOLERANCE);
new ControlChromoPicker(this, 52, 51, EnumFlowerChromosome.HUMIDITY_TOLERANCE);
new ControlChromoPicker(this, 54, 80, EnumFlowerChromosome.PH_TOLERANCE);
new ControlChromoPicker(this, 41, 42, EnumFlowerChromosome.SAPPINESS);
new ControlChromoPicker(this, 37, 63, EnumFlowerChromosome.STEM);
} else if (root == Binnie.GENETICS.getButterflyRoot()) {
new ControlChromoPicker(this, 40.0f, 40.0f, EnumButterflyChromosome.SPECIES);
new ControlChromoPicker(this, 63.0f, 32.0f, EnumButterflyChromosome.SIZE);
new ControlChromoPicker(this, 32.0f, 63.0f, EnumButterflyChromosome.SPEED);
new ControlChromoPicker(this, 11.0f, 27.0f, EnumButterflyChromosome.LIFESPAN);
new ControlChromoPicker(this, 16.0f, 12.0f, EnumButterflyChromosome.METABOLISM);
new ControlChromoPicker(this, 17.0f, 63.0f, EnumButterflyChromosome.FERTILITY);
new ControlChromoPicker(this, 34.0f, 12.0f, EnumButterflyChromosome.TEMPERATURE_TOLERANCE);
new ControlChromoPicker(this, 22.0f, 46.0f, EnumButterflyChromosome.HUMIDITY_TOLERANCE);
new ControlChromoPicker(this, 53.0f, 26.0f, EnumButterflyChromosome.NOCTURNAL);
new ControlChromoPicker(this, 71.0f, 53.0f, EnumButterflyChromosome.TOLERANT_FLYER);
new ControlChromoPicker(this, 78.0f, 12.0f, EnumButterflyChromosome.FIRE_RESIST);
new ControlChromoPicker(this, 55.0f, 55.0f, EnumButterflyChromosome.FLOWER_PROVIDER);
new ControlChromoPicker(this, 27.0f, 31.0f, EnumButterflyChromosome.EFFECT);
new ControlChromoPicker(this, 87.0f, 45.0f, EnumButterflyChromosome.COCOON);
new ControlChromoPicker(this, 40, 40, EnumButterflyChromosome.SPECIES);
new ControlChromoPicker(this, 63, 32, EnumButterflyChromosome.SIZE);
new ControlChromoPicker(this, 32, 63, EnumButterflyChromosome.SPEED);
new ControlChromoPicker(this, 11, 27, EnumButterflyChromosome.LIFESPAN);
new ControlChromoPicker(this, 16, 12, EnumButterflyChromosome.METABOLISM);
new ControlChromoPicker(this, 17, 63, EnumButterflyChromosome.FERTILITY);
new ControlChromoPicker(this, 34, 12, EnumButterflyChromosome.TEMPERATURE_TOLERANCE);
new ControlChromoPicker(this, 22, 46, EnumButterflyChromosome.HUMIDITY_TOLERANCE);
new ControlChromoPicker(this, 53, 26, EnumButterflyChromosome.NOCTURNAL);
new ControlChromoPicker(this, 71, 53, EnumButterflyChromosome.TOLERANT_FLYER);
new ControlChromoPicker(this, 78, 12, EnumButterflyChromosome.FIRE_RESIST);
new ControlChromoPicker(this, 55, 55, EnumButterflyChromosome.FLOWER_PROVIDER);
new ControlChromoPicker(this, 27, 31, EnumButterflyChromosome.EFFECT);
new ControlChromoPicker(this, 87, 45, EnumButterflyChromosome.COCOON);
}
}
}
@@ -113,11 +113,11 @@ public class ControlChromosome extends Control implements IControlValue<IChromos
}
@Override
public void onRenderBackground() {
public void onRenderBackground(int guiWidth, int guiHeight) {
if (this.species == null) {
return;
}
super.onRenderBackground();
super.onRenderBackground(guiWidth, guiHeight);
final Texture text = this.getTypeTexture();
CraftGUI.render.texture(text, IPoint.ZERO);
}