Пример #1
0
        internal SupportUINode(
            string helpLabel,
            int actorId,
            int targetActorId,
            string str,
            int width)
            : base(helpLabel)
        {
            Size = new Vector2(width, 16);

            Text             = new TextSprite();
            Text.draw_offset = new Vector2(16, 0);
            Text.SetFont(Tactile.Config.UI_FONT, Global.Content, "White");
            Text.text = str;

            // Map Sprite
            MapSprite = new Character_Sprite();
            MapSprite.facing_count = 3;
            MapSprite.frame_count  = 3;
            MapSprite.draw_offset  = new Vector2(8, 16);
            MapSprite.mirrored     = Constants.Team.flipped_map_sprite(Constants.Team.PLAYER_TEAM);

            Rank             = new RightAdjustedText();
            Rank.draw_offset = new Vector2(104, 0);
            Rank.SetFont(Tactile.Config.UI_FONT + "L", Tactile.Config.UI_FONT);

            if (DisplayedActor(targetActorId))
            {
                set_map_sprite_texture(true, MapSpriteName(targetActorId));

                Text.SetColor(Global.Content,
                              SupportEnabled(actorId, targetActorId) ? "White" : "Grey");

                Rank.SetColor(Global.Content, SupportEnabled(actorId, targetActorId) ? "White" : "Grey");
                Rank.text = RankText(actorId, targetActorId);

                Icon_Sprite icon = new Icon_Sprite();
                icon.texture = Global.Content.Load <Texture2D>(@"Graphics/Icons/Affinity Icons");
                icon.size    = new Vector2(16, 16);
                icon.index   = GetAffinity(targetActorId);
                Affinity     = icon;
            }
            else
            {
                set_map_sprite_texture(false, MapSpriteName(targetActorId));

                Text.SetColor(Global.Content, "Grey");

                Rank.SetColor(Global.Content, "Grey");
                Rank.text = Constants.Support.SUPPORT_LETTERS[0];

                TextSprite affinity = new TextSprite();
                affinity.SetFont(Tactile.Config.UI_FONT, Global.Content, "Grey");
                affinity.text = "--";
                Affinity      = affinity;
            }
            MapSprite.frame = Global.game_system.unit_anim_idle_frame;

            Affinity.draw_offset = new Vector2(64, 0);
        }
Пример #2
0
        protected void initialize_sprites()
        {
            Face                  = new Miniface();
            Face.loc              = new Vector2(24, 8);
            Affinity_Icon         = new Icon_Sprite();
            Affinity_Icon.texture = Global.Content.Load <Texture2D>(@"Graphics/Icons/Affinity Icons");
            Affinity_Icon.size    = new Vector2(16, 16);
            Affinity_Icon.loc     = new Vector2(96, 8);
            Name                  = new TextSprite();
            Name.loc              = new Vector2(96, 8);
            Name.SetFont(Config.UI_FONT, Global.Content, "White");
            Lvl_Label     = new TextSprite();
            Lvl_Label.loc = new Vector2(40, 24);
            Lvl_Label.SetFont(Config.UI_FONT + "L", Global.Content, "Yellow", Config.UI_FONT);
            Lvl_Label.text = "LV";
            Exp_Label      = new TextSprite();
            Exp_Label.loc  = new Vector2(80, 24);
            Exp_Label.SetFont(Config.UI_FONT + "L", Global.Content, "Yellow", Config.UI_FONT);
            Exp_Label.text = "E";
            Lvl            = new RightAdjustedText();
            Lvl.loc        = new Vector2(72, 24);
            Lvl.SetFont(Config.UI_FONT, Global.Content, "Blue");
            Exp     = new RightAdjustedText();
            Exp.loc = new Vector2(104, 24);
            Exp.SetFont(Config.UI_FONT, Global.Content, "Blue");

            initialize_hp();
        }
Пример #3
0
 protected override void initialize_images()
 {
     Affinity_Icon         = new Icon_Sprite();
     Affinity_Icon.texture = Global.Content.Load <Texture2D>(@"Graphics/Icons/Affinity Icons");
     Affinity_Icon.size    = new Vector2(16, 16);
     Inventory             = new Unit_Info_Inventory();
     Inventory.offset      = -new Vector2(32, 0);
     Stats        = new Unit_Info_Panel_Stats();
     Stats.offset = -new Vector2(96, 16);
     base.initialize_images();
 }
        internal StatusSkillIconUINode(
            string helpLabel,
            Func <Game_Unit, SkillState> skillFormula)
            : base(helpLabel)
        {
            SkillFormula = skillFormula;

            SkillIcon             = new Icon_Sprite();
            SkillIcon.size        = new Vector2(Config.SKILL_ICON_SIZE, Config.SKILL_ICON_SIZE);
            SkillIcon.draw_offset = new Vector2(0, 0);

            Gauge             = new Mastery_Gauge(0);
            Gauge.draw_offset = new Vector2(0, 0);

            Size = new Vector2(96, Config.SKILL_ICON_SIZE);
        }
Пример #5
0
        internal OptionsUINode(int optionIndex)
        {
            Option = (Constants.Options)optionIndex;

            OptionsIcon             = new Icon_Sprite();
            OptionsIcon.size        = new Vector2(16, 16);
            OptionsIcon.draw_offset = new Vector2(-16, 0);
            OptionsIcon.texture     = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Options_Icons");
            OptionsIcon.index       = optionIndex;

            Label = new TextSprite(
                Config.UI_FONT, Global.Content, "White",
                new Vector2(0, 0),
                Constants.OptionsConfig.OPTIONS_DATA[optionIndex].Label);

            Size = new Vector2(80, 16);
        }
Пример #6
0
        internal StatusAidUINode(
            string helpLabel,
            string label,
            Func <Game_Unit, string> statFormula,
            Func <Game_Unit, int> aidTypeFormula,
            int textOffset = 48)
            : base(helpLabel, label, statFormula, textOffset)
        {
            AidTypeFormula = aidTypeFormula;

            Aid_Icon             = new Icon_Sprite();
            Aid_Icon.texture     = Global.Content.Load <Texture2D>(@"Graphics/Icons/Aid");
            Aid_Icon.size        = new Vector2(16, 16);
            Aid_Icon.columns     = 1;
            Aid_Icon.draw_offset = new Vector2(textOffset, 0);

            Size = new Vector2(textOffset + 24, 16);
        }
Пример #7
0
        internal StatusAffinityUINode(
            string helpLabel,
            Func <Game_Unit, Affinities> affinityFormula)
            : base(helpLabel)
        {
            AffinityFormula = affinityFormula;

            AffinityIcon             = new Icon_Sprite();
            AffinityIcon.draw_offset = new Vector2(40, 0);
            AffinityIcon.texture     = Global.Content.Load <Texture2D>(
                @"Graphics/Icons/Affinity Icons");
            AffinityIcon.size = new Vector2(16, 16);

            Label             = new TextSprite();
            Label.draw_offset = new Vector2(0, 0);
            Label.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            Label.text = "Affinity";

            Size = new Vector2(56, 16);
        }
Пример #8
0
        internal override void refresh(Game_Unit unit)
        {
            Class_Type_Icons.Clear();

            Text.text = "---";
            if (ClassTypesFormula != null)
            {
                var class_types = ClassTypesFormula(unit)
                                  .Where(x => Config.CLASS_TYPE_ICONS.Contains(x));
                if (class_types.Any())
                {
                    Text.text = "";

                    int class_type_count = class_types.Count();
                    foreach (ClassTypes type in class_types)
                    {
                        if (Config.CLASS_TYPE_ICONS.Contains(type))
                        {
                            var icon = new Icon_Sprite();
                            icon.texture     = Global.Content.Load <Texture2D>(@"Graphics/Icons/Class_Types");
                            icon.size        = new Vector2(16, 16);
                            icon.columns     = 1;
                            icon.draw_offset = new Vector2(
                                IconOffset + ((Class_Type_Icons.Count) * ICON_SPACING) -
                                ((class_type_count - 1) * (ICON_SPACING / 2)),
                                0);
                            icon.offset       = new Vector2(8, 0);
                            icon.index        = (int)type;
                            icon.stereoscopic = Config.STATUS_LEFT_WINDOW_DEPTH;

                            Class_Type_Icons.Add(icon);
                        }
                    }
                }
            }
        }