//ParticleComponent particleComponent; public GameSurface() : base() { this.Bounds = new Rectangle(0, (int)(Setting.Setting.resolutionY * 0.7), Setting.Setting.resolutionX, (int)(Setting.Setting.resolutionY * 0.3)); this.AllowMultipleFocus = true; this.healthComponent = new Healthbar(new Rectangle((int)(this.Bounds.X + this.Bounds.Width * 0.106), (int)(this.Bounds.Y + this.Bounds.Height * 0.18), 187, 188)); this.healthComponent.BackgroundGraphicPath = "Gui/Menu/GameSurface/Health"; this.add(this.healthComponent); this.manaComponent = new Component(new Rectangle((int)(this.Bounds.X + this.Bounds.Width * 0.662), (int)(this.Bounds.Y + this.Bounds.Height * 0.18), 187, 188)); this.manaComponent.BackgroundGraphicPath = "Gui/Menu/GameSurface/Mana"; this.add(this.manaComponent); this.interfaceComponent = new Component(new Rectangle((int)(this.Bounds.X + this.Bounds.Width * 0.1), (int)(this.Bounds.Y + this.Bounds.Height * 0.15), 767, 201)); this.interfaceComponent.BackgroundGraphicPath = "Gui/Menu/GameSurface/Interface"; this.add(this.interfaceComponent); this.inventoryButton = new Button(new Rectangle((int)(this.Bounds.X + this.Bounds.Width * 0.5), (int)(this.Bounds.Y + this.Bounds.Height * 0.3), 25, 25)); this.inventoryButton.BackgroundGraphicPath = "Gui/Menu/Inventory/InventoryButton"; this.inventoryButton.Action = inventoryButton_Click; this.inventoryButton.IsTextEditAble = false; this.add(this.inventoryButton); this.inventoryMenu = new InventoryMenu(Configuration.Configuration.networkManager.client.PlayerObject); this.inventoryMenu.setIsActive(false); this.add(this.inventoryMenu); }
public StartMenu() : base() { this.Bounds = new Rectangle(0,0,1000,1000); // TODO: Größe an Bildschirm anpassen! this.BackgroundGraphicPath = "Gui/Background"; this.AllowMultipleFocus = true; this.characterMenuButton = new Button(new Rectangle(200, 300, 289, 85)); this.characterMenuButton.Text = "Character Menu"; this.add(this.characterMenuButton); this.characterMenuButton.Action = openCharacterMenu; }
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; }
public CharacterMenu() : 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.charactersListView = new ListView (new Rectangle (500, 0, 289, 600)); this.add(this.charactersListView); this.fillCharactersListView(); this.createNewCharacterButton = new Button(new Rectangle(200, 200, 289, 85)); this.createNewCharacterButton.Text = "Create Character"; this.add(this.createNewCharacterButton); this.createNewCharacterButton.Action = openCreateCharacterMenu; this.connectToServerButton = new Button(new Rectangle(200, 300, 289, 85)); this.connectToServerButton.Text = "Connect"; this.add(this.connectToServerButton); this.connectToServerButton.Action = openConnectToServerMenu; }