mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 03:25:07 +00:00
* Added missing ru_RU localization * Fixed first letter * Rename Binnie.Language to short Binnie.I18N Removed some unused methods, classes. Removed some hardcod strings, replaced it on i18n Moved pigment colors of blocks and items to tooltips
This commit is contained in:
1 parent
f6186d3cf3
commit
e8802c66d3
62 files changed
+405
-264
No files matched your search
@@ -23,11 +23,10 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
protected ControlListBox<EnumFlowerColor> selectionBoxColors;
|
||||
|
||||
public WindowBotanistDatabase(EntityPlayer player, Side side, boolean nei) {
|
||||
super(player, side, nei, Binnie.Genetics.flowerBreedingSystem, 130.0f);
|
||||
}
|
||||
@@ -45,22 +44,7 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
new PageSpeciesMutations(getInfoPages(Mode.Species), new DatabaseTab(Botany.instance, "species.further", 0));
|
||||
new PageBranchOverview(getInfoPages(Mode.Branches), new DatabaseTab(Botany.instance, "branches.overview", 0));
|
||||
new PageBranchSpecies(getInfoPages(Mode.Branches), new DatabaseTab(Botany.instance, "branches.species", 0));
|
||||
createMode(FlowerMode.Colour, new ModeWidgets(FlowerMode.Colour, this) {
|
||||
@Override
|
||||
public void createListBox(IArea area) {
|
||||
listBox = new ControlListBox<IFlowerColor>(modePage, area.x(), area.y(), area.w(), area.h(), 12.0f) {
|
||||
@Override
|
||||
public IWidget createOption(IFlowerColor value, int y) {
|
||||
return new ControlColorOption(getContent(), value, y);
|
||||
}
|
||||
};
|
||||
List<IFlowerColor> colors = new ArrayList<IFlowerColor>();
|
||||
for (IFlowerColor c : EnumFlowerColor.values()) {
|
||||
colors.add(c);
|
||||
}
|
||||
listBox.setOptions(colors);
|
||||
}
|
||||
});
|
||||
createMode(FlowerMode.Colour, new ColorModeWidget());
|
||||
new PageColorMixResultant(getInfoPages(FlowerMode.Colour), new DatabaseTab(Botany.instance, "colour.resultant", 0));
|
||||
new PageColourMix(getInfoPages(FlowerMode.Colour), new DatabaseTab(Botany.instance, "colour.further", 0));
|
||||
new PageBreeder(getInfoPages(Mode.Breeder), getUsername(), new DatabaseTab(Botany.instance, "breeder", 0));
|
||||
@@ -73,7 +57,7 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
|
||||
@Override
|
||||
protected String getName() {
|
||||
return "FlowerDatabase";
|
||||
return Binnie.I18N.localise(Botany.instance, "gui.database.name");
|
||||
}
|
||||
|
||||
enum FlowerMode implements IDatabaseMode {
|
||||
@@ -84,4 +68,23 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
return Botany.proxy.localise("gui.database.mode." + name().toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
private class ColorModeWidget extends ModeWidgets {
|
||||
public ColorModeWidget() {
|
||||
super(FlowerMode.Colour, WindowBotanistDatabase.this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createListBox(IArea area) {
|
||||
listBox = new ControlListBox<IFlowerColor>(modePage, area.x(), area.y(), area.w(), area.h(), 12.0f) {
|
||||
@Override
|
||||
public IWidget createOption(IFlowerColor value, int y) {
|
||||
return new ControlColorOption(getContent(), value, y);
|
||||
}
|
||||
};
|
||||
List<IFlowerColor> colors = new ArrayList<>();
|
||||
Collections.addAll(colors, EnumFlowerColor.values());
|
||||
listBox.setOptions(colors);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user