Fixed some Manual stuff

This commit is contained in:
Ellpeck 2015-08-31 11:48:15 +02:00
parent ef51a85d49
commit 5b812a6b67
6 changed files with 47 additions and 29 deletions

View file

@ -170,6 +170,7 @@ public class GuiBooklet extends GuiScreen{
super.func_146283_a(list, x, y);
}
@SuppressWarnings("unchecked")
@Override
public void drawScreen(int x, int y, float f){
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
@ -217,25 +218,31 @@ public class GuiBooklet extends GuiScreen{
super.drawScreen(x, y, f);
this.searchField.drawTextBox();
if(this.currentIndexEntry != null && this.currentChapter != null && this.currentPage != null){
this.currentPage.render(this, x, y, this.mouseClicked);
}
//Achievements Hover Text
if(x >= this.guiLeft+138 && x <= this.guiLeft+138+7 && y >= this.guiTop && y <= this.guiTop+7){
this.func_146283_a(Collections.singletonList("Show Achievements"), x, y);
this.func_146283_a(Collections.singletonList(EnumChatFormatting.GOLD+"Show Achievements"), x, y);
}
//Config Hover Text
if(x >= this.guiLeft+138 && x <= this.guiLeft+138+7 && y >= this.guiTop+10 && y <= this.guiTop+10+7){
this.func_146283_a(Collections.singletonList("Show Config"), x, y);
ArrayList list = new ArrayList();
list.add(EnumChatFormatting.GOLD+"Show Configuration GUI");
list.add(EnumChatFormatting.ITALIC+"It is highly recommended that you restart");
list.add(EnumChatFormatting.ITALIC+"your game after changing anything as");
list.add(EnumChatFormatting.ITALIC+"that prevents possible bugs occuring!");
this.func_146283_a(list, x, y);
}
//Twitter Hover Text
if(x >= this.guiLeft && x <= this.guiLeft+7 && y >= this.guiTop && y <= this.guiTop+7){
this.func_146283_a(Collections.singletonList("Open @ActAddMod on Twitter in Browser"), x, y);
this.func_146283_a(Collections.singletonList(EnumChatFormatting.GOLD+"Open @ActAddMod on Twitter in Browser"), x, y);
}
//Forum Hover Text
if(x >= this.guiLeft && x <= this.guiLeft+7 && y >= this.guiTop+10 && y <= this.guiTop+10+7){
this.func_146283_a(Collections.singletonList("Open Minecraft Forum Post in Browser"), x, y);
}
if(this.currentIndexEntry != null && this.currentChapter != null && this.currentPage != null){
this.currentPage.render(this, x, y, this.mouseClicked);
this.func_146283_a(Collections.singletonList(EnumChatFormatting.GOLD+"Open Minecraft Forum Post in Browser"), x, y);
}
if(this.mouseClicked) this.mouseClicked = false;

View file

@ -47,6 +47,10 @@ public class PageCrusherRecipe extends BookletPage{
if(recipe == null){
gui.unicodeRenderer.drawSplitString(StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0);
}
else{
String strg = "Crusher Recipe";
gui.unicodeRenderer.drawString(strg, gui.guiLeft+gui.xSize/2-gui.unicodeRenderer.getStringWidth(strg)/2, gui.guiTop+10, 0);
}
String text = gui.currentPage.getText();
if(text != null && !text.isEmpty() && !text.contains("booklet.")){

View file

@ -55,6 +55,10 @@ public class PageFurnace extends BookletPage{
if(input == null){
gui.unicodeRenderer.drawSplitString(StringUtil.localize("booklet."+ModUtil.MOD_ID_LOWER+".recipeDisabled"), gui.guiLeft+14, gui.guiTop+15, 115, 0);
}
else{
String strg = "Furnace Recipe";
gui.unicodeRenderer.drawString(strg, gui.guiLeft+gui.xSize/2-gui.unicodeRenderer.getStringWidth(strg)/2, gui.guiTop+10, 0);
}
String text = gui.currentPage.getText();
if(text != null && !text.isEmpty() && !text.contains("booklet.")){

View file

@ -12,24 +12,25 @@ package ellpeck.actuallyadditions.config;
public enum ConfigCategories{
FOOD_CRAFTING("food crafting"),
MISC_CRAFTING("misc crafting"),
BLOCKS_CRAFTING("block crafting"),
ITEMS_CRAFTING("item crafting"),
TOOL_VALUES("tool values"),
MACHINE_VALUES("machine values"),
MOB_DROPS("mob drops"),
WORLD_GEN("world gen"),
POTION_RING_CRAFTING("ring crafting"),
OTHER("other"),
FLUIDS("fluids"),
DRILL_VALUES("drill values"),
CRUSHER_RECIPES("crusher recipes"),
ARMOR_VALUES("armor values");
FOOD_CRAFTING("food crafting", "Crafting Recipes for Food Items"),
BLOCKS_CRAFTING("block crafting", "Crafting Recipes for Blocks"),
ITEMS_CRAFTING("item crafting", "Crafting Recipes for Items"),
TOOL_VALUES("tool values", "Values for Tools"),
MACHINE_VALUES("machine values", "Values for Machines"),
MOB_DROPS("mob drops", "Everything regarding Item drops from mobs"),
WORLD_GEN("world gen", "Everything regarding World Generation"),
POTION_RING_CRAFTING("ring crafting", "Crafting Recipes for Rings"),
OTHER("other", "Everything else"),
FLUIDS("fluids", "Everything regarding fluids"),
DRILL_VALUES("drill values", "Properties of Drills and their Upgrades"),
CRUSHER_RECIPES("crusher recipes", "Recipes for the Crusher"),
ARMOR_VALUES("armor values", "Values for Armor");
public final String name;
public final String comment;
ConfigCategories(String name){
this.name = name;
ConfigCategories(String name, String comment){
this.name = name.toLowerCase();
this.comment = comment;
}
}

View file

@ -32,16 +32,16 @@ public class ConfigValues{
public static void defineConfigValues(Configuration config){
for(ConfigCrafting currConf : craftingConfig){
currConf.currentValue = config.getBoolean(currConf.name, currConf.category, currConf.defaultValue, "If the " + currConf.extraText + "Crafting Recipe for the "+currConf.name+" is Enabled");
currConf.currentValue = config.getBoolean(currConf.name, currConf.category.toLowerCase(), currConf.defaultValue, "If the "+currConf.extraText+"Crafting Recipe for the "+currConf.name+" is Enabled");
}
for(ConfigIntValues currConf : intConfig){
currConf.currentValue = config.getInt(currConf.name, currConf.category, currConf.defaultValue, currConf.min, currConf.max, currConf.desc);
currConf.currentValue = config.getInt(currConf.name, currConf.category.toLowerCase(), currConf.defaultValue, currConf.min, currConf.max, currConf.desc);
}
for(ConfigFloatValues currConf : floatConfig){
currConf.currentValue = config.getFloat(currConf.name, currConf.category, currConf.defaultValue, currConf.min, currConf.max, currConf.desc);
currConf.currentValue = config.getFloat(currConf.name, currConf.category.toLowerCase(), currConf.defaultValue, currConf.min, currConf.max, currConf.desc);
}
for(ConfigBoolValues currConf : boolConfig){
currConf.currentValue = config.getBoolean(currConf.name, currConf.category, currConf.defaultValue, currConf.desc);
currConf.currentValue = config.getBoolean(currConf.name, currConf.category.toLowerCase(), currConf.defaultValue, currConf.desc);
}
crusherRecipeExceptions = config.getStringList("Crusher Recipe Exceptions", ConfigCategories.CRUSHER_RECIPES.name, new String[]{"ingotBrick", "ingotBrickNether"}, "The Ingots, Dusts and Ores blacklisted from being auto-registered to be crushed by the Crusher. This list uses OreDictionary Names of the Inputs only.");

View file

@ -29,7 +29,9 @@ public class GuiConfiguration extends GuiConfig{
private static List<IConfigElement> getConfigElements(){
List<IConfigElement> list = new ArrayList<IConfigElement>();
for(int i = 0; i < ConfigCategories.values().length; i++){
list.add(new ConfigElement<ConfigCategory>(ConfigurationHandler.config.getCategory(ConfigCategories.values()[i].name.toLowerCase())));
ConfigCategories cat = ConfigCategories.values()[i];
ConfigurationHandler.config.setCategoryComment(cat.name, cat.comment);
list.add(new ConfigElement<ConfigCategory>(ConfigurationHandler.config.getCategory(cat.name)));
}
return list;
}