/// <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);
 }
Exemple #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;
        }
        /// <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;
        }