Exemplo n.º 1
0
        public TeachInfoMenu(int itemNum)
        {
            Bounds = Rect.FromPoints(new Loc(16, 24), new Loc(GraphicsManager.ScreenWidth - 16, GraphicsManager.ScreenHeight - 72));

            ItemData       itemData = DataManager.Instance.GetItem(itemNum);
            ItemIndexState effect   = itemData.ItemStates.GetWithDefault <ItemIndexState>();

            SkillData   skillEntry   = DataManager.Instance.GetSkill(effect.Index);
            ElementData elementEntry = DataManager.Instance.GetElement(skillEntry.Data.Element);

            SkillName    = new MenuText(skillEntry.GetColoredName(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight));
            SkillCharges = new MenuText(Text.FormatKey("MENU_SKILLS_TOTAL_CHARGES", skillEntry.BaseCharges), Bounds.Start + new Loc((Bounds.End.X - Bounds.X) / 2, GraphicsManager.MenuBG.TileHeight));

            SkillElement  = new MenuText(Text.FormatKey("MENU_SKILLS_ELEMENT", elementEntry.GetIconName()), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE));
            SkillCategory = new MenuText(Text.FormatKey("MENU_SKILLS_CATEGORY", skillEntry.Data.Category.ToLocal()), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2));

            BasePowerState powerState = skillEntry.Data.SkillStates.GetWithDefault <BasePowerState>();

            SkillPower   = new MenuText(Text.FormatKey("MENU_SKILLS_POWER", (powerState != null ? powerState.Power.ToString() : "---")), Bounds.Start + new Loc((Bounds.End.X - Bounds.X) / 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE));
            SkillHitRate = new MenuText(Text.FormatKey("MENU_SKILLS_HIT_RATE", (skillEntry.Data.HitRate > -1 ? skillEntry.Data.HitRate + "%" : "---")), Bounds.Start + new Loc((Bounds.End.X - Bounds.X) / 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2));

            SkillTargets = new MenuText(Text.FormatKey("MENU_SKILLS_RANGE", skillEntry.HitboxAction.GetDescription()), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3));


            Description = new DialogueText(skillEntry.Desc.ToLocal(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 4),
                                           Bounds.End.X - GraphicsManager.MenuBG.TileWidth * 4 - Bounds.X, LINE_SPACE, false);

            MenuDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3 + LINE_SPACE),
                                      Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);
        }
Exemplo n.º 2
0
        public OfferFeaturesMenu(Rect bounds, TradeTeamMenu baseMenu)
        {
            Bounds        = bounds;
            this.baseMenu = baseMenu;

            Portrait = new SpeakerPortrait(new MonsterID(), new EmoteStyle(0),
                                           Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight), false);

            Nickname = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight));
            Name     = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE));

            Level = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2));

            Elements = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3));

            MainDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 4 - 2), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Skills = new MenuText[CharData.MAX_SKILL_SLOTS];
            for (int ii = 0; ii < CharData.MAX_SKILL_SLOTS; ii++)
            {
                Skills[ii] = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * (ii + 4)));
            }

            IntrinsicDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 8 - 2), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Intrinsic = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 8));
        }
Exemplo n.º 3
0
        public ScoreMenu(Dictionary <int, List <RecordHeaderData> > scoreDict, int chosenZone, string highlightedPath)
        {
            this.scoreDict       = scoreDict;
            this.chosenZone      = chosenZone;
            this.highlightedPath = highlightedPath;
            List <RecordHeaderData> scores = scoreDict[chosenZone];

            Bounds = Rect.FromPoints(new Loc(GraphicsManager.ScreenWidth / 2 - 128, 16), new Loc(GraphicsManager.ScreenWidth / 2 + 128, 224));

            string zoneName = DataManager.Instance.DataIndices[DataManager.DataType.Zone].Entries[chosenZone].Name.ToLocal();

            Title = new MenuText(Text.FormatKey("MENU_SCORES_TITLE") + ": " + zoneName, Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth + 8, GraphicsManager.MenuBG.TileHeight));
            Div   = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Scores = new MenuText[scores.Count * 3];
            for (int ii = 0; ii < scores.Count; ii++)
            {
                Color color = (scores[ii].Path == highlightedPath) ? Color.Yellow : Color.White;
                Scores[ii * 3] = new MenuText((ii + 1) + ". ",
                                              new Loc(Bounds.X + GraphicsManager.MenuBG.TileWidth * 2 + 12, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * ii + TitledStripMenu.TITLE_OFFSET), DirV.Up, DirH.Right, color);
                Scores[ii * 3 + 1] = new MenuText(scores[ii].Name,
                                                  new Loc(Bounds.X + GraphicsManager.MenuBG.TileWidth * 2 + 12, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * ii + TitledStripMenu.TITLE_OFFSET), color);
                Scores[ii * 3 + 2] = new MenuText(scores[ii].Score.ToString(),
                                                  new Loc(Bounds.End.X - GraphicsManager.MenuBG.TileWidth * 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * ii + TitledStripMenu.TITLE_OFFSET), DirV.Up, DirH.Right, color);
            }
        }
Exemplo n.º 4
0
 public SeedSummary(Rect bounds) : base(bounds)
 {
     Details = new MenuText(Text.FormatKey("MENU_SEED_CUSTOMIZE", DiagManager.Instance.GetControlString(FrameInput.InputType.SortItems)), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight));
     Elements.Add(Details);
     MenuDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE),
                               Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);
     Elements.Add(MenuDiv);
 }
Exemplo n.º 5
0
 public CharaSummary(Rect bounds) : base(bounds)
 {
     Details = new MenuText(Text.FormatKey("MENU_CHARA_CUSTOMIZE", DiagManager.Instance.CurSettings.ActionKeys[(int)FrameInput.InputType.SortItems].ToLocal()), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight));
     Elements.Add(Details);
     MenuDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE),
                               Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);
     Elements.Add(MenuDiv);
 }
Exemplo n.º 6
0
 public TradeSummary(Rect bounds)
     : base(bounds)
 {
     Title = new MenuText(Text.FormatKey("MENU_SWAP_NEEDED"), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight));
     Elements.Add(Title);
     MenuDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE),
                               Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);
     Elements.Add(MenuDiv);
 }
Exemplo n.º 7
0
 public MsgLogMenu()
 {
     entries  = new List <MenuText>();
     dividers = new List <MenuDivider>();
     Bounds   = Rect.FromPoints(new Loc(LiveMsgLog.SIDE_BUFFER, 24), new Loc(GraphicsManager.ScreenWidth - LiveMsgLog.SIDE_BUFFER, GraphicsManager.ScreenHeight - 8));
     Title    = new MenuText(Text.FormatKey("MENU_MSG_LOG_TITLE"), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth + 8, GraphicsManager.MenuBG.TileHeight));
     Div      = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);
     LoadMsgs();
 }
Exemplo n.º 8
0
 public DungeonSummary(Rect bounds) : base(bounds)
 {
     DungeonName = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight));
     Elements.Add(DungeonName);
     MenuDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE),
                               Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);
     Elements.Add(MenuDiv);
     Floors = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + TitledStripMenu.TITLE_OFFSET));
     Elements.Add(Floors);
 }
Exemplo n.º 9
0
        public InfoMenu(string title, string message)
        {
            Bounds = new Rect(new Loc(40, 32), new Loc(240, 176));

            Title = new MenuText(title, Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth + 8, GraphicsManager.MenuBG.TileHeight));
            Div   = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Info = new DialogueText(message, Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + TitledStripMenu.TITLE_OFFSET),
                                    Bounds.End.X - GraphicsManager.MenuBG.TileWidth * 3 - Bounds.X, LINE_SPACE, false);
        }
Exemplo n.º 10
0
        public OfferItemsMenu(Rect bounds, TradeItemMenu baseMenu)
        {
            Bounds        = bounds;
            this.baseMenu = baseMenu;

            Title   = new MenuText(Text.FormatKey("MENU_TRADE_ITEM_OFFER"), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth + 8, GraphicsManager.MenuBG.TileHeight));
            MainDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Items = new MenuText[0];
        }
Exemplo n.º 11
0
        public SkillMenu(int teamIndex, int skillSlot)
        {
            int menuWidth = 152;

            List <Character> openPlayers = new List <Character>();

            foreach (Character character in DataManager.Instance.Save.ActiveTeam.Players)
            {
                openPlayers.Add(character);
            }

            MenuChoice[][] skills = new MenuChoice[openPlayers.Count][];
            for (int ii = 0; ii < openPlayers.Count; ii++)
            {
                List <MenuChoice> char_skills = new List <MenuChoice>();
                for (int jj = 0; jj < DataManager.Instance.Save.ActiveTeam.Players[ii].Skills.Count; jj++)
                {
                    Skill skill = DataManager.Instance.Save.ActiveTeam.Players[ii].Skills[jj].Element;
                    if (skill.SkillNum > -1)
                    {
                        SkillData data         = DataManager.Instance.GetSkill(skill.SkillNum);
                        string    skillString  = (skill.Enabled ? "\uE10A " : "") + data.Name.ToLocal();
                        string    skillCharges = skill.Charges + "/" + (data.BaseCharges + DataManager.Instance.Save.ActiveTeam.Players[ii].ChargeBoost);
                        bool      disabled     = (skill.Sealed || skill.Charges <= 0);
                        int       index        = jj;
                        MenuText  menuText     = new MenuText(skillString, new Loc(2, 1), disabled ? Color.Red : Color.White);
                        MenuText  menuCharges  = new MenuText(skillCharges, new Loc(menuWidth - 8 * 4, 1), DirV.Up, DirH.Right, disabled ? Color.Red : Color.White);
                        if (jj < Character.MAX_SKILL_SLOTS - 1)
                        {
                            MenuDivider div = new MenuDivider(new Loc(0, LINE_SPACE), menuWidth - 8 * 4);
                            char_skills.Add(new MenuElementChoice(() => { choose(index); }, true, menuText, menuCharges, div));
                        }
                        else
                        {
                            char_skills.Add(new MenuElementChoice(() => { choose(index); }, true, menuText, menuCharges));
                        }
                    }
                }
                skills[ii] = char_skills.ToArray();
            }

            if (skillSlot == -1)
            {
                skillSlot = Math.Min(Math.Max(0, defaultChoice), skills[teamIndex].Length - 1);
            }

            summaryMenu = new SkillSummary(Rect.FromPoints(new Loc(16,
                                                                   GraphicsManager.ScreenHeight - 8 - GraphicsManager.MenuBG.TileHeight * 2 - LINE_SPACE * 2 - VERT_SPACE * 4),
                                                           new Loc(GraphicsManager.ScreenWidth - 16, GraphicsManager.ScreenHeight - 8)));

            Initialize(new Loc(16, 16), menuWidth, Text.FormatKey("MENU_SKILLS_TITLE", DataManager.Instance.Save.ActiveTeam.Players[CurrentPage].BaseName), skills, skillSlot, teamIndex, CharData.MAX_SKILL_SLOTS);
        }
Exemplo n.º 12
0
 protected void Initialize(Rect bounds, MenuDigits digits, int min, int max, int defaultDigit)
 {
     Bounds        = bounds;
     Digits        = digits;
     Min           = min;
     Max           = max;
     CurrentChoice = defaultDigit;
     DigitLines    = new MenuDivider[digits.MinDigits];
     for (int ii = 0; ii < DigitLines.Length; ii++)
     {
         DigitLines[ii] = new MenuDivider(Digits.GetDigitLoc(ii) + new Loc(-1, 12), MenuDigits.DIGIT_SPACE - 1);
     }
 }
Exemplo n.º 13
0
        public RescueCardMenu()
        {
            Bounds = new Rect(8, 8, 192, GraphicsManager.MenuBG.TileHeight * 2 + TitledStripMenu.TITLE_OFFSET + VERT_SPACE * 7);

            Title = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth + 8, GraphicsManager.MenuBG.TileHeight));
            Div   = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Portraits = new SpeakerPortrait[0];


            Name     = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3 + TitledStripMenu.TITLE_OFFSET));
            LastSeen = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 4 + TitledStripMenu.TITLE_OFFSET));
            Goal     = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5 + TitledStripMenu.TITLE_OFFSET));
            Reward   = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 6 + TitledStripMenu.TITLE_OFFSET));
        }
Exemplo n.º 14
0
        protected void Initialize(string title, string notes, int boxLength)
        {
            Bounds = new Rect(new Loc(GraphicsManager.ScreenWidth / 2 - boxLength / 2, 50), new Loc(boxLength, TitledStripMenu.TITLE_OFFSET + LINE_SPACE * 5 + GraphicsManager.MenuBG.TileHeight * 2));

            Title = new MenuText(title, new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight), DirH.None);

            Text     = new MenuText("", new Loc(GraphicsManager.ScreenWidth / 2 - MaxLength / 2, Bounds.Y + TitledStripMenu.TITLE_OFFSET * 2));
            NameLine = new MenuDivider(new Loc(GraphicsManager.ScreenWidth / 2 - MaxLength / 2, Bounds.Y + TitledStripMenu.TITLE_OFFSET * 2 + LINE_SPACE), MaxLength);

            Notes = new MenuText(notes, new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + TitledStripMenu.TITLE_OFFSET * 2 + LINE_SPACE * 7 / 2), DirV.None, DirH.None, Color.White);

            AddAltWheel('.', '·');
            AddAltWheel('!', '¡');
            AddAltWheel('?', '¿');

            AddAltWheel('A', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ');
            AddAltWheel('C', 'Ç');
            AddAltWheel('E', 'È', 'É', 'Ê', 'Ë');
            AddAltWheel('I', 'Ì', 'Í', 'Î', 'Ï');
            AddAltWheel('D', 'Ð');
            AddAltWheel('N', 'Ñ');
            AddAltWheel('O', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Œ');
            AddAltWheel('U', 'Ù', 'Ú', 'Û', 'Ü');
            //AddAltWheel('Y', 'Ý');
            AddAltWheel('T', 'Þ');
            AddAltWheel('s', 'š', 'ß');
            AddAltWheel('a', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'œ');
            AddAltWheel('c', 'ç');
            AddAltWheel('e', 'è', 'é', 'ê', 'ë');
            AddAltWheel('i', 'ì', 'í', 'î', 'ï');
            AddAltWheel('d', 'ð');
            AddAltWheel('n', 'ñ');
            AddAltWheel('o', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø');
            AddAltWheel('u', 'ù', 'ú', 'û', 'ü');
            AddAltWheel('y', 'ý', 'ÿ');
            AddAltWheel('t', 'þ');

            AddAltWheel('S', 'Š');
            AddAltWheel('Z', 'Ž');
            AddAltWheel('z', 'ž');

            AddAltWheel('*', '♂', '♀');

            UpdatePickerPos();
        }
Exemplo n.º 15
0
        public void Initialize(GameProgress ending)
        {
            Bounds = Rect.FromPoints(new Loc(GraphicsManager.ScreenWidth / 2 - 140, 16), new Loc(GraphicsManager.ScreenWidth / 2 + 140, 224));
            Ending = ending;

            Title = new MenuText(GetTitle(),
                                 new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight), DirH.None);

            Div = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            List <Character> charList = GetChars();

            Stats     = new MenuText[charList.Count * 4];
            Portraits = new SpeakerPortrait[charList.Count];
            for (int ii = 0; ii < charList.Count; ii++)
            {
                CharData        character = charList[ii];
                MonsterData     dexEntry  = DataManager.Instance.GetMonster(character.BaseForm.Species);
                BaseMonsterForm formEntry = dexEntry.Forms[character.BaseForm.Form];
                Portraits[ii] = new SpeakerPortrait(character.BaseForm, new EmoteStyle(0),
                                                    Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + 44 * ii + TitledStripMenu.TITLE_OFFSET), false);
                string speciesText = character.BaseName + " / " + CharData.GetFullFormName(character.BaseForm);
                Stats[ii * 4] = new MenuText(speciesText,
                                             Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + 44 * ii + TitledStripMenu.TITLE_OFFSET));
                Stats[ii * 4 + 1] = new MenuText(Text.FormatKey("MENU_TEAM_LEVEL_SHORT", character.Level),
                                                 new Loc(Bounds.End.X - GraphicsManager.MenuBG.TileWidth * 2 - 24, Bounds.Y + GraphicsManager.MenuBG.TileHeight + 44 * ii + TitledStripMenu.TITLE_OFFSET));
                if (Ending.UUID == character.OriginalUUID)
                {
                    Stats[ii * 4 + 2] = new MenuText(Text.FormatKey("MENU_TEAM_MET_AT", character.MetAt),
                                                     Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE + 44 * ii + TitledStripMenu.TITLE_OFFSET));
                }
                else
                {
                    Stats[ii * 4 + 2] = new MenuText(Text.FormatKey("MENU_TEAM_TRADED_FROM", character.OriginalTeam),
                                                     Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE + 44 * ii + TitledStripMenu.TITLE_OFFSET));
                }
                Stats[ii * 4 + 3] = new MenuText((String.IsNullOrEmpty(character.DefeatAt) ? "" : Text.FormatKey("MENU_TEAM_FELL_AT", character.DefeatAt)),
                                                 Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2 + 44 * ii + TitledStripMenu.TITLE_OFFSET));

                base.Initialize();
            }
        }
Exemplo n.º 16
0
        public LevelUpMenu(int teamIndex, int oldLevel, int oldHP, int oldSpeed, int oldAtk, int oldDef, int oldMAtk, int oldMDef)
        {
            Bounds = Rect.FromPoints(new Loc(GraphicsManager.ScreenWidth / 2 - 88, 24), new Loc(GraphicsManager.ScreenWidth / 2 + 88, 160));

            Character player = DungeonScene.Instance.ActiveTeam.Players[teamIndex];

            Level = genMenuTier(Bounds.Y + GraphicsManager.MenuBG.TileHeight, Text.FormatKey("MENU_LABEL", Text.FormatKey("MENU_TEAM_LEVEL")), oldLevel, player.Level - oldLevel, player.Level);
            HP    = genMenuTier(Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2, Text.FormatKey("MENU_LABEL", Data.Stat.HP.ToLocal("tiny")), oldHP, player.MaxHP - oldHP, player.MaxHP);
            Atk   = genMenuTier(Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3, Text.FormatKey("MENU_LABEL", Data.Stat.Attack.ToLocal("tiny")), oldAtk, player.BaseAtk - oldAtk, player.BaseAtk);
            Def   = genMenuTier(Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 4, Text.FormatKey("MENU_LABEL", Data.Stat.Defense.ToLocal("tiny")), oldDef, player.BaseDef - oldDef, player.BaseDef);
            MAtk  = genMenuTier(Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5, Text.FormatKey("MENU_LABEL", Data.Stat.MAtk.ToLocal("tiny")), oldMAtk, player.BaseMAtk - oldMAtk, player.BaseMAtk);
            MDef  = genMenuTier(Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 6, Text.FormatKey("MENU_LABEL", Data.Stat.MDef.ToLocal("tiny")), oldMDef, player.BaseMDef - oldMDef, player.BaseMDef);
            Speed = genMenuTier(Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 7, Text.FormatKey("MENU_LABEL", Data.Stat.Speed.ToLocal("tiny")), oldSpeed, player.BaseSpeed - oldSpeed, player.BaseSpeed);

            Divs    = new MenuDivider[6];
            Divs[0] = new MenuDivider(new Loc(Bounds.X + GraphicsManager.MenuBG.TileWidth * 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.Width - 8 * 4);
            for (int ii = 1; ii < 6; ii++)
            {
                Divs[ii] = new MenuDivider(new Loc(Bounds.X + GraphicsManager.MenuBG.TileWidth * 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + LINE_SPACE + VERT_SPACE * (ii + 1)), Bounds.Width - 8 * 4);
            }
        }
Exemplo n.º 17
0
        public SkillReplaceMenu(Character player, int skillNum, OnChooseSlot learnAction, Action refuseAction)
        {
            int menuWidth = 152;

            this.player       = player;
            this.skillNum     = skillNum;
            this.learnAction  = learnAction;
            this.refuseAction = refuseAction;

            List <MenuChoice> char_skills = new List <MenuChoice>();

            for (int ii = 0; ii < player.BaseSkills.Count; ii++)
            {
                SlotSkill skill = player.BaseSkills[ii];
                if (skill.SkillNum > -1)
                {
                    SkillData   data         = DataManager.Instance.GetSkill(skill.SkillNum);
                    string      skillString  = data.GetColoredName();
                    string      skillCharges = skill.Charges + "/" + (data.BaseCharges + player.ChargeBoost);
                    int         index        = ii;
                    MenuText    menuText     = new MenuText(skillString, new Loc(2, 1));
                    MenuText    menuCharges  = new MenuText(skillCharges, new Loc(menuWidth - 8 * 4, 1), DirH.Right);
                    MenuDivider div          = new MenuDivider(new Loc(0, LINE_SPACE), menuWidth - 8 * 4);
                    char_skills.Add(new MenuElementChoice(() => { choose(index); }, true, menuText, menuCharges, div));
                }
            }
            string   newSkillString  = DataManager.Instance.GetSkill(skillNum).GetColoredName();
            int      maxCharges      = DataManager.Instance.GetSkill(skillNum).BaseCharges + player.ChargeBoost;
            string   newSkillCharges = maxCharges + "/" + maxCharges;
            MenuText newMenuText     = new MenuText(newSkillString, new Loc(2, 1));
            MenuText newMenuCharges  = new MenuText(newSkillCharges, new Loc(menuWidth - 8 * 4, 1), DirH.Right);

            char_skills.Add(new MenuElementChoice(() => { choose(CharData.MAX_SKILL_SLOTS); }, true, newMenuText, newMenuCharges));

            summaryMenu = new SkillSummary(Rect.FromPoints(new Loc(16,
                                                                   GraphicsManager.ScreenHeight - 8 - GraphicsManager.MenuBG.TileHeight * 2 - LINE_SPACE * 2 - VERT_SPACE * 4),
                                                           new Loc(GraphicsManager.ScreenWidth - 16, GraphicsManager.ScreenHeight - 8)));

            Initialize(new Loc(16, 16), menuWidth, Text.FormatKey("MENU_SKILLS_TITLE", player.GetDisplayName(true)), char_skills.ToArray(), 0);
        }
Exemplo n.º 18
0
        public InvResultsMenu(GameProgress ending)
        {
            Bounds = Rect.FromPoints(new Loc(GraphicsManager.ScreenWidth / 2 - 140, 16), new Loc(GraphicsManager.ScreenWidth / 2 + 140, 224));
            Ending = ending;

            Title = new MenuText(Text.FormatKey("MENU_RESULTS_INVENTORY_TITLE"), Bounds.Start + new Loc((Bounds.End.X - Bounds.X) / 2, GraphicsManager.MenuBG.TileHeight), DirH.None);

            Div = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Items = new MenuText[ending.ActiveTeam.MaxInv];
            List <string> flatChoices = new List <string>();

            for (int ii = 0; ii < ending.ActiveTeam.Players.Count; ii++)
            {
                Character activeChar = ending.ActiveTeam.Players[ii];
                if (activeChar.EquippedItem.ID > -1)
                {
                    flatChoices.Add(activeChar.EquippedItem.GetName());
                }
            }
            for (int ii = 0; ii < ending.ActiveTeam.GetInvCount(); ii++)
            {
                int index = ii;
                flatChoices.Add(ending.ActiveTeam.GetInv(index).GetName());
            }
            for (int jj = 0; jj < 2; jj++)
            {
                for (int ii = 0; ii < ending.ActiveTeam.MaxInv / 2; ii++)
                {
                    int    itemIndex = ii + ending.ActiveTeam.MaxInv / 2 * jj;
                    string itemName  = (flatChoices.Count > itemIndex) ? flatChoices[itemIndex] : "---";
                    Items[itemIndex] = new MenuText(itemName, Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + (Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 4) / 2 * jj, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * ii + TitledStripMenu.TITLE_OFFSET));
                }
            }

            Money = new MenuText(Text.FormatKey("MENU_BAG_MONEY", Text.FormatKey("MONEY_AMOUNT", Ending.ActiveTeam.Money)), Bounds.Start + new Loc((Bounds.End.X - Bounds.X) / 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 12 + TitledStripMenu.TITLE_OFFSET), DirH.None);

            base.Initialize();
        }
Exemplo n.º 19
0
        public SkillSummary(Rect bounds) : base(bounds)
        {
            SkillElement = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight));
            Elements.Add(SkillElement);
            SkillCategory = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE));
            Elements.Add(SkillCategory);

            SkillPower = new MenuText("", Bounds.Start + new Loc((Bounds.End.X - Bounds.X) / 2, GraphicsManager.MenuBG.TileHeight));
            Elements.Add(SkillPower);
            SkillHitRate = new MenuText("", Bounds.Start + new Loc((Bounds.End.X - Bounds.X) / 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE));
            Elements.Add(SkillHitRate);

            Targets = new MenuText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2));
            Elements.Add(Targets);


            Description = new DialogueText("", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3),
                                           Bounds.End.X - GraphicsManager.MenuBG.TileWidth * 4 - Bounds.X, LINE_SPACE, false);
            Elements.Add(Description);

            MenuDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2 + LINE_SPACE),
                                      Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);
            Elements.Add(MenuDiv);
        }
Exemplo n.º 20
0
        public FinalResultsMenu(GameProgress ending)
        {
            Bounds = Rect.FromPoints(new Loc(GraphicsManager.ScreenWidth / 2 - 140, 16), new Loc(GraphicsManager.ScreenWidth / 2 + 140, 224));
            Ending = ending;

            Title = new MenuText(Text.FormatKey("MENU_RESULTS_TITLE"),
                                 new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight), DirH.None);

            Div = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Team = new MenuText(Ending.ActiveTeam.GetDisplayName(), new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE + TitledStripMenu.TITLE_OFFSET), DirH.None);
            string message = "";

            switch (Ending.Outcome)
            {
            case GameProgress.ResultType.Cleared:
                message = Text.FormatKey("MENU_RESULTS_COMPLETE", Ending.Location);
                break;

            case GameProgress.ResultType.Rescue:
                message = Text.FormatKey("MENU_RESULTS_RESCUE", Ending.Location);
                break;

            case GameProgress.ResultType.Failed:
            case GameProgress.ResultType.Downed:
                message = Text.FormatKey("MENU_RESULTS_DEFEAT", Ending.Location);
                break;

            case GameProgress.ResultType.TimedOut:
                message = Text.FormatKey("MENU_RESULTS_TIMEOUT", Ending.Location);
                break;

            case GameProgress.ResultType.Escaped:
                message = Text.FormatKey("MENU_RESULTS_ESCAPE", Ending.Location);
                break;

            case GameProgress.ResultType.GaveUp:
                message = Text.FormatKey("MENU_RESULTS_QUIT", Ending.Location);
                break;

            default:
            {
                if (String.IsNullOrWhiteSpace(Ending.Location))
                {
                    message = Text.FormatKey("MENU_RESULTS_VANISHED");
                }
                else
                {
                    message = Text.FormatKey("MENU_RESULTS_VANISHED_AT", Ending.Location);
                }
                break;
            }
            }

            Description = new MenuText(message, new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2 + TitledStripMenu.TITLE_OFFSET), DirH.None);

            MoneyTally = new MenuText(Text.FormatKey("MENU_BAG_MONEY", Text.FormatKey("MONEY_AMOUNT", Ending.ActiveTeam.Money)),
                                      new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 4 + TitledStripMenu.TITLE_OFFSET), DirH.None);
            InvValueTally = new MenuText(Text.FormatKey("MENU_RESULTS_INV_VALUE", Text.FormatKey("MONEY_AMOUNT", Ending.ActiveTeam.GetInvValue())),
                                         new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5 + TitledStripMenu.TITLE_OFFSET), DirH.None);
            TotalTurns = new MenuText(Text.FormatKey("MENU_RESULTS_TOTAL_TURNS", Ending.TotalTurns),
                                      new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 9 + TitledStripMenu.TITLE_OFFSET), DirH.None);

            Seed = new MenuText(Text.FormatKey("MENU_RESULTS_SEED", Ending.Rand.FirstSeed.ToString("X")),
                                new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 11 + TitledStripMenu.TITLE_OFFSET), DirH.None);

            RogueProgress rogue = Ending as RogueProgress;

            if (rogue != null)
            {
                StorageValueTally = new MenuText(Text.FormatKey("MENU_RESULTS_BONUS_VALUE", Ending.ActiveTeam.Bank),
                                                 new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 6 + TitledStripMenu.TITLE_OFFSET), DirH.None);
                TotalTally = new MenuText(Text.FormatKey("MENU_RESULTS_TOTAL_SCORE", Ending.ActiveTeam.GetTotalScore()),
                                          new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 7 + TitledStripMenu.TITLE_OFFSET), DirH.None);
                Seed.Color = rogue.Seeded ? TextBlue : Color.White;
            }
            else
            {
                StorageValueTally = new MenuText("",
                                                 new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 6 + TitledStripMenu.TITLE_OFFSET), DirH.None);
                TotalTally = new MenuText("",
                                          new Loc(GraphicsManager.ScreenWidth / 2, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 7 + TitledStripMenu.TITLE_OFFSET), DirH.None);
            }

            base.Initialize();
        }
Exemplo n.º 21
0
        //allow moving up and down (but don't alter the team choice selection because it's hard)

        public MemberStatsMenu(int teamSlot, bool assembly, bool allowAssembly)
        {
            Bounds = Rect.FromPoints(new Loc(24, 16), new Loc(296, 224));

            this.teamSlot      = teamSlot;
            this.assembly      = assembly;
            this.allowAssembly = allowAssembly;

            Character player = assembly ? DataManager.Instance.Save.ActiveTeam.Assembly[teamSlot] : DataManager.Instance.Save.ActiveTeam.Players[teamSlot];

            //TODO: align the page text properly
            Title = new MenuText(Text.FormatKey("MENU_STATS_TITLE") + " (2/3)", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth + 8, GraphicsManager.MenuBG.TileHeight));
            Div   = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);


            Portrait = new SpeakerPortrait(player.BaseForm, new EmoteStyle(0),
                                           Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + TitledStripMenu.TITLE_OFFSET), false);
            string speciesText = player.BaseName + " / " + player.FullFormName;

            Name = new MenuText(speciesText, Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + TitledStripMenu.TITLE_OFFSET));

            ElementData element1 = DataManager.Instance.GetElement(player.Element1);
            ElementData element2 = DataManager.Instance.GetElement(player.Element2);

            string typeString = String.Format("{0}\u2060{1}", element1.Symbol, element1.Name.ToLocal());

            if (player.Element2 != 00)
            {
                typeString += "/" + String.Format("{0}\u2060{1}", element2.Symbol, element2.Name.ToLocal());
            }
            BaseMonsterForm monsterForm  = DataManager.Instance.GetMonster(player.BaseForm.Species).Forms[player.BaseForm.Form];
            bool            origElements = (player.Element1 == monsterForm.Element1);

            origElements &= (player.Element2 == monsterForm.Element2);
            Elements      = new MenuText(Text.FormatKey("MENU_TEAM_ELEMENT", typeString), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 1 + TitledStripMenu.TITLE_OFFSET), origElements ? Color.White : Color.Yellow);

            Level = new MenuText(Text.FormatKey("MENU_TEAM_LEVEL_SHORT", player.Level), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2 + TitledStripMenu.TITLE_OFFSET));

            int expToNext = 0;

            if (player.Level < DataManager.Instance.MaxLevel)
            {
                int        growth     = DataManager.Instance.GetMonster(player.BaseForm.Species).EXPTable;
                GrowthData growthData = DataManager.Instance.GetGrowth(growth);
                expToNext = growthData.GetExpToNext(player.Level);
            }
            EXP = new MenuText(Text.FormatKey("MENU_TEAM_EXP", player.EXP, expToNext),
                               Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3 + TitledStripMenu.TITLE_OFFSET));

            MainDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            StatsTitle = new MenuText(Text.FormatKey("MENU_TEAM_STATS"), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 4 + TitledStripMenu.TITLE_OFFSET));

            HPLabel      = new MenuText(Text.FormatKey("MENU_LABEL", Data.Stat.HP.ToLocal("tiny")), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 8, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5 + TitledStripMenu.TITLE_OFFSET));
            AttackLabel  = new MenuText(Text.FormatKey("MENU_LABEL", Data.Stat.Attack.ToLocal("tiny")), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 8, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 6 + TitledStripMenu.TITLE_OFFSET), player.ProxyAtk > -1 ? Color.Yellow : Color.White);
            DefenseLabel = new MenuText(Text.FormatKey("MENU_LABEL", Data.Stat.Defense.ToLocal("tiny")), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 8, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 7 + TitledStripMenu.TITLE_OFFSET), player.ProxyDef > -1 ? Color.Yellow : Color.White);
            MAtkLabel    = new MenuText(Text.FormatKey("MENU_LABEL", Data.Stat.MAtk.ToLocal("tiny")), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 8, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 8 + TitledStripMenu.TITLE_OFFSET), player.ProxyMAtk > -1 ? Color.Yellow : Color.White);
            MDefLabel    = new MenuText(Text.FormatKey("MENU_LABEL", Data.Stat.MDef.ToLocal("tiny")), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 8, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 9 + TitledStripMenu.TITLE_OFFSET), player.ProxyMDef > -1 ? Color.Yellow : Color.White);
            SpeedLabel   = new MenuText(Text.FormatKey("MENU_LABEL", Data.Stat.Speed.ToLocal("tiny")), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 8, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 10 + TitledStripMenu.TITLE_OFFSET), player.ProxySpeed > -1 ? Color.Yellow : Color.White);

            HP      = new MenuText(player.MaxHP.ToString(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 72, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5 + TitledStripMenu.TITLE_OFFSET), DirH.Right);
            Attack  = new MenuText(player.Atk.ToString(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 72, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 6 + TitledStripMenu.TITLE_OFFSET), DirV.Up, DirH.Right, player.ProxyAtk > -1 ? Color.Yellow : Color.White);
            Defense = new MenuText(player.Def.ToString(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 72, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 7 + TitledStripMenu.TITLE_OFFSET), DirV.Up, DirH.Right, player.ProxyDef > -1 ? Color.Yellow : Color.White);
            MAtk    = new MenuText(player.MAtk.ToString(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 72, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 8 + TitledStripMenu.TITLE_OFFSET), DirV.Up, DirH.Right, player.ProxyMAtk > -1 ? Color.Yellow : Color.White);
            MDef    = new MenuText(player.MDef.ToString(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 72, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 9 + TitledStripMenu.TITLE_OFFSET), DirV.Up, DirH.Right, player.ProxyMDef > -1 ? Color.Yellow : Color.White);
            Speed   = new MenuText(player.Speed.ToString(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 72, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 10 + TitledStripMenu.TITLE_OFFSET), DirV.Up, DirH.Right, player.ProxySpeed > -1 ? Color.Yellow : Color.White);

            int hpLength = calcLength(Stat.HP, monsterForm, player.MaxHP, player.Level);

            HPBar = new MenuStatBar(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 76, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5 + TitledStripMenu.TITLE_OFFSET), hpLength, calcColor(hpLength));
            int atkLength = calcLength(Stat.Attack, monsterForm, player.Atk, player.Level);

            AttackBar = new MenuStatBar(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 76, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 6 + TitledStripMenu.TITLE_OFFSET), atkLength, calcColor(atkLength));
            int defLength = calcLength(Stat.Defense, monsterForm, player.Def, player.Level);

            DefenseBar = new MenuStatBar(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 76, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 7 + TitledStripMenu.TITLE_OFFSET), defLength, calcColor(defLength));
            int mAtkLength = calcLength(Stat.MAtk, monsterForm, player.MAtk, player.Level);

            MAtkBar = new MenuStatBar(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 76, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 8 + TitledStripMenu.TITLE_OFFSET), mAtkLength, calcColor(mAtkLength));
            int mDefLength = calcLength(Stat.MDef, monsterForm, player.MDef, player.Level);

            MDefBar = new MenuStatBar(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 76, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 9 + TitledStripMenu.TITLE_OFFSET), mDefLength, calcColor(mDefLength));
            int speedLength = calcLength(Stat.Speed, monsterForm, player.Speed, player.Level);

            SpeedBar = new MenuStatBar(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 76, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 10 + TitledStripMenu.TITLE_OFFSET), speedLength, calcColor(speedLength));

            ItemDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 12), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Item = new MenuText(player.EquippedItem.ID > -1 ? Text.FormatKey("MENU_HELD_ITEM", player.EquippedItem.GetName()) : Text.FormatKey("MENU_HELD_NO_ITEM"), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 11 + TitledStripMenu.TITLE_OFFSET));
        }
Exemplo n.º 22
0
        public MemberFeaturesMenu(int teamSlot, bool assembly, bool allowAssembly)
        {
            Bounds = Rect.FromPoints(new Loc(24, 16), new Loc(296, 224));

            this.teamSlot      = teamSlot;
            this.assembly      = assembly;
            this.allowAssembly = allowAssembly;

            Character player = assembly ? DataManager.Instance.Save.ActiveTeam.Assembly[teamSlot] : DataManager.Instance.Save.ActiveTeam.Players[teamSlot];

            //TODO: align this text properly
            Title = new MenuText(Text.FormatKey("MENU_TEAM_FEATURES") + " (1/3)", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth + 8, GraphicsManager.MenuBG.TileHeight));
            Div   = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Portrait = new SpeakerPortrait(player.BaseForm, new EmoteStyle(0),
                                           Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + TitledStripMenu.TITLE_OFFSET), false);
            string speciesText = player.GetDisplayName(true) + " / " + CharData.GetFullFormName(player.BaseForm);

            Name = new MenuText(speciesText, Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + TitledStripMenu.TITLE_OFFSET));

            ElementData element1 = DataManager.Instance.GetElement(player.Element1);
            ElementData element2 = DataManager.Instance.GetElement(player.Element2);

            string typeString = element1.GetIconName();

            if (player.Element2 != 00)
            {
                typeString += "/" + element2.GetIconName();
            }
            bool origElements = (player.Element1 == DataManager.Instance.GetMonster(player.BaseForm.Species).Forms[player.BaseForm.Form].Element1);

            origElements &= (player.Element2 == DataManager.Instance.GetMonster(player.BaseForm.Species).Forms[player.BaseForm.Form].Element2);
            Elements      = new MenuText(Text.FormatKey("MENU_TEAM_ELEMENT", typeString), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 1 + TitledStripMenu.TITLE_OFFSET), origElements ? Color.White : Color.Yellow);

            Level = new MenuText(Text.FormatKey("MENU_TEAM_LEVEL_SHORT", player.Level), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2 + TitledStripMenu.TITLE_OFFSET));


            HP       = new MenuText(Text.FormatKey("MENU_TEAM_HP", player.HP, player.MaxHP), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3 + TitledStripMenu.TITLE_OFFSET));
            Fullness = new MenuText(Text.FormatKey("MENU_TEAM_HUNGER", player.Fullness, player.MaxFullness), Bounds.Start + new Loc((Bounds.End.X - Bounds.X) / 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 3 + TitledStripMenu.TITLE_OFFSET));

            MainDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            SkillTitle = new MenuText(Text.FormatKey("MENU_TEAM_SKILLS"), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 4 + TitledStripMenu.TITLE_OFFSET));
            Skills     = new MenuText[CharData.MAX_SKILL_SLOTS * 3];
            for (int ii = 0; ii < CharData.MAX_SKILL_SLOTS; ii++)
            {
                SlotSkill skill        = player.BaseSkills[ii];
                string    skillString  = "-----";
                string    skillCharges = "--";
                string    totalCharges = "/--";
                if (skill.SkillNum > -1)
                {
                    SkillData data = DataManager.Instance.GetSkill(skill.SkillNum);
                    skillString  = data.GetIconName();
                    skillCharges = skill.Charges.ToString();
                    totalCharges = "/" + (data.BaseCharges + player.ChargeBoost);
                }
                Skills[ii * 3]     = new MenuText(skillString, Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * (ii + 5) + TitledStripMenu.TITLE_OFFSET));
                Skills[ii * 3 + 1] = new MenuText(skillCharges, new Loc(Bounds.End.X - GraphicsManager.MenuBG.TileWidth * 2 - 16 - GraphicsManager.TextFont.CharSpace, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * (ii + 5) + TitledStripMenu.TITLE_OFFSET), DirH.Right);
                Skills[ii * 3 + 2] = new MenuText(totalCharges, new Loc(Bounds.End.X - GraphicsManager.MenuBG.TileWidth * 2 - 16, Bounds.Y + GraphicsManager.MenuBG.TileHeight + VERT_SPACE * (ii + 5) + TitledStripMenu.TITLE_OFFSET), DirH.Left);
            }

            IntrinsicDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 10), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            bool          origIntrinsic = (player.Intrinsics[0].Element.ID == player.BaseIntrinsics[0]);
            IntrinsicData entry         = DataManager.Instance.GetIntrinsic(player.Intrinsics[0].Element.ID);

            Intrinsic     = new MenuText(Text.FormatKey("MENU_TEAM_INTRINSIC", entry.GetColoredName()), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 9 + TitledStripMenu.TITLE_OFFSET), origIntrinsic ? Color.White : Color.Yellow);
            IntrinsicDesc = new DialogueText(entry.Desc.ToLocal(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 10 + TitledStripMenu.TITLE_OFFSET),
                                             Bounds.End.X - GraphicsManager.MenuBG.TileWidth * 3 - Bounds.X, LINE_SPACE, false);
        }
Exemplo n.º 23
0
        public MemberInfoMenu(int teamSlot, bool assembly, bool allowAssembly)
        {
            Bounds = Rect.FromPoints(new Loc(24, 16), new Loc(296, 224));

            this.teamSlot      = teamSlot;
            this.assembly      = assembly;
            this.allowAssembly = allowAssembly;

            Character player = assembly ? DataManager.Instance.Save.ActiveTeam.Assembly[teamSlot] : DataManager.Instance.Save.ActiveTeam.Players[teamSlot];

            //TODO: align the page text properly
            Title = new MenuText(Text.FormatKey("MENU_TEAM_INFO") + " (3/3)", Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth + 8, GraphicsManager.MenuBG.TileHeight));
            Div   = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + LINE_SPACE), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);


            MonsterData     dexEntry  = DataManager.Instance.GetMonster(player.BaseForm.Species);
            BaseMonsterForm formEntry = dexEntry.Forms[player.BaseForm.Form];

            Portrait = new SpeakerPortrait(player.BaseForm, new EmoteStyle(0),
                                           Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + TitledStripMenu.TITLE_OFFSET), false);

            string speciesName = dexEntry.GetColoredName();

            if (player.BaseForm.Skin > 0)
            {
                speciesName += " (" + DataManager.Instance.GetSkin(player.BaseForm.Skin).GetColoredName() + ")";
            }
            if (player.BaseForm.Gender != Gender.Genderless)
            {
                speciesName += (player.BaseForm.Gender == Gender.Male) ? " (\u2642)" : " (\u2640)";
            }
            else
            {
                speciesName += " (-)";
            }
            Species  = new MenuText(Text.FormatKey("MENU_TEAM_SPECIES", speciesName), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 0 + TitledStripMenu.TITLE_OFFSET));
            Category = new MenuText(dexEntry.Title.ToLocal(), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 1 + TitledStripMenu.TITLE_OFFSET));
            if (DataManager.Instance.Save.UUID == player.OriginalUUID)
            {
                MetAt = new MenuText(Text.FormatKey("MENU_TEAM_MET_AT", player.MetAt), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2 + TitledStripMenu.TITLE_OFFSET));
            }
            else
            {
                MetAt = new MenuText(Text.FormatKey("MENU_TEAM_TRADED_FROM", player.OriginalTeam), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 48, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 2 + TitledStripMenu.TITLE_OFFSET));
            }
            MainDiv = new MenuDivider(Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5), Bounds.End.X - Bounds.X - GraphicsManager.MenuBG.TileWidth * 2);

            Promotions = new MenuText(Text.FormatKey("MENU_TEAM_PROMOTION"), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 4 + TitledStripMenu.TITLE_OFFSET));
            List <MenuText> validPromotions = new List <MenuText>();

            bool inDungeon = (GameManager.Instance.CurrentScene == DungeonScene.Instance);

            for (int ii = 0; ii < dexEntry.Promotions.Count; ii++)
            {
                if (!DataManager.Instance.DataIndices[DataManager.DataType.Monster].Entries[dexEntry.Promotions[ii].Result].Released)
                {
                    continue;
                }
                if (dexEntry.Promotions[ii].IsQualified(player, inDungeon))
                {
                    validPromotions.Add(new MenuText(DataManager.Instance.GetMonster(dexEntry.Promotions[ii].Result).GetColoredName() + ": " + dexEntry.Promotions[ii].GetReqString(),
                                                     Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 8, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * (validPromotions.Count + 5) + TitledStripMenu.TITLE_OFFSET)));
                }
                else
                {
                    bool hardReq = false;
                    foreach (PromoteDetail detail in dexEntry.Promotions[ii].Details)
                    {
                        if (detail.IsHardReq() && !detail.GetReq(player))
                        {
                            hardReq = true;
                            break;
                        }
                    }
                    if (!hardReq)
                    {
                        validPromotions.Add(new MenuText(DataManager.Instance.GetMonster(dexEntry.Promotions[ii].Result).GetColoredName() + ": " + dexEntry.Promotions[ii].GetReqString(),
                                                         Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2 + 8, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * (validPromotions.Count + 5) + TitledStripMenu.TITLE_OFFSET), Color.Red));
                    }
                }
            }
            if (validPromotions.Count > 0)
            {
                PromoteMethods = validPromotions.ToArray();
            }
            else
            {
                PromoteMethods    = new MenuText[1];
                PromoteMethods[0] = new MenuText(Text.FormatKey("MENU_TEAM_PROMOTE_NONE"), Bounds.Start + new Loc(GraphicsManager.MenuBG.TileWidth * 2, GraphicsManager.MenuBG.TileHeight + VERT_SPACE * 5 + TitledStripMenu.TITLE_OFFSET));
            }
        }