private void createTextFieldFromCharacter(ListView _CharactersListView, PlayerObject _PlayerObject) { TextField var_TextField1 = new TextField(new Rectangle(0, 0, 289, 85)); var_TextField1.IsTextEditAble = false; var_TextField1.Text = _PlayerObject.Name; _CharactersListView.addAtBottom(var_TextField1); }
public CharacterCreationMenu() : base() { this.Bounds = new Rectangle(0,0,1000,1000); // TODO: Größe an Bildschirm anpassen! this.BackgroundGraphicPath = "Gui/Menu/CharacterCreation/Background"; this.AllowMultipleFocus = true; this.plattformComponent = new Component(new Rectangle(290, 200, 230, 70)); this.plattformComponent.BackgroundGraphicPath = "Gui/Menu/CharacterCreation/Plattform"; this.add(this.plattformComponent); this.createCharacter(Factory.FactoryEnums.GenderEnum.Male); /*this.characterComponent = new Component(new Rectangle(350, 100, 96, 128));//new Component(new Rectangle(320, 50, 170, 190)); this.characterComponent.BackgroundGraphicPath = this.playerObject.Body.MainBody.TexturePath;//"Character/BodyMale";//"Character/Char1_Big"; int var_SizeX = (int)this.playerObject.Body.MainBody.Size.X; int var_SizeY = (int)this.playerObject.Body.MainBody.Size.Y; this.characterComponent.SourceRectangle = new Rectangle(var_SizeX, 0, var_SizeX, var_SizeY); this.add(this.characterComponent);*/ this.bodyColorPicker = new Container(new Rectangle(530, 50, 300, 300)); this.createColors(); this.add(this.bodyColorPicker); this.maleButton = new Button(new Rectangle(0, 50, 60, 60)); //this.maleButton.Text = "Male"; this.maleButton.BackgroundGraphicPath = "Gui/Menu/CharacterCreation/MaleSymbol"; this.maleButton.Scale = 0.5f; this.maleButton.Action = this.selectedMale; this.add(this.maleButton); this.femaleButton = new Button(new Rectangle(60, 50, 60, 60)); //this.femaleButton.Text = "Female"; this.femaleButton.BackgroundGraphicPath = "Gui/Menu/CharacterCreation/FemaleSymbol"; this.femaleButton.Scale = 0.4f; this.femaleButton.Action = this.selectedFemale; this.add(this.femaleButton); this.playerNameTextField = new TextField(new Rectangle(260, 280, 289, 85)); this.playerNameTextField.Text = "Name"; this.add(this.playerNameTextField); this.createCharacterButton = new Button(new Rectangle(260, 380, 289, 85)); this.createCharacterButton.Text = "Accept"; this.add(this.createCharacterButton); this.createCharacterButton.Action = acceptCharacter; }
public ConnectToServerMenu() : base() { this.Bounds = new Rectangle(0,0,1000,1000); // TODO: Größe an Bildschirm anpassen! this.BackgroundGraphicPath = "Gui/Menu/CharacterCreation/Background"; this.AllowMultipleFocus = true; this.serverIPTextField = new TextField(new Rectangle(200, 100, 289, 85)); this.serverIPTextField.Text = "127.0.0.1"; this.add(this.serverIPTextField); this.serverPortTextField = new TextField(new Rectangle(200, 200, 289, 85)); this.serverPortTextField.Text = "14242"; this.add(this.serverPortTextField); this.connectServerButton = new Button(new Rectangle(200, 300, 289, 85)); this.connectServerButton.Text = "Connect"; this.add(this.connectServerButton); this.connectServerButton.Action = connectToServer; }