mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-28 07:56:01 +00:00
Rename Widget some Methods
This commit is contained in:
1 parent
b0503fe523
commit
5c40de2eba
12 files changed
+186
-130
No files matched your search
@@ -34,8 +34,8 @@ public class PageFruit extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(final ItemStack species) {
|
||||
this.deleteAllChildren();
|
||||
final WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), I18N.localise("extratrees.gui.database.tab.fruit." + (this.treesThatBearFruit ? "natural" : "potential")), TextJustification.MIDDLE_CENTER);
|
||||
new ControlText(this, new Area(0, 0, this.getSize().x(), 24), I18N.localise("extratrees.gui.database.tab.fruit." + (this.treesThatBearFruit ? "natural" : "potential")), TextJustification.MIDDLE_CENTER);
|
||||
final Collection<IAlleleSpecies> trees = this.treesThatBearFruit ? ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatBearFruit(species, database.isNEI(), database.getWorld(), database.getUsername()) : ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatCanBearFruit(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4, 24, this.size().x() - 8, this.size().y() - 4 - 24).setOptions(trees);
|
||||
new ControlSpeciesBox(this, 4, 24, this.getSize().x() - 8, this.getSize().y() - 4 - 24).setOptions(trees);
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ import binnie.extratrees.block.IPlankType;
|
||||
import binnie.extratrees.block.WoodManager;
|
||||
import binnie.extratrees.block.decor.FenceType;
|
||||
|
||||
//TODO: Add to DatabaseConstants
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class PagePlanksOverview extends PageAbstract<ItemStack> {
|
||||
public PagePlanksOverview(final IWidget parent, final DatabaseTab tab) {
|
||||
@@ -31,8 +32,9 @@ public class PagePlanksOverview extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(final ItemStack species) {
|
||||
this.deleteAllChildren();
|
||||
final WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
|
||||
new ControlText(this, new Area(12, 24, this.size().x() - 24, 24), I18N.localise("extratrees.gui.database.planks.use"), TextJustification.MIDDLE_LEFT);
|
||||
Point size = getSize();
|
||||
new ControlText(this, new Area(0, 0, size.x(), 24), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
|
||||
new ControlText(this, new Area(12, 24, size.x() - 24, 24), I18N.localise("extratrees.gui.database.planks.use"), TextJustification.MIDDLE_LEFT);
|
||||
final IPlankType type = WoodManager.getPlankType(species);
|
||||
int x = 12;
|
||||
if (type != null) {
|
||||
|
||||
@@ -30,8 +30,8 @@ public class PagePlanksTrees extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(final ItemStack species) {
|
||||
this.deleteAllChildren();
|
||||
final WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
|
||||
new ControlText(this, new Area(0, 0, this.getSize().x(), 24), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
|
||||
final Collection<IAlleleSpecies> trees = ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatMakePlanks(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4, 24, this.size().x() - 8, this.size().y() - 4 - 24).setOptions(trees);
|
||||
new ControlSpeciesBox(this, 4, 24, this.getSize().x() - 8, this.getSize().y() - 4 - 24).setOptions(trees);
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.GIRTH) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getGirth() + "x" + genome.getGirth(), TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
contents.setSize(new Point(contents.size().x(), y));
|
||||
contents.setSize(new Point(contents.getSize().x(), y));
|
||||
scrollable.setScrollableContent(contents);
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,8 @@ public class PageWood extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(final ItemStack species) {
|
||||
this.deleteAllChildren();
|
||||
final WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), this.getValue().toString(), TextJustification.MIDDLE_CENTER);
|
||||
new ControlText(this, new Area(0, 0, this.getSize().x(), 24), this.getValue().toString(), TextJustification.MIDDLE_CENTER);
|
||||
final Collection<IAlleleSpecies> trees = ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatHaveWood(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4, 24, this.size().x() - 8, this.size().y() - 4 - 24).setOptions(trees);
|
||||
new ControlSpeciesBox(this, 4, 24, this.getSize().x() - 8, this.getSize().y() - 4 - 24).setOptions(trees);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user