Пример #1
0
 /// <summary>
 /// Adds the buttons (and other controls) to the screen in question.
 /// </summary>
 public override void InitGui()
 {
     //Keyboard.enableRepeatEvents(true);
     Field_50063_c = Mc.IngameGUI.Func_50013_c().Count;
     Field_50064_a = new GuiTextField(FontRenderer, 4, Height - 12, Width - 4, 12);
     Field_50064_a.SetMaxStringLength(100);
     Field_50064_a.Func_50027_a(false);
     Field_50064_a.setFocused(true);
     Field_50064_a.SetText(Field_50066_k);
     Field_50064_a.Func_50026_c(false);
 }
Пример #2
0
        /// <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("selectServer.select")));
            ControlList.Add(new GuiButton(1, Width / 2 - 100, Height / 4 + 120 + 12, stringtranslate.TranslateKey("gui.cancel")));
            ServerTextField = new GuiTextField(FontRenderer, Width / 2 - 100, 116, 200, 20);
            ServerTextField.SetMaxStringLength(128);
            ServerTextField.setFocused(true);
            ServerTextField.SetText(Field_52009_d);
            ControlList[0].Enabled = ServerTextField.GetText().Length > 0 && StringHelperClass.StringSplit(ServerTextField.GetText(), ":", true).Length > 0;
        }
Пример #3
0
        /// <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);
        }
        /// <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("addServer.add")));
            ControlList.Add(new GuiButton(1, Width / 2 - 100, Height / 4 + 120 + 12, stringtranslate.TranslateKey("gui.cancel")));
            ServerName = new GuiTextField(FontRenderer, Width / 2 - 100, 76, 200, 20);
            ServerName.setFocused(true);
            ServerName.SetText(ServerNBTStorage.Name);
            ServerAddress = new GuiTextField(FontRenderer, Width / 2 - 100, 116, 200, 20);
            ServerAddress.SetMaxStringLength(128);
            ServerAddress.SetText(ServerNBTStorage.Host);
            ControlList[0].Enabled = ServerAddress.GetText().Length > 0 && StringHelperClass.StringSplit(ServerAddress.GetText(), ":", true).Length > 0 && ServerName.GetText().Length > 0;
        }
Пример #5
0
        /// <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 - 155, Height - 28, 150, 20, stringtranslate.TranslateKey("selectWorld.create")));
            ControlList.Add(new GuiButton(1, Width / 2 + 5, Height - 28, 150, 20, stringtranslate.TranslateKey("gui.cancel")));
            ControlList.Add(GameModeButton           = new GuiButton(2, Width / 2 - 75, 100, 150, 20, stringtranslate.TranslateKey("selectWorld.gameMode")));
            ControlList.Add(MoreWorldOptions         = new GuiButton(3, Width / 2 - 75, 172, 150, 20, stringtranslate.TranslateKey("selectWorld.moreWorldOptions")));
            ControlList.Add(GenerateStructuresButton = new GuiButton(4, Width / 2 - 155, 100, 150, 20, stringtranslate.TranslateKey("selectWorld.mapFeatures")));
            GenerateStructuresButton.ShowButton      = false;
            ControlList.Add(WorldTypeButton          = new GuiButton(5, Width / 2 + 5, 100, 150, 20, stringtranslate.TranslateKey("selectWorld.mapType")));
            WorldTypeButton.ShowButton = false;
            TextboxWorldName           = new GuiTextField(FontRenderer, Width / 2 - 100, 60, 200, 20);
            TextboxWorldName.setFocused(true);
            TextboxWorldName.SetText(LocalizedNewWorldText);
            TextboxSeed = new GuiTextField(FontRenderer, Width / 2 - 100, 60, 200, 20);
            TextboxSeed.SetText(Seed);
            MakeUseableName();
            Func_35363_g();
        }