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); }
internal DebugIntDisplay(intFunc update_function, string caption, int places, Maybe <int> caption_width = default(Maybe <int>)) { UpdateFunction = update_function; Places = places; int x = 0; //Caption CaptionText = new TextSprite(); CaptionText.loc = new Vector2(x + 4, 0); CaptionText.SetFont(Config.UI_FONT); CaptionText.text = caption; if (caption_width.IsNothing) { caption_width = CaptionText.text_width + 8; caption_width = ((caption_width + 7) / 8) * 8; } x += caption_width; // Counter Text = new RightAdjustedText(); Text.loc = new Vector2(x + Places * 8 + 4, 0); Text.SetFont(Config.UI_FONT); Width = caption_width + (Places + 1) * 8; }
public Support_Command_Components(int lines, int remaining, bool noRemainingPositive = false) { texture = Global.Content.Load <Texture2D>(FILENAME); Lines = lines; string labelColor = "White"; string valueColor = "Blue"; if (remaining == 0) { if (noRemainingPositive) { valueColor = "Green"; } else { labelColor = "Grey"; valueColor = "Grey"; } } Remaining_Label = new TextSprite(); Remaining_Label.loc = new Vector2(24, 0); Remaining_Label.SetFont(Config.UI_FONT, Global.Content, labelColor); Remaining_Label.text = "Remaining"; X_Label = new TextSprite(); X_Label.loc = new Vector2(72, 0); X_Label.SetFont(Config.UI_FONT, Global.Content, labelColor); X_Label.text = "x"; Remaining_Count = new RightAdjustedText(); Remaining_Count.loc = new Vector2(96, 0); Remaining_Count.SetFont(Config.UI_FONT, Global.Content, valueColor); Remaining_Count.text = remaining.ToString(); }
protected void initialize() { // Label Label = new Sprite(); Label.texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Data_Screen"); Label.loc = new Vector2(0 + (Time >= 0 ? 4 : 0), 0); Label.src_rect = new Rectangle(0, 144, 24, 16); // Hour Hour = new RightAdjustedText(); Hour.loc = new Vector2(40, 0); Hour.SetFont(Config.UI_FONT, Global.Content, "Blue"); // Minute Minute = new RightAdjustedText(); Minute.loc = new Vector2(64, 0); Minute.SetFont(Config.UI_FONT, Global.Content, "Blue"); // Second Second = new RightAdjustedText(); Second.loc = new Vector2(88, 0); Second.SetFont(Config.UI_FONT + "S", Global.Content, "Blue", Config.UI_FONT); // Separators Separator_1 = new RightAdjustedText(); Separator_1.loc = new Vector2(40 + 4, 0); Separator_1.SetFont(Config.UI_FONT + "S", Global.Content, "Blue", Config.UI_FONT); Separator_1.text = ":"; Separator_2 = new RightAdjustedText(); Separator_2.loc = new Vector2(64 + 4, 0); Separator_2.SetFont(Config.UI_FONT + "S", Global.Content, "Blue", Config.UI_FONT); Separator_2.text = "."; update(); }
private static RightAdjustedText stat_text() { var text = new RightAdjustedText(); text.SetFont(Config.INFO_FONT, Global.Content); return(text); }
internal StatusHpUINode( string helpLabel, string label, Func <Game_Unit, string> statFormula, Func <Game_Unit, string> maxStatFormula, Func <Game_Unit, Color> labelHueFormula) : base(helpLabel, label, statFormula, 32) { MaxStatFormula = maxStatFormula; LabelHueFormula = labelHueFormula; if (LabelHueFormula != null) { Label.SetColor(Global.Content, "StatHueWhite"); } SlashLabel = new TextSprite(); SlashLabel.draw_offset = new Vector2(32, 0); SlashLabel.SetFont(Config.UI_FONT, Global.Content, "Yellow"); SlashLabel.text = "/"; MaxHpText = new RightAdjustedText(); MaxHpText.draw_offset = new Vector2(32 + 24, 0); MaxHpText.SetFont(Config.UI_FONT, Global.Content, "Blue"); Size = new Vector2(32 + 24, 16); }
internal SliderUINode( string helpLabel, string str, int width, int gaugeMin, int gaugeMax, int gaugeWidth) : base(helpLabel, str, width) { GaugeMin = gaugeMin; GaugeMax = gaugeMax; Text = new TextSprite(); Text.SetFont(Tactile.Config.UI_FONT, Global.Content, "White"); Text.text = str; Bar = new Stat_Bar(); Bar.offset = new Vector2(-120 - 2, -8); Bar.bar_width = gaugeWidth; Value = new RightAdjustedText(); Value.draw_offset = new Vector2(120 + gaugeWidth + 8 + 24, 0); Value.SetFont(Tactile.Config.UI_FONT, Global.Content, "White"); set_value(-1); Size = new Vector2(width, 16); }
protected override void InitializeSprites() { Funds_Banner = new Sprite(); Funds_Banner.texture = Global.Content.Load <Texture2D>( @"Graphics\Windowskins\Preparations_Screen"); Funds_Banner.loc = new Vector2(216, 172); Funds_Banner.src_rect = new Rectangle(0, 64, 104, 24); Funds_Banner.offset = new Vector2(0, 1); Funds_Banner.stereoscopic = Config.PREPITEM_FUNDS_DEPTH; Funds_Label = new TextSprite(); Funds_Label.loc = Funds_Banner.loc + new Vector2(12, 0); Funds_Label.SetFont(Config.UI_FONT, Global.Content, "Yellow"); Funds_Label.text = "Funds"; Funds_Label.stereoscopic = Config.PREPITEM_FUNDS_DEPTH; Funds_Value = new RightAdjustedText(); Funds_Value.loc = Funds_Banner.loc + new Vector2(92, 0); Funds_Value.SetFont(Config.UI_FONT, Global.Content, "Blue"); Funds_Value.stereoscopic = Config.PREPITEM_FUNDS_DEPTH; Funds_G = new TextSprite(); Funds_G.loc = Funds_Banner.loc + new Vector2(92, 0); Funds_G.SetFont(Config.UI_FONT + "L", Global.Content, "Yellow", Config.UI_FONT); Funds_G.text = "G"; Funds_G.stereoscopic = Config.PREPITEM_FUNDS_DEPTH; base.InitializeSprites(); }
public Shop_Item() { Slash = new RightAdjustedText(); Slash.SetFont(Config.UI_FONT); Convoy = new RightAdjustedText(); Convoy.SetFont(Config.UI_FONT); }
public SupportViewerFooter() { this.texture = Global.Content.Load <Texture2D>(FILENAME); int supportProgress = Global.progress.SupportPercent; string labelColor = "White"; string valueColor = "Blue"; if (supportProgress == 100) { labelColor = "Green"; valueColor = "Green"; } SuccessLabel = new TextSprite(); SuccessLabel.loc = new Vector2(24, 0); SuccessLabel.SetFont(Config.UI_FONT, Global.Content, labelColor); SuccessLabel.text = "Success"; SuccessCount = new RightAdjustedText(); SuccessCount.loc = new Vector2(88, 0); SuccessCount.SetFont(Config.UI_FONT, Global.Content, valueColor); SuccessCount.text = supportProgress.ToString(); PercentLabel = new TextSprite(); PercentLabel.loc = new Vector2(88, 0); PercentLabel.SetFont(Config.UI_FONT, Global.Content, labelColor); PercentLabel.text = "%"; }
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(); }
protected override void initialize_sprites() { // Command Window create_command_window(Supply_Command_Window.All); base.initialize_sprites(); Banner = new Sprite(); Banner.texture = Global.Content.Load <Texture2D>(@"Graphics/White_Square"); Banner.loc = new Vector2(0, 8); Banner.draw_offset = new Vector2(Config.WINDOW_WIDTH / 2, 4); Banner.offset = new Vector2(16 / 2, 0); Banner.scale = new Vector2( (Config.WINDOW_WIDTH + Math.Abs(Config.CONVOY_BANNER_DEPTH) * 4) / 16f, 40 / 16f); Banner.tint = new Color(0, 0, 0, 128); Banner.stereoscopic = Config.CONVOY_BANNER_DEPTH; Face_Bg = new Sprite(); Face_Bg.texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Preparations_Screen"); Face_Bg.loc = Banner.loc + new Vector2(8, -8); Face_Bg.src_rect = new Rectangle(136, 136, 48, 64); Face_Bg.stereoscopic = Config.CONVOY_ICON_DEPTH; Convoy_Face = new Miniface(); Convoy_Face.loc = Face_Bg.loc + new Vector2(24, 8); Convoy_Face.set_actor(Global.battalion.convoy_face_name); Convoy_Face.stereoscopic = Config.CONVOY_ICON_DEPTH; Convoy_Label = new TextSprite(); Convoy_Label.loc = Face_Bg.loc + new Vector2(8, 40); Convoy_Label.SetFont(Config.UI_FONT, Global.Content, "White"); Convoy_Label.text = "Convoy"; Convoy_Label.stereoscopic = Config.CONVOY_ICON_DEPTH; Convoy_Text = new TextSprite(); Convoy_Text.loc = Face_Bg.loc + new Vector2(48, 16); Convoy_Text.SetFont(Config.UI_FONT, Global.Content, "White"); Convoy_Text.text = "What'll you do?"; Convoy_Text.one_at_a_time = true; Convoy_Text.stereoscopic = Config.CONVOY_ICON_DEPTH; Stock_Label = new TextSprite(); Stock_Label.loc = Stock_Banner.loc + new Vector2(8, 0); Stock_Label.SetFont(Config.UI_FONT, Global.Content, "White"); Stock_Label.text = "Stock"; Stock_Label.stereoscopic = Config.CONVOY_STOCK_DEPTH; Stock_Value = new RightAdjustedText(); Stock_Value.loc = Stock_Banner.loc + new Vector2(56, 0); Stock_Value.SetFont(Config.UI_FONT); Stock_Value.stereoscopic = Config.CONVOY_STOCK_DEPTH; Stock_Slash = new TextSprite(); Stock_Slash.loc = Stock_Banner.loc + new Vector2(56, 0); Stock_Slash.SetFont(Config.UI_FONT, Global.Content, "White"); Stock_Slash.text = "/"; Stock_Slash.stereoscopic = Config.CONVOY_STOCK_DEPTH; Stock_Max = new RightAdjustedText(); Stock_Max.loc = Stock_Banner.loc + new Vector2(88, 0); Stock_Max.SetFont(Config.UI_FONT); Stock_Max.stereoscopic = Config.CONVOY_STOCK_DEPTH; }
protected void init_images() { texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Unit_Info"); Hp = new RightAdjustedText(); Hp.SetFont(Config.INFO_FONT, Global.Content); MaxHp = new RightAdjustedText(); MaxHp.SetFont(Config.INFO_FONT, Global.Content); }
public Exp_Gauge(int base_exp) { texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Exp_Window"); Exp = base_exp; loc = new Vector2(88, (Config.WINDOW_HEIGHT - 32) / 2); Exp_Counter = new RightAdjustedText(); Exp_Counter.SetFont(Config.UI_FONT, Global.Content, "Exp"); }
public Status_Item() : base() { Uses = new RightAdjustedText(); Uses.SetFont(Config.UI_FONT); Slash = new TextSprite(); Slash.SetFont(Config.UI_FONT); Use_Max = new RightAdjustedText(); Use_Max.SetFont(Config.UI_FONT); }
protected void initialize_images() { // Windows Window = new SystemWindowHeadered(); Window.width = this.window_width; Window.height = 48; Window.draw_offset = new Vector2(0, (!this.target_position_reversed ? 0 : 48)); Target_Window = new SystemWindowHeadered(); Target_Window.width = this.window_width; Target_Window.height = 48; Target_Window.draw_offset = new Vector2(0, (this.target_position_reversed ? 0 : 48)); // Map Sprites Unit_Sprite = new Character_Sprite(); Unit_Sprite.draw_offset = new Vector2(20, 24 + (!this.target_position_reversed ? 0 : 48)); Unit_Sprite.facing_count = 3; Unit_Sprite.frame_count = 3; Target_Sprite = new Character_Sprite(); Target_Sprite.draw_offset = new Vector2(20, 24 + (this.target_position_reversed ? 0 : 48)); Target_Sprite.facing_count = 3; Target_Sprite.frame_count = 3; // Names Name1 = new TextSprite(); Name1.draw_offset = new Vector2(32, 8 + (!this.target_position_reversed ? 0 : 48)); Name1.SetFont(Config.UI_FONT, Global.Content, "White"); Name2 = new TextSprite(); Name2.draw_offset = new Vector2(32, 8 + (this.target_position_reversed ? 0 : 48)); Name2.SetFont(Config.UI_FONT, Global.Content, "White"); //Name1, , Aid_Value; //Name2, Con_Label, Con_Value; // Labels Aid_Label = new TextSprite(); Aid_Label.draw_offset = new Vector2(8, 24 + (!this.target_position_reversed ? 0 : 48)); Aid_Label.SetFont(Config.UI_FONT, Global.Content, "Yellow"); Aid_Label.text = "Aid"; Con_Label = new TextSprite(); Con_Label.draw_offset = new Vector2(8, 24 + (this.target_position_reversed ? 0 : 48)); Con_Label.SetFont(Config.UI_FONT, Global.Content, "Yellow"); Con_Label.text = "Con"; // Stats Aid_Value = new RightAdjustedText(); Aid_Value.draw_offset = new Vector2(72, 24 + (!this.target_position_reversed ? 0 : 48)); Aid_Value.SetFont(Config.UI_FONT, Global.Content, "Blue"); Con_Value = new RightAdjustedText(); Con_Value.draw_offset = new Vector2(72, 24 + (this.target_position_reversed ? 0 : 48)); Con_Value.SetFont(Config.UI_FONT, Global.Content, "Blue"); // Hand Hand = new Hand_Cursor(); Hand.offset = new Vector2(8, 0); Hand.draw_offset = new Vector2(48, 47); Hand.mirrored = !this.target_position_reversed; Hand.angle = MathHelper.PiOver2; // Rescue Icon Rescue_Icon = new Sprite(); Rescue_Icon.texture = Global.Content.Load <Texture2D>(@"Graphics/Characters/RescueIcon"); set_images(); }
internal WorldmapUINode( string helpLabel, TextSprite text, int width) : base(helpLabel, text, width) { Rank = new RightAdjustedText(); Rank.draw_offset = new Vector2(width, 0); Rank.SetFont(Tactile.Config.UI_FONT + "L", Global.Content, "Yellow", Tactile.Config.UI_FONT); }
protected virtual void initialize_hp() { Hp_Label = new TextSprite(); Hp_Label.loc = new Vector2(112, 24); Hp_Label.SetFont(Config.UI_FONT + "L", Global.Content, "Yellow", Config.UI_FONT); Hp_Label.text = "HP"; Hp = new RightAdjustedText(); Hp.loc = new Vector2(144, 24); Hp.SetFont(Config.UI_FONT, Global.Content, "Blue"); }
public Unit_Info_Panel_Stats_Detail() { Src_Rect2 = new Rectangle(88, 40, 16, 32); Def = new RightAdjustedText(); Def.SetFont(Config.INFO_FONT, Global.Content); Res = new RightAdjustedText(); Res.SetFont(Config.INFO_FONT, Global.Content); Dod = new RightAdjustedText(); Dod.SetFont(Config.INFO_FONT, Global.Content); ASpd = new RightAdjustedText(); ASpd.SetFont(Config.INFO_FONT, Global.Content); }
protected override void initialize_images() { Window_Img = new Terrain_Window(); Window_Img.offset = new Vector2(5, 5); Window_Img.tint = new Color(240, 240, 240, 224); Name = new TextSprite(); Name.SetFont(Config.UI_FONT, Global.Content, "White"); Def = new RightAdjustedText(); Def.SetFont(Config.INFO_FONT + "2", Global.Content, null, Config.INFO_FONT); Avo = new RightAdjustedText(); Avo.SetFont(Config.INFO_FONT + "2", Global.Content, null, Config.INFO_FONT); }
public Unit_Page_1(Game_Unit unit) { // Class Class = new TextSprite(); Class.loc = new Vector2(0, 0); Class.SetFont(Config.UI_FONT, Global.Content, "White"); Class.text = unit.actor.class_name; // Lvl Lvl = new RightAdjustedText(); Lvl.loc = new Vector2(88, 0); Lvl.SetFont(Config.UI_FONT, Global.Content, "Blue"); Lvl.text = unit.actor.level.ToString(); // Exp Exp = new RightAdjustedText(); Exp.loc = new Vector2(108, 0); Exp.SetFont(Config.UI_FONT, Global.Content, "Blue"); Exp.text = unit.actor.can_level() ? unit.actor.exp.ToString() : "--"; // Hp Hp = new RightAdjustedText(); Hp.loc = new Vector2(128, 0); Hp.SetFont(Config.UI_FONT, Global.Content, "Blue"); Hp.text = unit.actor.hp.ToString(); // Slash Slash = new TextSprite(); Slash.loc = new Vector2(129, 0); Slash.SetFont(Config.UI_FONT, Global.Content, "White"); Slash.text = "/"; // MaxHp MaxHp = new RightAdjustedText(); MaxHp.loc = new Vector2(152, 0); MaxHp.SetFont(Config.UI_FONT, Global.Content, "Blue"); MaxHp.text = unit.actor.maxhp.ToString(); // Affinity 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(160, 0); Affinity_Icon.index = (int)unit.actor.affin; // Status_Icons Status_Icons = new List <Status_Icon_Sprite>(); for (int i = 0; i < Math.Min(STATUS_ICONS_AT_ONCE, unit.actor.states.Count); i++) { Status_Icons.Add(new Status_Icon_Sprite()); Status_Icons[Status_Icons.Count - 1].texture = Global.Content.Load <Texture2D>(@"Graphics/Icons/Statuses"); Status_Icons[Status_Icons.Count - 1].size = new Vector2(16, 16); Status_Icons[Status_Icons.Count - 1].loc = new Vector2( 175 + (i * 16) + ((STATUS_ICONS_AT_ONCE - Math.Min(STATUS_ICONS_AT_ONCE, unit.actor.states.Count)) * 8), 0); Status_Icons[Status_Icons.Count - 1].index = Global.data_statuses[unit.actor.states[i]].Image_Index; Status_Icons[Status_Icons.Count - 1].counter = unit.actor.state_turns_left(unit.actor.states[i]); } }
protected override void initialize_images() { // 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, 0); // Background Background = new Sprite(); Background.texture = Global.Content.Load <Texture2D>(@"Graphics/Panoramas/Arena"); // Darkened Bar Darkened_Bar = new Sprite(); Darkened_Bar.texture = Global.Content.Load <Texture2D>(@"Graphics/White_Square"); Darkened_Bar.dest_rect = new Rectangle(0, 8, Config.WINDOW_WIDTH, 48); Darkened_Bar.tint = new Color(0, 0, 0, 128); // Portrait BG Portrait_Bg = new Sprite(); Portrait_Bg.texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Shop_Portrait_bg"); Portrait_Bg.src_rect = new Rectangle(0, 0, 57, 57); Portrait_Bg.loc = new Vector2(12, 4); // Gold Window Gold_Window = new Sprite(); Gold_Window.texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Gold_Window"); Gold_Window.loc = new Vector2(212, 48); // Gold_Data Gold_Data = new RightAdjustedText(); Gold_Data.loc = new Vector2(216 + 48, 48); Gold_Data.SetFont(Config.UI_FONT, Global.Content, "Blue"); redraw_gold(); Gold_G = new TextSprite(); Gold_G.loc = new Vector2(216 + 48, 48); Gold_G.SetFont(Config.UI_FONT + "L", Global.Content, "Yellow", Config.UI_FONT); Gold_G.text = "G"; // Text Message = new Message_Box(64, 8, 160, 2, false, "White"); if (Post_Fight) { set_text(unit.is_dead ? Arena_Messages.Lose : ( Global.game_system.Arena_Retreat ? Arena_Messages.Yield : Arena_Messages.Win)); Message.finished = true; } else { set_text(Arena_Messages.Intro); } Message_Active = true; // Choices set_images(); }
public Unit_Page_2(Game_Unit unit) { // Pow Pow = new RightAdjustedText(); Pow.loc = new Vector2(16, 0); Pow.SetFont(Config.UI_FONT, Global.Content, (unit.actor.get_capped(Stat_Labels.Pow) ? "Green" : "Blue")); Pow.text = unit.stat(Stat_Labels.Pow).ToString(); // Skl Skl = new RightAdjustedText(); Skl.loc = new Vector2(40, 0); Skl.SetFont(Config.UI_FONT, Global.Content, (unit.actor.get_capped(Stat_Labels.Skl) ? "Green" : "Blue")); Skl.text = unit.stat(Stat_Labels.Skl).ToString(); // Spd Spd = new RightAdjustedText(); Spd.loc = new Vector2(64, 0); Spd.SetFont(Config.UI_FONT, Global.Content, (unit.actor.get_capped(Stat_Labels.Spd) ? "Green" : "Blue")); Spd.text = unit.stat(Stat_Labels.Spd).ToString(); // Lck Lck = new RightAdjustedText(); Lck.loc = new Vector2(88, 0); Lck.SetFont(Config.UI_FONT, Global.Content, (unit.actor.get_capped(Stat_Labels.Lck) ? "Green" : "Blue")); Lck.text = unit.stat(Stat_Labels.Lck).ToString(); // Def Def = new RightAdjustedText(); Def.loc = new Vector2(112, 0); Def.SetFont(Config.UI_FONT, Global.Content, (unit.actor.get_capped(Stat_Labels.Def) ? "Green" : "Blue")); Def.text = unit.stat(Stat_Labels.Def).ToString(); // Res Res = new RightAdjustedText(); Res.loc = new Vector2(136, 0); Res.SetFont(Config.UI_FONT, Global.Content, (unit.actor.get_capped(Stat_Labels.Res) ? "Green" : "Blue")); Res.text = unit.stat(Stat_Labels.Res).ToString(); // Mov Mov = new RightAdjustedText(); Mov.loc = new Vector2(168, 0); Mov.SetFont(Config.UI_FONT, Global.Content, (unit.is_mov_capped() ? "Green" : "Blue")); Mov.text = unit.mov.ToString(); // Con Con = new RightAdjustedText(); Con.loc = new Vector2(192, 0); Con.SetFont(Config.UI_FONT, Global.Content, (unit.actor.get_capped(Stat_Labels.Con) ? "Green" : "Blue")); Con.text = unit.stat(Stat_Labels.Con).ToString(); // Aid Aid = new RightAdjustedText(); Aid.loc = new Vector2(216, 0); Aid.SetFont(Config.UI_FONT, Global.Content, "Blue"); Aid.text = unit.aid().ToString(); }
protected void initialize_images() { Name1 = new TextSprite(); Name1.SetFont(Config.UI_FONT, Global.Content, "White"); Hp1 = hp1; HP_Counter1 = new RightAdjustedText(); HP_Counter1.SetFont(Config.COMBAT_DIGITS_FONT, Global.Content); if (unit_2 != null) { Name2 = new TextSprite(); Name2.SetFont(Config.UI_FONT, Global.Content, "White"); Hp2 = hp2; HP_Counter2 = new RightAdjustedText(); HP_Counter2.SetFont(Config.COMBAT_DIGITS_FONT, Global.Content); Stat_Imgs = new List <RightAdjustedText>(); if (Data != null) { for (int i = 0; i < 8; i++) { Stat_Imgs.Add(new RightAdjustedText()); Stat_Imgs[i].SetFont(Config.COMBAT_DIGITS_FONT, Global.Content); Stat_Imgs[i].offset = new Vector2(-40 * ((i % 4) / 2), -8 * ((i % 4) % 2)); } } } else { Stat_Imgs = new List <RightAdjustedText>(); if (Data != null) { for (int i = 0; i < 4; i++) { Stat_Imgs.Add(new RightAdjustedText()); Stat_Imgs[i].SetFont(Config.COMBAT_DIGITS_FONT, Global.Content); Stat_Imgs[i].offset = new Vector2(-40 * ((i % 4) / 2), -8 * ((i % 4) % 2)); } } } if (Data != null) { foreach (int?stat in Data.Data[0].Key.Stats) { Stats.Add(stat); } } refresh_battle_stats(); set_location(); }
internal RankingUINode( string helpLabel, TextSprite text, int width, Game_Ranking ranking) : base(helpLabel, text, width) { RankValue = new RightAdjustedText(); RankValue.SetFont(Tactile.Config.UI_FONT, Global.Content, "Blue"); RankValue.text = ranking.score.ToString(); RankValue.draw_offset = new Vector2(56 - 0, 0); Rank = ranking_text(ranking.rank); Rank.SetFont(Tactile.Config.UI_FONT + "L", Tactile.Config.UI_FONT); Rank.draw_offset = new Vector2(56 + 4, 0); }
protected override void initialize_sprites() { // Window Window_Img = new System_Color_Window(); Window_Img.width = this.Width; Window_Img.height = this.Height + 12; Window_Img.offset = new Vector2(0, 8); // UI Nodes refresh_nodes(); Rows = (int)Math.Ceiling(Global.battalion.actors.Count / (float)this.Columns); // Scrollbar if (Rows > this.VisibleRows) { Scrollbar = new Scroll_Bar(this.VisibleRows * this.RowSize - 16, Rows, this.VisibleRows, 0); Scrollbar.loc = this.ScrollbarLoc; Scrollbar.UpArrowClicked += Scrollbar_UpArrowClicked; Scrollbar.DownArrowClicked += Scrollbar_DownArrowClicked; } // Unit Header Unit_Header = new Pick_Units_Header(this.Width + 8); Unit_Header.loc = new Vector2(-8, -20); // Labels Pick_Label = new TextSprite(); Pick_Label.loc = new Vector2(4, -12); Pick_Label.SetFont(Config.UI_FONT, Global.Content, "White"); Pick_Label.text = "Pick"; More_Units_Label = new TextSprite(); More_Units_Label.loc = new Vector2(44, -12); More_Units_Label.SetFont(Config.UI_FONT, Global.Content, "White"); More_Units_Label.text = "more units"; Slash_Label = new TextSprite(); Slash_Label.loc = new Vector2(108, -12); Slash_Label.SetFont(Config.UI_FONT, Global.Content, "White"); Slash_Label.text = "/"; // Data Units_Left = new RightAdjustedText(); Units_Left.loc = new Vector2(40, -12); Units_Left.SetFont(Config.UI_FONT, Global.Content, "Blue"); Units_Selected = new RightAdjustedText(); Units_Selected.loc = new Vector2(108, -12); Units_Selected.SetFont(Config.UI_FONT, Global.Content, "Blue"); Units_Total = new RightAdjustedText(); Units_Total.loc = new Vector2(132, -12); Units_Total.SetFont(Config.UI_FONT, Global.Content, "Blue"); }
public Unit_Info_Panel_Stats() { texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Unit_Info"); Src_Rect = new Rectangle(72, 40, 16, 24); AtkSpdLabel = new Sprite(this.texture); AtkSpdLabel.src_rect = new Rectangle(88, 64, 16, 8); AtkSpdLabel.loc = new Vector2(0, 24); Atk = new RightAdjustedText(); Atk.SetFont(Config.INFO_FONT, Global.Content); Hit = new RightAdjustedText(); Hit.SetFont(Config.INFO_FONT, Global.Content); Crt = new RightAdjustedText(); Crt.SetFont(Config.INFO_FONT, Global.Content); AtkSpd = new RightAdjustedText(); AtkSpd.SetFont(Config.INFO_FONT, Global.Content); }
internal SettingGaugeUINode(string label, int gaugeWidth, int gaugeMin, int gaugeMax, int textOffset) { FormatString = label; GaugeMin = gaugeMin; GaugeMax = gaugeMax; Bar = new Stat_Bar(); Bar.offset = new Vector2(-2, -8); Bar.bar_width = gaugeWidth; Label = new RightAdjustedText( Config.UI_FONT, Global.Content, "Grey", new Vector2(textOffset, 0), ""); Size = new Vector2(Math.Max(gaugeWidth, textOffset), 16); }
public void set_val(int exp, int level, bool no_gauge) { No_Exp_Gauge = no_gauge; if (No_Exp_Gauge) { MaxHp = new TextSprite(); MaxHp.SetFont(Config.INFO_FONT, Global.Content); MaxHp.text = "---"; MaxHp.offset = new Vector2(-9, 0); } else { float ratio = exp / (float)Global.ActorConfig.ExpToLvl; Width = (int)MathHelper.Clamp(ratio * GAUGE_WIDTH, GAUGE_MIN, GAUGE_WIDTH); MaxHp = new RightAdjustedText(); MaxHp.SetFont(Config.INFO_FONT, Global.Content); MaxHp.text = exp.ToString(); } Hp.text = level.ToString(); }
public Window_WorldMap_Data() { Window = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Worldmap_Window")); Window.src_rect = new Rectangle(0, 0, 136, 64); Window.tint = new Color(224, 224, 224, 224); Labels = new Sprite(Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Worldmap_Window")); Labels.src_rect = new Rectangle(0, 64, 136, 64); // Chapter Chapter = new TextSprite(); Chapter.loc = new Vector2(8, 8); Chapter.SetFont(Config.UI_FONT, Global.Content, "White"); // Lord_Lvl Lord_Lvl = new RightAdjustedText(); Lord_Lvl.loc = new Vector2(128, 8); Lord_Lvl.SetFont(Config.UI_FONT, Global.Content, "Blue"); // Mode Mode = new TextSprite(); Mode.loc = new Vector2(12, 24); Mode.SetFont(Config.UI_FONT, Global.Content, "Blue"); // Unit_Count Unit_Count = new RightAdjustedText(); Unit_Count.loc = new Vector2(40, 40); Unit_Count.SetFont(Config.UI_FONT, Global.Content, "Blue"); // Gold Gold = new RightAdjustedText(); Gold.loc = new Vector2(120, 40); Gold.SetFont(Config.UI_FONT, Global.Content, "Blue"); // Lord Lord_Sprite = new Character_Sprite(); Lord_Sprite.loc = new Vector2(88, 24); Lord_Sprite.facing_count = 3; Lord_Sprite.frame_count = 3; Lord_Sprite.mirrored = Constants.Team.flipped_map_sprite( Constants.Team.PLAYER_TEAM); // Arrows Left_Arrow = new Page_Arrow(); Left_Arrow.loc = new Vector2(0, 24); Right_Arrow = new Page_Arrow(); Right_Arrow.loc = new Vector2(WIDTH, 24); Right_Arrow.mirrored = true; }