Esempio n. 1
0
        protected override void set_items(List <string> strs)
        {
            base.set_items(strs);

            // Page Arrows
            Up_Page_Arrow            = new Page_Arrow();
            Up_Page_Arrow.loc        = new Vector2(Window_Img.width / 2 + 8, 0);
            Up_Page_Arrow.angle      = MathHelper.PiOver2;
            Down_Page_Arrow          = new Page_Arrow();
            Down_Page_Arrow.loc      = new Vector2(Window_Img.width / 2 + 8, this.rows * 16 + 16);
            Down_Page_Arrow.mirrored = true;
            Down_Page_Arrow.angle    = MathHelper.PiOver2;

            Up_Page_Arrow.ArrowClicked   += Up_Page_Arrow_ArrowClicked;
            Down_Page_Arrow.ArrowClicked += Down_Page_Arrow_ArrowClicked;

            refresh_scroll_visibility();
        }
Esempio n. 2
0
        protected void initialize_sprites()
        {
            // Black Screen
            Black_Screen           = new Sprite();
            Black_Screen.texture   = Global.Content.Load <Texture2D>(@"Graphics/White_Square");
            Black_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
            Black_Screen.tint      = new Color(0, 0, 0, 255);
            // Banner
            Banner                   = new MenuScreenBanner();
            Banner.width             = 120;
            Banner.loc               = new Vector2(OPTIONS_OFFSET, 8);
            Banner.stereoscopic      = Config.OPTIONS_BANNER_DEPTH;
            Banner_Text              = new Sprite();
            Banner_Text.texture      = Global.Content.Load <Texture2D>(@"Graphics/Pictures/Banner_Text");
            Banner_Text.src_rect     = new Rectangle(0, 0, 96, 16);
            Banner_Text.loc          = new Vector2(OPTIONS_OFFSET + 24 + 2, 8 + 8);
            Banner_Text.stereoscopic = Config.OPTIONS_BANNER_DEPTH;
            // Background
            Background         = new Menu_Background();
            Background.texture = Global.Content.Load <Texture2D>(@"Graphics/Pictures/Option_Background");
            (Background as Menu_Background).vel  = new Vector2(-0.25f, 0);
            (Background as Menu_Background).tile = new Vector2(3, 1);
            Background.stereoscopic = Config.MAPMENU_BG_DEPTH;
            // Description Window
            Description_Window              = new System_Color_Window();
            Description_Window.loc          = new Vector2(60, 156);
            Description_Window.width        = 200;
            Description_Window.height       = 24;
            Description_Window.small        = true;
            Description_Window.stereoscopic = Config.OPTIONS_DESC_DEPTH;
            // Description
            Description     = new TextSprite();
            Description.loc = new Vector2(72, 160);
            Description.SetFont(Config.UI_FONT, Global.Content, "White");
            Description.stereoscopic = Config.OPTIONS_DESC_DEPTH;
            // Solo Anim Button Icon
            Solo_Icon     = new SoloAnim_Button();
            Solo_Icon.loc = new Vector2(
                CHOICES_OFFSET + 20 +
                OptionsConfig.OPTIONS_DATA[(int)Constants.Options.Animation_Mode]
                .Options[(int)Constants.Animation_Modes.Solo].Offset,
                16 * (int)Constants.Options.Animation_Mode) +
                            new Vector2(Data_Scissor_Rect.X, Data_Scissor_Rect.Y);
            Solo_Icon.stereoscopic = Config.OPTIONS_OPTIONS_DEPTH;
            // Page Arrows
            Up_Page_Arrow                = new Page_Arrow();
            Up_Page_Arrow.loc            = new Vector2(CHOICES_OFFSET - 4, Data_Scissor_Rect.Y - 4);
            Up_Page_Arrow.angle          = MathHelper.PiOver2;
            Up_Page_Arrow.stereoscopic   = Config.OPTIONS_ARROWS_DEPTH;
            Down_Page_Arrow              = new Page_Arrow();
            Down_Page_Arrow.loc          = new Vector2(CHOICES_OFFSET - 4, Data_Scissor_Rect.Y + Data_Scissor_Rect.Height + 4);
            Down_Page_Arrow.mirrored     = true;
            Down_Page_Arrow.angle        = MathHelper.PiOver2;
            Down_Page_Arrow.stereoscopic = Config.OPTIONS_ARROWS_DEPTH;

            Up_Page_Arrow.ArrowClicked   += Up_Page_Arrow_ArrowClicked;
            Down_Page_Arrow.ArrowClicked += Down_Page_Arrow_ArrowClicked;

            // UI Nodes
            List <OptionsUINode> nodes = new List <OptionsUINode>();

            // Options
            for (int index = 0; index < OptionsConfig.OPTIONS_DATA.Length; index++)
            {
                Vector2 loc = new Vector2(OPTIONS_OFFSET + 16, index * 16) +
                              new Vector2(Data_Scissor_Rect.X, Data_Scissor_Rect.Y);

                nodes.Add(new OptionsUINode(index));
                nodes[index].stereoscopic = Config.OPTIONS_OPTIONS_DEPTH;
                nodes[index].loc          = loc;
            }

            OptionsNodes = new PartialRangeVisibleUINodeSet <OptionsUINode>(nodes);
            OptionsNodes.CursorMoveSound = System_Sounds.Menu_Move1;

            OptionsCursor              = new UICursor <OptionsUINode>(OptionsNodes);
            OptionsCursor.draw_offset  = new Vector2(-(16 + 12), 0);
            OptionsCursor.stereoscopic = Config.OPTIONS_CURSOR_DEPTH;
            // Settings
            List <SettingUINode> settings_nodes = new List <SettingUINode>();

            SettingsGroups = new List <List <SettingUINode> >();
            foreach (var option_node in OptionsNodes)
            {
                int i              = (int)option_node.Option;
                var option         = OptionsConfig.OPTIONS_DATA[i];
                var settings_group = new List <SettingUINode>();

                if (option.Gauge)
                {
                    Vector2 loc = new Vector2(CHOICES_OFFSET, i * 16) +
                                  new Vector2(Data_Scissor_Rect.X, Data_Scissor_Rect.Y);

                    var node = new SettingGaugeUINode(option.Options[0].Name,
                                                      option.GaugeWidth, option.GaugeMin, option.GaugeMax, option.gauge_offset);
                    node.stereoscopic = Config.OPTIONS_OPTIONS_DEPTH;
                    node.loc          = loc;
                    settings_nodes.Add(node);
                    settings_group.Add(node);
                }
                else
                {
                    for (int j = 0; j < option.Options.Length; j++)
                    {
                        Vector2 loc = new Vector2(CHOICES_OFFSET + option.Options[j].Offset, i * 16) +
                                      new Vector2(Data_Scissor_Rect.X, Data_Scissor_Rect.Y);

                        var node = new SettingUINode(option.Options[j].Name);
                        node.stereoscopic = Config.OPTIONS_OPTIONS_DEPTH;
                        node.loc          = loc;
                        settings_nodes.Add(node);
                        settings_group.Add(node);
                    }
                }

                SettingsGroups.Add(settings_group);
            }

            SettingsNodes = new PartialRangeVisibleUINodeSet <SettingUINode>(settings_nodes);
            SettingsNodes.CursorMoveSound = System_Sounds.Menu_Move2;
            SettingsNodes.set_active_node(SettingsNodes[this.current_setting]);

            SettingsCursor                     = new UICursor <SettingUINode>(SettingsNodes);
            SettingsCursor.draw_offset         = new Vector2(-16, 0);
            SettingsCursor.min_distance_y      = 4;
            SettingsCursor.override_distance_y = 16;
            SettingsCursor.stereoscopic        = Config.OPTIONS_CURSOR_DEPTH;
            SettingsCursor.move_to_target_loc();

            // Scrollbar

            /* //Debug
             * Scrollbar = new Scroll_Bar(
             *  ROWS_AT_ONCE * 16 - 16, OptionsConfig.OPTIONS_DATA.Length, ROWS_AT_ONCE, 0);
             * Scrollbar.loc = new Vector2(Data_Scissor_Rect.Width - 12, Data_Scissor_Rect.Y + 8);
             *
             * Scrollbar.UpArrowClicked += Scrollbar_UpArrowClicked;
             * Scrollbar.DownArrowClicked += Scrollbar_DownArrowClicked;*/

            create_cancel_button();

            refresh_arrow_visibility();
            update_loc();
        }
Esempio n. 3
0
        internal PreviousChapterSelectionMenu(
            Vector2 centerLoc,
            string chapterId,
            WorldmapMenuData menuData,
            IHasCancelButton menu = null)
        {
            ChapterId              = chapterId;
            ProgressionIds         = menuData.ValidPreviousChapters.Keys.ToList();
            ValidPreviousChapters  = menuData.ValidPreviousChapters;
            PreviousChapterIndices = menuData.UsablePreviousChapterIndices;

            Window        = new SystemWindowHeadered();
            Window.width  = 104;
            Window.height = 32 + 16 * (ValidPreviousChapters.Count + 1) + 4;
            Window.offset = new Vector2(0, 16);

            Loc = centerLoc -
                  (new Vector2(Window.width, Window.height) - Window.offset) / 2;

            Header             = new TextSprite();
            Header.draw_offset = new Vector2(8, -8);
            Header.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            Header.text = ValidPreviousChapters.Count > 1 ? "Previous Chapters" : "Previous Chapter";

            Divider             = new StatusWindowDivider();
            Divider.draw_offset = new Vector2(8, Window.height - 44);
            Divider.SetWidth(Window.width - 16);

            LeftArrows  = new Dictionary <Page_Arrow, int>();
            RightArrows = new Dictionary <Page_Arrow, int>();

            // Center, then adjust left to account for map sprite
            int x = ((Window.width / 2) / 8 * 8) - 16;
            List <CommandUINode> nodes = new List <CommandUINode>();

            for (int i = 0; i < ProgressionIds.Count; i++)
            {
                int y = i * 16 + 8;

                var text = new TextSprite();
                text.SetFont(Config.UI_FONT, Global.Content, "White");
                text.text = chapter(i).Id;
                var node = new MapSpriteUINode("", text, 56);
                refresh_map_sprite(node, i);
                node.loc = new Vector2(x, y);
                nodes.Add(node);

                // Add arrows for this set of chapters,
                // if there's more than one choice
                if (chapter_list(i).Count > 1)
                {
                    var left_arrow = new Page_Arrow();
                    left_arrow.loc           = new Vector2(8, y);
                    left_arrow.ArrowClicked += LeftArrow_ArrowClicked;
                    LeftArrows.Add(left_arrow, i);

                    var right_arrow = new Page_Arrow();
                    right_arrow.loc           = new Vector2(Window.width - 8, y);
                    right_arrow.mirrored      = true;
                    right_arrow.ArrowClicked += RightArrow_ArrowClicked;
                    RightArrows.Add(right_arrow, i);
                }
            }

            // Add confirm choice
            var confirmText = new TextSprite(
                Config.UI_FONT, Global.Content, "White",
                new Vector2(4, 0),
                "Confirm");
            var confirm = new TextUINode("", confirmText, 56);

            confirm.loc = new Vector2(x, nodes.Count * 16 + 8 + 4);
            nodes.Add(confirm);

            Items = new UINodeSet <CommandUINode>(nodes);
            Items.WrapVerticalSameColumn    = true;
            Items.CursorMoveSound           = System_Sounds.Menu_Move1;
            Items.HorizontalCursorMoveSound = System_Sounds.Menu_Move2;

            Items.AngleMultiplier   = 2f;
            Items.TangentDirections = new List <CardinalDirections> {
                CardinalDirections.Left, CardinalDirections.Right
            };
            Items.refresh_destinations();

            Items.set_active_node(confirm);

            UICursor             = new UICursor <CommandUINode>(Items);
            UICursor.draw_offset = new Vector2(-12, 0);
            //UICursor.ratio = new int[] { 1, 3 }; //Debug

            CreateCancelButton(menu);
        }
Esempio n. 4
0
        private void initialize_sprites()
        {
            // Black Screen
            Black_Screen           = new Sprite();
            Black_Screen.texture   = Global.Content.Load <Texture2D>(@"Graphics/White_Square");
            Black_Screen.dest_rect = new Rectangle(0, 0, Config.WINDOW_WIDTH, Config.WINDOW_HEIGHT);
            Black_Screen.tint      = new Color(0, 0, 0, 255);
            // Banner
            Banner = new TextSprite();
            string str = Global.data_chapters[Global.game_state.chapter_id].FullName;

            Banner.loc = new Vector2(Config.WINDOW_WIDTH, 32) / 2 - new Vector2(Font_Data.text_width(str, Config.CHAPTER_FONT) / 2, 8);
            Banner.SetFont(Config.CHAPTER_FONT, Global.Content, "Data");
            Banner.text         = str;
            Banner.stereoscopic = Config.DATA_BANNER_DEPTH;

            int alpha = 7 * 16;

            BannerBg              = new Sprite();
            BannerBg.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            BannerBg.loc          = new Vector2(64, 0);
            BannerBg.src_rect     = new Rectangle(0, 176, 192, 32);
            BannerBg.tint         = new Color(alpha, alpha, alpha, 256 - alpha);
            BannerBg.stereoscopic = Config.DATA_BANNER_DEPTH;
            // Unit Bg
            UnitBg              = new Sprite();
            UnitBg.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            UnitBg.loc          = new Vector2(132, 120);
            UnitBg.src_rect     = new Rectangle(0, 272, 128, 72);
            UnitBg.tint         = new Color(alpha, alpha, alpha, 256 - alpha);
            UnitBg.stereoscopic = Config.DATA_LEADER_DEPTH;
            // File Bg
            FileBg              = new Sprite();
            FileBg.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            FileBg.loc          = new Vector2(260, 128);
            FileBg.src_rect     = new Rectangle(0, 208, 56, 64);
            FileBg.tint         = new Color(alpha, alpha, alpha, 256 - alpha);
            FileBg.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Background
            Background         = new Menu_Background();
            Background.texture = Global.Content.Load <Texture2D>(@"Graphics/Pictures/Status_Background");
            (Background as Menu_Background).vel  = new Vector2(-0.25f, 0);
            (Background as Menu_Background).tile = new Vector2(3, 2);
            Background.stereoscopic = Config.MAPMENU_BG_DEPTH;
            // Cursor
            Cursor = new Data_Team_Cursor();
            Cursor.stereoscopic = Config.DATA_TEAMS_DEPTH;
            // Objective Window
            Objective_Window              = new Sprite();
            Objective_Window.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Objective_Window.loc          = new Vector2(132, 32);
            Objective_Window.src_rect     = new Rectangle(32, 0, 184, 96);
            Objective_Window.stereoscopic = Config.DATA_WINDOW_DEPTH;
            // Game Data Window
            Game_Data_Window              = new Sprite();
            Game_Data_Window.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Game_Data_Window.loc          = new Vector2(324, 120);
            Game_Data_Window.src_rect     = new Rectangle(104, 96, 112, 72);
            Game_Data_Window.stereoscopic = Config.DATA_DATA_DEPTH;
            // Team Windows/Text
            int y = 0;

            for (int i = 1; i <= Constants.Team.NUM_TEAMS; i++)
            {
                if (Global.game_map.teams[i].Count > 0)
                {
                    List <int>            groups      = new List <int>();
                    Dictionary <int, int> group_sizes = new Dictionary <int, int>();
                    foreach (int id in Global.game_map.teams[i])
                    {
                        if (!groups.Contains(Global.game_map.units[id].group))
                        {
                            groups.Add(Global.game_map.units[id].group);
                            group_sizes.Add(Global.game_map.units[id].group, 0);
                        }
                        group_sizes[Global.game_map.units[id].group]++;
                    }
                    Groups.Add(new KeyValuePair <int, int>(i, groups.Count));
                    Team_Windows.Add(new Data_Team_Window(i, group_sizes.Count));
                    Team_Windows[Team_Windows.Count - 1].loc          = TEAM_WINDOW_LOC + new Vector2(0, 0 + y);
                    Team_Windows[Team_Windows.Count - 1].stereoscopic = Config.DATA_TEAMS_DEPTH;
                    groups.Sort();
                    for (int j = 0; j < groups.Count; j++)
                    {
                        Group_Names.Add(new TextSprite());
                        Group_Names[Group_Names.Count - 1].loc = TEAM_WINDOW_LOC + new Vector2(4, y + 12 + j * 16);
                        Group_Names[Group_Names.Count - 1].SetFont(Config.UI_FONT, Global.Content, "White");
                        Group_Names[Group_Names.Count - 1].text         = Global.game_map.group_name(i, groups[j]);
                        Group_Names[Group_Names.Count - 1].stereoscopic = Config.DATA_TEAMS_DEPTH;
                        Group_Counts.Add(new RightAdjustedText());
                        Group_Counts[Group_Names.Count - 1].loc = TEAM_WINDOW_LOC + new Vector2(112, y + 12 + j * 16);
                        Group_Counts[Group_Names.Count - 1].SetFont(Config.UI_FONT, Global.Content, "Blue");
                        Group_Counts[Group_Names.Count - 1].text         = group_sizes[groups[j]].ToString();
                        Group_Counts[Group_Names.Count - 1].stereoscopic = Config.DATA_TEAMS_DEPTH;
                    }
                    y += (group_sizes.Count + 1) * 16;
                }
            }
            // Game Data Window
            RankingWindow              = new Data_Ranking_Window();
            RankingWindow.loc          = new Vector2(320, 32);
            RankingWindow.width        = 120;
            RankingWindow.height       = 80;
            RankingWindow.stereoscopic = Config.DATA_TEAMS_DEPTH;
            // Counter
            Counter              = new Play_Time_Counter();
            Counter.loc          = Game_Data_Window.loc + new Vector2(12, 48);
            Counter.stereoscopic = Config.DATA_DATA_DEPTH;
            // Labels
            Objective_Label              = new Sprite();
            Objective_Label.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Objective_Label.loc          = Objective_Window.loc + new Vector2(16 - 2, 12 - 2);
            Objective_Label.src_rect     = new Rectangle(0, 96, 56, 16);
            Objective_Label.stereoscopic = Config.DATA_WINDOW_DEPTH;
            Defeat_Label              = new Sprite();
            Defeat_Label.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Defeat_Label.loc          = Objective_Window.loc + new Vector2(16 - 2, 44 - 2);
            Defeat_Label.src_rect     = new Rectangle(56, 96, 40, 16);
            Defeat_Label.stereoscopic = Config.DATA_WINDOW_DEPTH;

            Turn_Label               = new Sprite();
            Turn_Label.texture       = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Turn_Label.loc           = Game_Data_Window.loc + new Vector2(8, 8);
            Turn_Label.src_rect      = new Rectangle(0, 112, 32, 16);
            Turn_Label.stereoscopic  = Config.DATA_DATA_DEPTH;
            Funds_Label              = new Sprite();
            Funds_Label.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Funds_Label.loc          = Game_Data_Window.loc + new Vector2(8, 24);
            Funds_Label.src_rect     = new Rectangle(0, 128, 32, 16);
            Funds_Label.stereoscopic = Config.DATA_DATA_DEPTH;
            Gold_G              = new Sprite();
            Gold_G.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Gold_G.loc          = Game_Data_Window.loc + new Vector2(88 + 5, 24);
            Gold_G.src_rect     = new Rectangle(0, 160, 16, 16);
            Gold_G.stereoscopic = Config.DATA_DATA_DEPTH;

            Lv_Label              = new Sprite();
            Lv_Label.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Lv_Label.loc          = UnitBg.loc + new Vector2(8, 40 + 0 - 2);
            Lv_Label.src_rect     = new Rectangle(32, 112, 16, 16);
            Lv_Label.stereoscopic = Config.DATA_LEADER_DEPTH;
            Hp_Label              = new Sprite();
            Hp_Label.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            Hp_Label.loc          = UnitBg.loc + new Vector2(8, 40 + 12 - 2);
            Hp_Label.src_rect     = new Rectangle(48, 112, 24, 16);
            Hp_Label.stereoscopic = Config.DATA_LEADER_DEPTH;
            TextSprite hp_slash = new TextSprite(); // why is this done so //@Yeti

            hp_slash.loc = UnitBg.loc + new Vector2(44, 40 + 12);
            hp_slash.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            hp_slash.text            = "/";
            Hp_Slash                 = hp_slash;
            Hp_Slash.stereoscopic    = Config.DATA_LEADER_DEPTH;
            RatingLabel              = new Sprite();
            RatingLabel.texture      = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen");
            RatingLabel.loc          = UnitBg.loc + new Vector2(72, 40 + 12 - 2);
            RatingLabel.src_rect     = new Rectangle(72, 112, 24, 16);
            RatingLabel.stereoscopic = Config.DATA_LEADER_DEPTH;

            RankingLabel     = new TextSprite();
            RankingLabel.loc = RankingWindow.loc + new Vector2(24, 8);
            RankingLabel.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            RankingLabel.text         = "Progress";
            RankingLabel.stereoscopic = Config.DATA_TEAMS_DEPTH;
            TurnsRankLabel            = new TextSprite();
            TurnsRankLabel.loc        = RankingWindow.loc + new Vector2(8, 24);
            TurnsRankLabel.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            TurnsRankLabel.text         = "Turns";
            TurnsRankLabel.stereoscopic = Config.DATA_TEAMS_DEPTH;
            CombatRankLabel             = new TextSprite();
            CombatRankLabel.loc         = RankingWindow.loc + new Vector2(8, 40);
            CombatRankLabel.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            CombatRankLabel.text         = "Combat";
            CombatRankLabel.stereoscopic = Config.DATA_TEAMS_DEPTH;
            ExpRankLabel     = new TextSprite();
            ExpRankLabel.loc = RankingWindow.loc + new Vector2(8, 56);
            ExpRankLabel.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            ExpRankLabel.text         = "Exp";
            ExpRankLabel.stereoscopic = Config.DATA_TEAMS_DEPTH;

            FileLabel     = new TextSprite();
            FileLabel.loc = FileBg.loc + new Vector2(8, 40);
            FileLabel.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            FileLabel.text         = "File";
            FileLabel.stereoscopic = Config.DATA_LEADER_DEPTH;

            // Victory Text
            Victory_Text     = new TextSprite();
            Victory_Text.loc = Objective_Window.loc + new Vector2(68, 12);
            Victory_Text.SetFont(Config.UI_FONT, Global.Content, "White");
            Victory_Text.text         = Global.game_system.Victory_Text;
            Victory_Text.stereoscopic = Config.DATA_WINDOW_DEPTH;
            // Loss Text
            Loss_Text     = new TextSprite();
            Loss_Text.loc = Objective_Window.loc + new Vector2(68, 44);
            Loss_Text.SetFont(Config.UI_FONT, Global.Content, "White");
            Loss_Text.text         = Global.game_system.Loss_Text;
            Loss_Text.stereoscopic = Config.DATA_WINDOW_DEPTH;

            // Turn Text
            Turn     = new RightAdjustedText();
            Turn.loc = Game_Data_Window.loc + new Vector2(100, 8);
            Turn.SetFont(Config.UI_FONT, Global.Content, "Blue");
            Turn.text         = Global.game_system.chapter_turn.ToString();
            Turn.stereoscopic = Config.DATA_DATA_DEPTH;
            // Funds Text
            Funds     = new RightAdjustedText();
            Funds.loc = Game_Data_Window.loc + new Vector2(92, 24);
            Funds.SetFont(Config.UI_FONT, Global.Content, "Blue");
            Funds.text         = Global.battalion.gold.ToString();
            Funds.stereoscopic = Config.DATA_DATA_DEPTH;

            // Leader Name
            Leader_Name     = new TextSprite();
            Leader_Name.loc = UnitBg.loc + new Vector2(32 + 24, 12);
            Leader_Name.SetFont(Config.UI_FONT, Global.Content, "White");
            Leader_Name.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Level
            Lvl     = new RightAdjustedText();
            Lvl.loc = UnitBg.loc + new Vector2(68, 40 + 0);
            Lvl.SetFont(Config.UI_FONT, Global.Content, "Blue");
            Lvl.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Hp
            Hp     = new RightAdjustedText();
            Hp.loc = UnitBg.loc + new Vector2(44, 40 + 12);
            Hp.SetFont(Config.UI_FONT, Global.Content, "Blue");
            Hp.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Hp Max
            Hp_Max     = new RightAdjustedText();
            Hp_Max.loc = UnitBg.loc + new Vector2(68, 40 + 12);
            Hp_Max.SetFont(Config.UI_FONT, Global.Content, "Blue");
            Hp_Max.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Rating
            Rating     = new RightAdjustedText();
            Rating.loc = UnitBg.loc + new Vector2(120, 40 + 12);
            Rating.SetFont(Config.UI_FONT, Global.Content, "Blue");
            Rating.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Map Sprite
            Map_Sprite = new Character_Sprite();
            Map_Sprite.facing_count = 3;
            Map_Sprite.frame_count  = 3;
            Map_Sprite.loc          = UnitBg.loc + new Vector2(20, 24);
            Map_Sprite.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Miniface
            Face              = new Miniface();
            Face.loc          = UnitBg.loc + new Vector2(104, 8);
            Face.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Weapon
            LeaderWeapon              = new Item_Display();
            LeaderWeapon.loc          = UnitBg.loc + new Vector2(8, 28);
            LeaderWeapon.stereoscopic = Config.DATA_LEADER_DEPTH;

            // File number
            FileNumber     = new RightAdjustedText();
            FileNumber.loc = FileBg.loc + new Vector2(40, 40);
            FileNumber.SetFont(Config.UI_FONT, Global.Content, "Blue");
            FileNumber.text         = Global.current_save_id.ToString();
            FileNumber.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Style
            StyleText     = new TextSprite();
            StyleText.loc = FileBg.loc + new Vector2(8, 8);
            StyleText.SetFont(Config.UI_FONT, Global.Content, "Blue");
            StyleText.text         = Global.game_system.Style.ToString();
            StyleText.stereoscopic = Config.DATA_LEADER_DEPTH;
            // Difficulty
            DifficultyText     = new TextSprite();
            DifficultyText.loc = FileBg.loc + new Vector2(8, 24);
            DifficultyText.SetFont(Config.UI_FONT, Global.Content, "Blue");
            DifficultyText.text         = Global.game_system.Difficulty_Mode.ToString();
            DifficultyText.stereoscopic = Config.DATA_LEADER_DEPTH;

            // Rank Letters
            TotalRankLetter     = new TextSprite();
            TotalRankLetter.loc = RankingWindow.loc + new Vector2(88, 8);
            TotalRankLetter.SetFont(Config.UI_FONT + "L", Global.Content, "Blue", Config.UI_FONT);
            TotalRankLetter.stereoscopic = Config.DATA_TEAMS_DEPTH;
            TurnsRankLetter     = new TextSprite();
            TurnsRankLetter.loc = RankingWindow.loc + new Vector2(104, 24);
            TurnsRankLetter.SetFont(Config.UI_FONT + "L", Global.Content, "Blue", Config.UI_FONT);
            TurnsRankLetter.stereoscopic = Config.DATA_TEAMS_DEPTH;
            CombatRankLetter             = new TextSprite();
            CombatRankLetter.loc         = RankingWindow.loc + new Vector2(104, 40);
            CombatRankLetter.SetFont(Config.UI_FONT + "L", Global.Content, "Blue", Config.UI_FONT);
            CombatRankLetter.stereoscopic = Config.DATA_TEAMS_DEPTH;
            ExpRankLetter     = new TextSprite();
            ExpRankLetter.loc = RankingWindow.loc + new Vector2(104, 56);
            ExpRankLetter.SetFont(Config.UI_FONT + "L", Global.Content, "Blue", Config.UI_FONT);
            ExpRankLetter.stereoscopic = Config.DATA_TEAMS_DEPTH;
            // Rank Gauges
            TurnsBar               = new Stat_Bar();
            TurnsBar.loc           = RankingWindow.loc + new Vector2(40, 32);
            TurnsBar.offset        = new Vector2(-2, 0);
            TurnsBar.bar_width     = RANKING_BAR_LENGTH;
            TurnsBar.stereoscopic  = Config.DATA_TEAMS_DEPTH;
            CombatBar              = new Stat_Bar();
            CombatBar.loc          = RankingWindow.loc + new Vector2(40, 48);
            CombatBar.offset       = new Vector2(-2, 0);
            CombatBar.bar_width    = RANKING_BAR_LENGTH;
            CombatBar.stereoscopic = Config.DATA_TEAMS_DEPTH;
            ExpBar              = new Stat_Bar();
            ExpBar.loc          = RankingWindow.loc + new Vector2(40, 64);
            ExpBar.offset       = new Vector2(-2, 0);
            ExpBar.bar_width    = RANKING_BAR_LENGTH;
            ExpBar.stereoscopic = Config.DATA_TEAMS_DEPTH;

            // Page Arrows
            Left_Page_Arrow               = new Page_Arrow();
            Left_Page_Arrow.loc           = new Vector2(4, 72);
            Left_Page_Arrow.stereoscopic  = Config.DATA_BANNER_DEPTH;
            Right_Page_Arrow              = new Page_Arrow();
            Right_Page_Arrow.loc          = new Vector2(Config.WINDOW_WIDTH - 4, 72);
            Right_Page_Arrow.mirrored     = true;
            Right_Page_Arrow.stereoscopic = Config.DATA_BANNER_DEPTH;

            refresh_rank();
            set_images();
        }