public InventoryMenu(int width, int height) : base(new Microsoft.Xna.Framework.Vector2(0, 0), width, height, Microsoft.Xna.Framework.Color.Black) { playerItems = new FixedMenu(vector, getWidth() / 4, (int)(getHeight() / 1.8), Microsoft.Xna.Framework.Color.LightSteelBlue, true); lootItems = new FixedMenu(new Vector2(0, (int)(getHeight() / 1.8) + 1), getWidth() / 4, getHeight() - (int)(getHeight() / 1.8), Microsoft.Xna.Framework.Color.LightSteelBlue, true); itemStats = new FixedMenu(new Vector2(getWidth() - getWidth() / 4, 0), getWidth() / 4, (int)(getHeight() / 1.8), Microsoft.Xna.Framework.Color.LightSteelBlue); itemPicture = new FixedMenu(new Vector2(getWidth() - getWidth() / 4, (int)(getHeight() / 1.8) + 1), getWidth() / 4, (int)(getHeight() / 1.8), Microsoft.Xna.Framework.Color.LightSteelBlue); playerStats = new FixedMenu(new Vector2(getWidth() / 4 + 1, getHeight() - getHeight() / 3), -(int)(playerItems.getVector().X + getWidth() / 4 - itemStats.getVector().X) - 2, getHeight() / 3, Color.LightSteelBlue); takeDropButton = new Button(new Vector2(lootItems.getVector().X + getWidth() / 4 - ResourceHandler.getInstance().getVerdana().MeasureString("Switch").X - 2, (int)(getHeight() / 1.8) + 1), "Switch", Color.White); takeDropButton.setBackground(Color.LightSteelBlue); takeDropButton.setAction(new SwitchInventory()); useItemButton = new Button(new Vector2(itemStats.getVector().X, (int)(getHeight()/1.8)), "Use", Color.White); useItemButton.setBackground(Color.LightSteelBlue); useItemButton.setAction(new UseItemAction()); equipItemButton = new Button(new Vector2(itemStats.getVector().X, (int)(getHeight() / 1.8) + useItemButton.getHeight()), "Equip", Color.White); equipItemButton.setBackground(Color.LightSteelBlue); equipItemButton.setAction(new EquipItemAction()); setLayer(5); setEnabled(false); takeDropButton.setLayer(6); useItemButton.setLayer(6); equipItemButton.setLayer(6); }
public MainMenu(int width, int height) : base(new Microsoft.Xna.Framework.Vector2(0, 0), width, height, Microsoft.Xna.Framework.Color.Black) { mainList = new FixedMenu(vector, getWidth() / 4, (int)getHeight(), Microsoft.Xna.Framework.Color.LightSteelBlue, false); extraInput = new FixedMenu(new Vector2(getWidth() - getWidth() / 4, 0), getWidth() / 4, (int)(getHeight() / 1.8), Microsoft.Xna.Framework.Color.LightSteelBlue); questRewards = new FixedMenu(new Vector2(getWidth() - getWidth() / 4, (int)(getHeight() / 1.8) + 1), getWidth() / 4, (int)(getHeight() / 1.8), Microsoft.Xna.Framework.Color.LightSteelBlue); tutorials = new FixedMenu(new Vector2(getWidth() / 4 + 1, getHeight() - getHeight() / 3), -(int)(mainList.getVector().X + getWidth() / 4 - extraInput.getVector().X) - 2, getHeight() / 3, Color.LightSteelBlue); setEnabled(false); mainList.add(new Label(Vector2.Zero, "- Main Menu -", Color.White)); mainList.add(new Label(Vector2.Zero, "", Color.White)); mainList.add(new SaveButton()); mainList.add(new LoadDungeonButton()); mainList.add(new Label(Vector2.Zero, "", Color.White)); mainList.add(new GenerateDungeonButton()); mainList.add(new ExitButton()); addTutorial("AetherQuest Version 1.0.0 Alpha"); addTutorial("Generate a new Dungeon in the Top Left!"); addTutorial("Defaults:"); addTutorial("A - Left"); addTutorial("D - Right"); addTutorial("Space - Jump"); addTutorial("1 - Activate"); addTutorial("2 - Melee Attack"); addTutorial("3 - Shoot Ammo"); }
public ScrollButtonAction(FixedMenu fixedMenu) { this.fixedMenu = fixedMenu; }