public static string Func_25097_a(ISaveFormat par0ISaveFormat, string par1Str) { for (par1Str = par1Str.Replace("[\\./\"]|COM", "_"); par0ISaveFormat.GetWorldInfo(par1Str) != null; par1Str = new StringBuilder().Append(par1Str).Append("-").ToString()) { } return(par1Str); }
/// <summary> /// Adds the buttons (and other controls) to the screen in question. /// </summary> public override void InitGui() { StringTranslate stringtranslate = StringTranslate.GetInstance(); //Keyboard.EnableRepeatEvents(true); ControlList.Clear(); ControlList.Add(new GuiButton(0, Width / 2 - 100, Height / 4 + 96 + 12, stringtranslate.TranslateKey("selectWorld.renameButton"))); ControlList.Add(new GuiButton(1, Width / 2 - 100, Height / 4 + 120 + 12, stringtranslate.TranslateKey("gui.cancel"))); ISaveFormat isaveformat = Mc.GetSaveLoader(); WorldInfo worldinfo = isaveformat.GetWorldInfo(WorldName); string s = worldinfo.GetWorldName(); TheGuiTextField = new GuiTextField(FontRenderer, Width / 2 - 100, 60, 200, 20); TheGuiTextField.setFocused(true); TheGuiTextField.SetText(s); }