Update Language Files and implemented in GUI
Update Config File
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package de.skate702.craftingkeys.config;
|
package de.skate702.craftingkeys.config;
|
||||||
|
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
import de.skate702.craftingkeys.CraftingKeys;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
import net.minecraftforge.common.config.Property;
|
import net.minecraftforge.common.config.Property;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
@@ -103,7 +104,7 @@ public class Config {
|
|||||||
*/
|
*/
|
||||||
public static void loadConfig(FMLPreInitializationEvent event) {
|
public static void loadConfig(FMLPreInitializationEvent event) {
|
||||||
|
|
||||||
configFile = new Configuration(event.getSuggestedConfigurationFile());
|
configFile = new Configuration(event.getSuggestedConfigurationFile(), CraftingKeys.VERSION);
|
||||||
|
|
||||||
configFile.load();
|
configFile.load();
|
||||||
|
|
||||||
@@ -142,31 +143,42 @@ public class Config {
|
|||||||
* Loads all properties from the configFile file.
|
* Loads all properties from the configFile file.
|
||||||
*/
|
*/
|
||||||
private static void syncProperties() {
|
private static void syncProperties() {
|
||||||
|
|
||||||
// Standard Keys
|
// Standard Keys
|
||||||
|
|
||||||
keyTopLeft = configFile.get(categoryKeys, "1. Top Left", Keyboard.KEY_Q, "Top Left crafting key (key value)");
|
keyTopLeft = configFile.get(categoryKeys, "1.0-keyTopLeft", Keyboard.KEY_Q, "Top Left crafting key (key value)");
|
||||||
keyTopCenter = configFile.get(categoryKeys, "2. Top Center", Keyboard.KEY_W, "Top Center crafting key (key value)");
|
keyTopLeft.setLanguageKey("key.topleft");
|
||||||
keyTopRight = configFile.get(categoryKeys, "3. Top Right", Keyboard.KEY_E, "Top Right crafting key (key value)");
|
keyTopCenter = configFile.get(categoryKeys, "1.1-2keyTopCenter", Keyboard.KEY_W, "Top Center crafting key (key value)");
|
||||||
|
keyTopCenter.setLanguageKey("key.topcenter");
|
||||||
|
keyTopRight = configFile.get(categoryKeys, "1.2-keyTopRight", Keyboard.KEY_E, "Top Right crafting key (key value)");
|
||||||
|
keyTopRight.setLanguageKey("key.topright");
|
||||||
|
|
||||||
keyCenterLeft = configFile.get(categoryKeys, "4. Center Left", Keyboard.KEY_A, "Center Left crafting key (key value)");
|
keyCenterLeft = configFile.get(categoryKeys, "2.0-keyCenterLeft", Keyboard.KEY_A, "Center Left crafting key (key value)");
|
||||||
keyCenterCenter = configFile.get(categoryKeys, "5. Center Center", Keyboard.KEY_S, "Center Center crafting key (key value)");
|
keyCenterLeft.setLanguageKey("key.centerleft");
|
||||||
keyCenterRight = configFile.get(categoryKeys, "6. Center Right", Keyboard.KEY_D, "Center Right crafting key (key value)");
|
keyCenterCenter = configFile.get(categoryKeys, "2.1-keyCenterCenter", Keyboard.KEY_S, "Center Center crafting key (key value)");
|
||||||
|
keyCenterCenter.setLanguageKey("key.centercenter");
|
||||||
|
keyCenterRight = configFile.get(categoryKeys, "2.2-keyCenterRight", Keyboard.KEY_D, "Center Right crafting key (key value)");
|
||||||
|
keyCenterRight.setLanguageKey("key.centerright");
|
||||||
|
|
||||||
keyLowerLeft = configFile.get(categoryKeys, "7. Lower Left", Keyboard.KEY_Y, "Lower Left crafting key (key value)"); // German Keyboard Layout
|
keyLowerLeft = configFile.get(categoryKeys, "3.0-keyLowerLeft", Keyboard.KEY_Y, "Lower Left crafting key (key value)"); // German Keyboard Layout
|
||||||
keyLowerCenter = configFile.get(categoryKeys, "8. Lower Center", Keyboard.KEY_X, "Lower Center crafting key (key value)");
|
keyLowerLeft.setLanguageKey("key.lowerleft");
|
||||||
keyLowerRight = configFile.get(categoryKeys, "9. Lower Right", Keyboard.KEY_C, "Lower Right crafting key (key value)");
|
keyLowerCenter = configFile.get(categoryKeys, "3.1-keyLowerCenter", Keyboard.KEY_X, "Lower Center crafting key (key value)");
|
||||||
|
keyLowerCenter.setLanguageKey("key.lowercenter");
|
||||||
|
keyLowerRight = configFile.get(categoryKeys, "3.2-keyLowerRight", Keyboard.KEY_C, "Lower Right crafting key (key value)");
|
||||||
|
keyLowerRight.setLanguageKey("key.lowerright");
|
||||||
|
|
||||||
// Special Keys
|
// Special Keys
|
||||||
|
|
||||||
keyStack = configFile.get(categoryKeys, "Stack Key", Keyboard.KEY_LSHIFT, "Key to move stacks instead of single items (key value)");
|
keyStack = configFile.get(categoryKeys, "4.0-keyStack", Keyboard.KEY_LSHIFT, "Key to move stacks instead of single items (key value)");
|
||||||
keyInteract = configFile.get(categoryKeys, "Interaction Key", Keyboard.KEY_LCONTROL, "Key to interact with e.g. crafting output (key value)");
|
keyStack.setLanguageKey("key.stack");
|
||||||
keyDrop = configFile.get(categoryKeys, "Drop Key", Keyboard.KEY_SPACE, "Key to drop all items from crafting (key value)");
|
keyInteract = configFile.get(categoryKeys, "4.1-keyInteract", Keyboard.KEY_LCONTROL, "Key to interact with e.g. crafting output (key value)");
|
||||||
|
keyInteract.setLanguageKey("key.interact");
|
||||||
|
keyDrop = configFile.get(categoryKeys, "4.2-keyDrop", Keyboard.KEY_SPACE, "Key to drop all items from crafting (key value)");
|
||||||
|
keyDrop.setLanguageKey("key.drop");
|
||||||
|
|
||||||
// Other Settings
|
// Other Settings
|
||||||
|
|
||||||
enableNumPad = configFile.get(categoryOther, "Enable Num Pad", true, "Activates the NumPad for crafting");
|
enableNumPad = configFile.get(categoryOther, "numPadEnabled", true, "Activates the NumPad for crafting");
|
||||||
|
enableNumPad.setLanguageKey("options.numpadEnabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ key.lowercenter=8. Unten Mitte
|
|||||||
key.lowerright=9. Unten Rechts
|
key.lowerright=9. Unten Rechts
|
||||||
key.stack=Stack Taste
|
key.stack=Stack Taste
|
||||||
key.interact=Interaktions Taste
|
key.interact=Interaktions Taste
|
||||||
|
key.drop=Drop Taste
|
||||||
|
|
||||||
|
options.numpadEnabled=Aktiviere Num pad
|
||||||
|
|
||||||
# Control Category Name
|
# Control Category Name
|
||||||
key.categories.craftingkeys=Crafting Keys
|
key.categories.craftingkeys=Crafting Keys
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ key.lowercenter=8. Lower Center
|
|||||||
key.lowerright=9. Lower Right
|
key.lowerright=9. Lower Right
|
||||||
key.stack=Stack Key
|
key.stack=Stack Key
|
||||||
key.interact=Interaction Key
|
key.interact=Interaction Key
|
||||||
|
key.drop=Drop Key
|
||||||
|
|
||||||
|
options.numpadEnabled=Enable Num Pad
|
||||||
|
|
||||||
# Control Category Name
|
# Control Category Name
|
||||||
key.categories.craftingkeys=Crafting Keys
|
key.categories.craftingkeys=Crafting Keys
|
||||||
|
|||||||
Reference in New Issue
Block a user