public void initializeCreateScreen() { createTree = new PerkTree(); Perk newPerk = createTree.add("Herbivore", new Vector2(650, 475)); newPerk.effects = "Allows creature to\n consume plants"; newPerk.cost = "O: 100 E: 0"; newPerk.Selected = true; createTree.selectedPerkNode = newPerk; newPerk = createTree.add("Carnivore", new Vector2(900, 475)); newPerk.effects = "Allows creature to\nconsume creatures"; newPerk.cost = "O: 500 E: 1"; nameLabel.Bounds = new UniRectangle(new UniScalar(0.4f, 10f), new UniScalar(0.1f, 125.0f), 300, 0); colorLabel.Bounds = new UniRectangle(new UniScalar(0.4f, 10f), new UniScalar(0.1f, 155.0f), 300, 0); // dietLabel.Bounds = new UniRectangle(new UniScalar(0.4f, 10f), new UniScalar(0.1f, 75.0f), 80, 24); nameInput.Bounds = new UniRectangle(new UniScalar(0.5f, 10f), new UniScalar(0.1f, 125.0f), 300, 24); colorInput.Bounds = new UniRectangle(new UniScalar(0.5f, 10f), new UniScalar(0.1f, 155.0f), 300, 150); //dietInput.Bounds = new UniRectangle(new UniScalar(0.5f, 10f), new UniScalar(0.1f, 75.0f), 120, 24); createButton.Bounds = new UniRectangle(new UniScalar(0.5f, -5f), new UniScalar(0.7f, 0.0f), 200, 50); nameLabel.Text = "Species Name:"; colorLabel.Text = "Color:"; dietLabel.Text = "Diet:"; createButton.Text = "Create"; createButton.Pressed += new EventHandler(createButton_Pressed); colorInput.Items.Add("Red"); colorInput.Items.Add("Green"); colorInput.Items.Add("Blue"); colorInput.Items.Add("Brown"); colorInput.Items.Add("Orange"); colorInput.SelectionMode = Nuclex.UserInterface.Controls.Desktop.ListSelectionMode.Single; dietInput.Items.Add("Herbivore"); dietInput.Items.Add("Carnivore"); dietInput.Items.Add("Omnivore"); dietInput.SelectionMode = Nuclex.UserInterface.Controls.Desktop.ListSelectionMode.Single; nameInput.Text = "Kleemo"; createScreen.Desktop.Children.Add(nameLabel); createScreen.Desktop.Children.Add(colorLabel); createScreen.Desktop.Children.Add(dietLabel); createScreen.Desktop.Children.Add(nameInput); createScreen.Desktop.Children.Add(colorInput); createScreen.Desktop.Children.Add(dietInput); createScreen.Desktop.Children.Add(createButton); }
public void initializeMenuScreen() { perkTree = new PerkTree(); effects = new Effects(); Perk newPerk; newPerk = perkTree.add("Herbivore", new Vector2(650, 150)); newPerk.effects = "Allows creature to\n consume plants"; newPerk.cost = "O: 100 E: 0"; newPerk.oCost = 100; newPerk.eCost = 0; newPerk = perkTree.add("Carnivore", new Vector2(900, 150)); newPerk.effects = "Allows creature to\nconsume creatures"; newPerk.cost = "O: 500 E: 1"; newPerk.oCost = 500; newPerk.eCost = 1; newPerk = perkTree.add("Pincer", new Vector2(650, 450)); newPerk.effects = "Increased attack\nFaster consumption"; newPerk.cost = "O: 500 E: 5"; newPerk.oCost = 500; newPerk.eCost = 5; newPerk = perkTree.add("Tail", new Vector2(650, 300)); newPerk.effects = "Increased speed"; newPerk.cost = "O: 500 E: 5"; newPerk.oCost = 500; newPerk.eCost = 5; newPerk = perkTree.add("Eyes", new Vector2(900, 300)); newPerk.effects = "Increased detection"; newPerk.cost = "O: 200 E: 5"; newPerk.oCost = 200; newPerk.eCost = 5; newPerk = perkTree.add("Swarm", new Vector2(1150, 300)); newPerk.effects = "Increased birth rate"; newPerk.cost = "O: 1000 E: 10"; newPerk.oCost = 1000; newPerk.eCost = 10; newPerk = perkTree.add("Scent", new Vector2(900, 450)); newPerk.effects = "Detection of corpses"; newPerk.cost = "O: 500 E: 5"; newPerk.oCost = 500; newPerk.eCost = 5; newPerk = perkTree.add("Bulk", new Vector2(1150, 450)); newPerk.effects = "Increased defence\nSlower speed"; newPerk.cost = "O: 1500 E: 5"; newPerk.oCost = 1500; newPerk.eCost = 5; newPerk = perkTree.add("Hibernate", new Vector2(650, 600)); newPerk.effects = "Conserve energy by\nremaining still"; newPerk.cost = "O: 1000 E: 10"; newPerk.oCost = 1000; newPerk.eCost = 10; newPerk = perkTree.add("Canibal", new Vector2(900, 600)); newPerk.effects = "Consume corpses of\nsame species"; newPerk.cost = "O: 200 E: 5"; newPerk.oCost = 200; newPerk.eCost = 5; //initialize elements speciesList = new Nuclex.UserInterface.Controls.Desktop.ListControl(); upgradeButton = new Nuclex.UserInterface.Controls.Desktop.ButtonControl(); cancelButton = new Nuclex.UserInterface.Controls.Desktop.ButtonControl(); //menuSlider = new Nuclex.UserInterface.Controls.Desktop.HorizontalSliderControl(); //description = new Nuclex.UserInterface.Controls.LabelControl(); speciesList.Bounds = new UniRectangle(new UniScalar(0.0f, 50.0f),new UniScalar(0.0f, 200.0f),new UniScalar(0.0f, 300.0f),new UniScalar(0.0f, 250.0f)); speciesList.SelectionMode = Nuclex.UserInterface.Controls.Desktop.ListSelectionMode.Single; speciesList.SelectionChanged += new EventHandler(speciesList_SelectionChanged); upgradeButton.Bounds = new UniRectangle(new UniScalar(0.02f, 0.0f), new UniScalar(0.0f, 700.0f), new UniScalar(0.0f, 250.0f), new UniScalar(0.0f, 50.0f)); upgradeButton.Text = "Upgrade"; upgradeButton.Pressed += new EventHandler(upgradeButton_Pressed); cancelButton.Bounds = new UniRectangle(new UniScalar(0.02f, 260.0f), new UniScalar(0.0f, 700.0f), new UniScalar(0.0f, 250.0f), new UniScalar(0.0f, 50.0f)); cancelButton.Text = "Cancel"; cancelButton.Pressed += new EventHandler(cancelButton_Pressed); //menuSlider.Bounds = new UniRectangle(new UniScalar(0.3f, 0), new UniScalar(0.75f, 0),new UniScalar(0.5f,0), new UniScalar(0.0f, 30)); //menuSlider.ThumbSize = 0.1f; //menuSlider.Moved += new EventHandler(perkSliderMoved); //description.Bounds = new UniRectangle(new UniScalar(0.3f, 0), new UniScalar(0.8f, 0), new UniScalar(0.5f, 0), new UniScalar(0.2f, 0)); //description.Text = Sprites.description; menuScreen.Desktop.Children.Add(speciesList); menuScreen.Desktop.Children.Add(upgradeButton); menuScreen.Desktop.Children.Add(cancelButton); }
public void initializeMenuScreen() { perkTree = new PerkTree(); effects = new Effects(); //initialize elements speciesList = new Nuclex.UserInterface.Controls.Desktop.ListControl(); Nuclex.UserInterface.Controls.Desktop.ButtonControl createButton = new Nuclex.UserInterface.Controls.Desktop.ButtonControl(); //menuSlider = new Nuclex.UserInterface.Controls.Desktop.HorizontalSliderControl(); description = new Nuclex.UserInterface.Controls.LabelControl(); speciesList.Bounds = new UniRectangle(new UniScalar(0.0f, 50.0f),new UniScalar(0.0f, 200.0f),new UniScalar(0.0f, 300.0f),new UniScalar(0.0f, 300.0f)); speciesList.SelectionMode = Nuclex.UserInterface.Controls.Desktop.ListSelectionMode.Single; createButton.Bounds = new UniRectangle(new UniScalar(0.0f, 50.0f),new UniScalar(0.0f, 505.0f),new UniScalar(0.0f, 300.0f),new UniScalar(0.0f, 50.0f)); createButton.Text = "New Species"; //menuSlider.Bounds = new UniRectangle(new UniScalar(0.3f, 0), new UniScalar(0.75f, 0),new UniScalar(0.5f,0), new UniScalar(0.0f, 30)); //menuSlider.ThumbSize = 0.1f; //menuSlider.Moved += new EventHandler(perkSliderMoved); description.Bounds = new UniRectangle(new UniScalar(0.3f, 0), new UniScalar(0.8f, 0), new UniScalar(0.5f, 0), new UniScalar(0.2f, 0)); description.Text = Sprites.description; //menuScreen.Desktop.Children.Add(menuSlider); //menuScreen.Desktop.Children.Add(speciesList); //menuScreen.Desktop.Children.Add(createButton); menuScreen.Desktop.Children.Add(description); }