diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLConfigGuiFactory.java b/fml/src/main/java/cpw/mods/fml/client/FMLConfigGuiFactory.java index 84964aa10c..e2274a7349 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLConfigGuiFactory.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLConfigGuiFactory.java @@ -75,7 +75,7 @@ public class FMLConfigGuiFactory implements IModGuiFactory // Numbers category numbersList.add((new DummyConfigElement("basicInteger", 42, ConfigGuiType.INTEGER, "fml.config.sample.basicInteger"))); numbersList.add((new DummyConfigElement("boundedInteger", 42, ConfigGuiType.INTEGER, "fml.config.sample.boundedInteger", -1, 256))); - numbersList.add((new DummyConfigElement("sliderInteger", 42, ConfigGuiType.INTEGER, "fml.config.sample.sliderInteger", -1, 256)).setCustomListEntryClass(NumberSliderEntry.class)); + numbersList.add((new DummyConfigElement("sliderInteger", 2000, ConfigGuiType.INTEGER, "fml.config.sample.sliderInteger", 100, 10000)).setCustomListEntryClass(NumberSliderEntry.class)); numbersList.add(new DummyConfigElement("basicDouble", 42.4242D, ConfigGuiType.DOUBLE, "fml.config.sample.basicDouble")); numbersList.add(new DummyConfigElement("boundedDouble", 42.4242D, ConfigGuiType.DOUBLE, "fml.config.sample.boundedDouble", -1.0D, 256.256D)); numbersList.add(new DummyConfigElement("sliderDouble", 42.4242D, ConfigGuiType.DOUBLE, "fml.config.sample.sliderDouble", -1.0D, 256.256D).setCustomListEntryClass(NumberSliderEntry.class)); diff --git a/fml/src/main/java/cpw/mods/fml/client/config/GuiConfigEntries.java b/fml/src/main/java/cpw/mods/fml/client/config/GuiConfigEntries.java index e5f22c5400..83ad3b2214 100644 --- a/fml/src/main/java/cpw/mods/fml/client/config/GuiConfigEntries.java +++ b/fml/src/main/java/cpw/mods/fml/client/config/GuiConfigEntries.java @@ -812,7 +812,7 @@ public class GuiConfigEntries extends GuiListExtended public boolean isDefault() { if (configElement.getType() == ConfigGuiType.INTEGER) - return (int) ((GuiSlider) this.btnValue).getValue() == Integer.valueOf(configElement.getDefault().toString()); + return ((GuiSlider) this.btnValue).getValueInt() == Integer.valueOf(configElement.getDefault().toString()); else return ((GuiSlider) this.btnValue).getValue() == Double.valueOf(configElement.getDefault().toString()); } @@ -831,7 +831,7 @@ public class GuiConfigEntries extends GuiListExtended public boolean isChanged() { if (configElement.getType() == ConfigGuiType.INTEGER) - return (int) ((GuiSlider) this.btnValue).getValue() != (int) beforeValue; + return ((GuiSlider) this.btnValue).getValueInt() != (int) Math.round(beforeValue); else return ((GuiSlider) this.btnValue).getValue() != beforeValue; } @@ -852,7 +852,7 @@ public class GuiConfigEntries extends GuiListExtended if (this.enabled() && this.isChanged()) { if (configElement.getType() == ConfigGuiType.INTEGER) - configElement.set((int) ((GuiSlider) this.btnValue).getValue()); + configElement.set(((GuiSlider) this.btnValue).getValueInt()); else configElement.set(((GuiSlider) this.btnValue).getValue()); return configElement.requiresMcRestart(); @@ -864,7 +864,7 @@ public class GuiConfigEntries extends GuiListExtended public Object getCurrentValue() { if (configElement.getType() == ConfigGuiType.INTEGER) - return (int) ((GuiSlider) this.btnValue).getValue(); + return ((GuiSlider) this.btnValue).getValueInt(); else return ((GuiSlider) this.btnValue).getValue(); } @@ -1501,7 +1501,7 @@ public class GuiConfigEntries extends GuiListExtended String comment; - comment = I18n.format(configElement.getLanguageKey() + ".tooltip"); + comment = I18n.format(configElement.getLanguageKey() + ".tooltip").replace("\\n", "\n"); if (!comment.equals(configElement.getLanguageKey() + ".tooltip")) toolTip = new ArrayList(this.mc.fontRenderer.listFormattedStringToWidth( diff --git a/fml/src/main/resources/assets/fml/lang/en_US.lang b/fml/src/main/resources/assets/fml/lang/en_US.lang index 09a4eb17e4..d57f99fad3 100644 --- a/fml/src/main/resources/assets/fml/lang/en_US.lang +++ b/fml/src/main/resources/assets/fml/lang/en_US.lang @@ -36,7 +36,7 @@ fml.config.sample.imABoolean.tooltip=Yep, that's pretty much it... I'm a Boolean fml.config.sample.imABoolean=I'm a Boolean fml.config.sample.imADouble.tooltip=There are two of me. Or maybe I work for both the CIA and the KGB. Not sure. fml.config.sample.imADouble=I'm a Double -fml.config.sample.imAString.tooltip=Aah. Now, I understand you want us to advertise your washing powder. <*String.*> String, washing powder, what's the difference? We can sell anything. <*Good. Well I have this large quantity of string, 122,000 miles of it to be exact, which I inherited, and I thought if I advertised it...*> Of course! A national campaign. Useful stuff, string, no trouble there. <*Ah, but there's a snag, you see. Due to bad planning, the 122,000 miles is in three inch lengths. So it's not very useful.*> Well, that's our selling point! SIMPSON'S INDIVIDUAL STRINGETTES! THE NOW STRING! READY CUT, EASY TO HANDLE, SIMPSON'S INDIVIDUAL EMPEROR STRINGETTES - JUST THE RIGHT LENGTH! +fml.config.sample.imAString.tooltip=Aah. Now, I understand you want us to advertise your washing powder. \n<*String.*> \nString, washing powder, what's the difference? We can sell anything. \n<*Good. Well I have this large quantity of string, 122,000 miles of it to be exact, which I inherited, and I thought if I advertised it...*> \nOf course! A national campaign. Useful stuff, string, no trouble there. \n<*Ah, but there's a snag, you see. Due to bad planning, the 122,000 miles is in three inch lengths. So it's not very useful.*> \nWell, that's our selling point! SIMPSON'S INDIVIDUAL STRINGETTES! THE NOW STRING! READY CUT, EASY TO HANDLE, SIMPSON'S INDIVIDUAL EMPEROR STRINGETTES - JUST THE RIGHT LENGTH! fml.config.sample.imAString=I'm a String fml.config.sample.imAnInteger.tooltip=Did I say that I'm an Integer? Oh, I see. fml.config.sample.imAnInteger=I'm an Integer