void initializeMenu() { menu = new Menu(250.0f); Vector2 scale = new Vector2(0.8f, 0.8f); MenuElement mbHeader = new MenuElement("smallHeader", new Vector2(0, 200), scale); MenuElement mb1 = new MenuElement("option1", new Vector2(0, 50), scale); mb1.setFunction("unpause", MenuElement.tInputType.A); MenuElement mb2 = new MenuElement("option2", new Vector2(0, -50), scale); mb2.setFunction("goToSkillsMenu", MenuElement.tInputType.A); MenuElement mb3 = new MenuElement("option3", new Vector2(0, -150), scale); mb3.setFunction("exitGame", MenuElement.tInputType.A); mb3.scale = new Vector2(mb3.scale.X, mb3.scale.Y*0.8f); //menu.menuTexts.Add(new MenuText("Paused game", new Vector2(0, 230), 1.2f)); //menu.menuTexts.Add(new MenuText("Continue game", new Vector2(20, 70), 1.0f)); //menu.menuTexts.Add(new MenuText("Skills", new Vector2(15, -25), 1.0f)); //menu.menuTexts.Add(new MenuText("Exit game", new Vector2(5, -130), 1.0f)); //menu.menuTexts.Add(new MenuText("Press ::B to go back", new Vector2(250, -230), 1.0f)); mb1.upNode = mb3; mb1.downNode = mb2; mb2.upNode = mb1; mb2.downNode = mb3; mb3.upNode = mb2; mb3.downNode = mb1; menu.menuElements.Add(mbHeader); menu.menuElements.Add(mb1); menu.menuElements.Add(mb2); menu.menuElements.Add(mb3); menu.setCurrentNode(mb1); bg = TextureManager.Instance.getTexture("GUI/menu", "pausescreen-35"); }
MenuElement getBuySkillOption(string buttonTexture, string skill, string skillDescription, Vector2 position, Vector2 scale) { MenuElement me = new MenuElement(buttonTexture, position, scale); me.setFunction("buySkill", MenuElement.tInputType.X, new object[2] { skill, me}); MenuElement meLinked = new MenuElement("botoncito", position + new Vector2(120, 0), scale); me.linkedElement = meLinked; me.drawLinkedElement = GamerManager.getSessionOwner().data.skills[skill].obtained; me.description = skillDescription; me.DescriptionPosition = new Vector2(-35, 140); return me; }
void initializeMenu() { menu = new Menu(300.0f); Vector2 scale = new Vector2(1.5f, 0.9f); MenuElement mb1 = new MenuElement("", new Vector2(-20.0f, -120), scale); mb1.setFunction("startGame", MenuElement.tInputType.A); MenuElement mb2 = new MenuElement("", new Vector2(-20.0f, -185), scale); mb2.setFunction("goToCredits", MenuElement.tInputType.A); MenuElement mb3 = new MenuElement("", new Vector2(-20.0f, -260), scale); mb3.setFunction("exitToArcade", MenuElement.tInputType.A); //menu.menuTexts.Add(new MenuText("start game", new Vector2(-20, -100), 1.0f)); //menu.menuTexts.Add(new MenuText("credits", new Vector2(-20, -170), 1.0f)); //menu.menuTexts.Add(new MenuText("exit to arcade", new Vector2(-20, - 240), 1.0f)); mb1.upNode = mb3; mb1.downNode = mb2; mb2.upNode = mb1; mb2.downNode = mb3; mb3.upNode = mb2; mb3.downNode = mb1; menu.menuElements.Add(mb1); menu.menuElements.Add(mb2); menu.menuElements.Add(mb3); menu.setCurrentNode(mb1); TransitionManager.Instance.addTransition(TransitionManager.tTransition.FadeOut, 1.0f, Color.Black); }