internal Prep_Items_Help_Footer() { texture = Global.Content.Load <Texture2D>("Graphics/White_Square"); tint = new Color(0, 0, 0, 128); scale = new Vector2(Config.WINDOW_WIDTH / (float)texture.Width, 16f / texture.Height); Type_Icon = new Weapon_Type_Icon(); Type_Icon.loc = new Vector2(16, 0); for (int i = 0; i < 4; i++) { Stat_Labels.Add(new TextSprite()); Stat_Labels[i].loc = new Vector2(56 + i * 56, 0); Stat_Labels[i].SetFont(Config.UI_FONT, Global.Content, "Yellow"); } Stat_Labels[0].text = "Atk"; Stat_Labels[1].text = "Crit"; Stat_Labels[2].text = "Hit"; Stat_Labels[3].text = "AS"; Stats.Add(new TextSprite()); Stats[0].loc = new Vector2(32, 0); Stats[0].SetFont(Config.UI_FONT + "L", Global.Content, "Blue", Config.UI_FONT); for (int i = 1; i < 5; i++) { Stats.Add(new RightAdjustedText()); Stats[i].loc = new Vector2(40 + i * 56, 0); Stats[i].SetFont(Config.UI_FONT, Global.Content, "Blue"); } QuickDescrip = new TextSprite(); QuickDescrip.loc = new Vector2(16, 0); QuickDescrip.SetFont(Config.UI_FONT, Global.Content, "White"); }
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(); }
public Item_Display() { Icon = new Icon_Sprite(); Icon.size = new Vector2(Config.ITEM_ICON_SIZE, Config.ITEM_ICON_SIZE); Name = new TextSprite(); Name.SetFont(Config.UI_FONT); }
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); }
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 virtual void initialize_label(string label) { Label = new TextSprite(); Label.draw_offset = new Vector2(0, 0); Label.SetFont(Config.UI_FONT, Global.Content, "Yellow"); set_label(label); }
internal DebugSwitchDisplay(intFunc update_function, List <Tuple <int, string, Color> > commands) { UpdateFunction = update_function; int x = 0; foreach (var tuple in commands) { TextSprite text = new TextSprite(); text.loc = new Vector2(x + 4, 0); text.SetFont(Config.UI_FONT); text.text = tuple.Item2; Texts.Add(text); Sprite bg = new Sprite(); bg.loc = new Vector2(x, 0); bg.scale = new Vector2(tuple.Item1 / 16f, 1f); bg.tint = tuple.Item3; Bgs.Add(bg); BgFadeTimes.Add(Index == BgFadeTimes.Count ? FADE_TIME : 0); BgColors.Add(tuple.Item3); x += tuple.Item1; } Width = commands.Select(tuple => tuple.Item1).Sum(); }
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 void initialize_images() { // Window Window = new SystemWindowHeadered(); Window.width = this.window_width; Window.height = 48; // Target Sprite Target_Sprite = new Character_Sprite(); Target_Sprite.draw_offset = new Vector2(20, 24); Target_Sprite.facing_count = 3; Target_Sprite.frame_count = 3; // Names Name = new TextSprite(); Name.SetFont(Config.UI_FONT, Global.Content, "White"); // Stat Labels Stat_Labels = new List <TextSprite>(); for (int i = 0; i < 1; i++) { Stat_Labels.Add(new TextSprite()); Stat_Labels[i].offset = new Vector2(-8, -(24 + (i * 16))); Stat_Labels[i].SetFont(Config.UI_FONT, Global.Content, "Yellow"); } Stat_Labels[0].SetFont(Config.UI_FONT + "L", Config.UI_FONT); Stat_Labels[0].text = "HP"; set_images(); }
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(); }
internal DebugStringDisplay( stringFunc update_function, int text_width, string caption = null, bool center = false, string text_color = "White") { UpdateFunction = update_function; int x = 0; //Caption if (!string.IsNullOrEmpty(caption)) { CaptionText = new TextSprite(); CaptionText.loc = new Vector2(x + 4, 0); CaptionText.SetFont(Config.UI_FONT); CaptionText.text = caption; int caption_width = CaptionText.text_width + 8; caption_width = ((caption_width + 7) / 8) * 8; x += caption_width; } // Text Text = new TextSprite(); Text.loc = new Vector2(x + 4, 0); Text.SetFont(Config.UI_FONT); TextWidth = text_width; Width = x + TextWidth; Center = center; TextColor = text_color; }
public ReinforcementDetailWindow() { Window = new System_Color_Window(); Window.offset = new Vector2(8, 8); Window.width = 136; Window.height = 80; var text = new TextSprite(); text.SetFont(Config.UI_FONT, Global.Content, "White"); MapSprite = new MapSpriteUINode("", text, 48); MapSprite.loc = new Vector2(0, 0); Level = new TextSprite(); Level.loc = new Vector2(88, 0); Level.SetFont(Config.UI_FONT + "L", Global.Content, "Blue", Config.UI_FONT); Level.SetTextFontColor(0, "Yellow"); Level.SetTextFontColor(2, "Blue"); Identifier = new TextSprite(Config.UI_FONT, Global.Content, "White", new Vector2(0, 16)); Build = new TextSprite(Config.UI_FONT, Global.Content, "Blue", new Vector2(88, 16)); Mission = new TextSprite(Config.UI_FONT, Global.Content, "White", new Vector2(0, 32)); Inventory = new Unit_Info_Inventory(); Inventory.loc = new Vector2(0, 48); }
protected override void initialize_images() { WTA1 = new Effective_WT_Arrow(); WTA2 = new Effective_WT_Arrow(); WTA1.draw_offset = new Vector2(40, 16); WTA2.draw_offset = new Vector2(56 + 16, 16); Window_Width = 56 + 72; Window_Height = 32; //Window_Width = 56 + 32; //Debug //Window_Height = 56; //Stats = new Unit_Info_Panel_Combat_Preview(); //Debug //Stats.draw_offset = new Vector2(24, 16); Item = new Item_Icon_Sprite(); Item.draw_offset = new Vector2(40, 16); TargetItem = new Item_Icon_Sprite(); TargetItem.draw_offset = new Vector2(56 + 16, 16); NAME_LOC = new Vector2(28, 0); base.initialize_images(); TargetName = new TextSprite(); //TargetName.draw_offset = new Vector2(Window_Width - 24, 32); //Debug TargetName.draw_offset = new Vector2(56 + 16, 0); TargetName.SetFont(Config.INFO_FONT, Global.Content); VsLabel = new Sprite(Global.Content.Load <Texture2D>( @"Graphics/Windowskins/Unit_Info")); VsLabel.draw_offset = new Vector2(56, 12); VsLabel.src_rect = new Rectangle(0, 64, 16, 8); }
protected void initialize(int weapon, int newRank, bool battle_scene) { Timer_Max = 97; if (battle_scene) { texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Combat_Popup"); } else { Window = new System_Color_Window(); Window.width = WIDTH; Window.height = 32; } // Text Text = new TextSprite( Config.UI_FONT, Global.Content, "White", new Vector2(8, 8), "Weapon Level increased to "); // Weapon rank Rank = new TextSprite(); Rank.loc = Text.loc + new Vector2(Text.text_width, 0); Rank.SetFont(Config.UI_FONT + "L", Global.Content, "Blue", Config.UI_FONT); Rank.text = TactileLibrary.Data_Weapon.WLVL_LETTERS[newRank]; // Weapon type icon Icon = new Weapon_Type_Icon(); Icon.index = weapon; Icon.loc = Rank.loc + new Vector2(Rank.text_width, 0); }
public override void add_choice(string str, Vector2 loc) { List <TextUINode> choices = Choices == null ? new List <TextUINode>() : Choices.ToList(); var text = new TextSprite(); text.SetFont(Tactile.Config.UI_FONT, Global.Content, "White"); text.text = str; var node = new TextUINode("", text, text.text_width); node.loc = loc; choices.Add(node); Choices = new UINodeSet <TextUINode>(choices); Cursor = new UICursor <TextUINode>(Choices); Cursor.hide_when_using_mouse(false); // Resize if needed int width = Font_Data.text_width(str, Tactile.Config.UI_FONT); width = width + (width % 8 == 0 ? 0 : (8 - width % 8)) + 16 + (int)loc.X; if (width > Size.X) { size = new Vector2(width, Size.Y); } }
public SettingsTopMenu() : base() { Vector2 loc = new Vector2(Config.WINDOW_WIDTH / 2 - 40, 32); List <string> settings = GetSettingsStrings(); // Window Window = new Window_Command(loc, 72, settings); Window.text_offset = new Vector2(8, 0); Window.glow = true; Window.bar_offset = new Vector2(-8, 0); Window.WindowVisible = false; Window.stereoscopic = Config.PREPMAIN_WINDOW_DEPTH; // Version Number VersionNumber = new TextSprite(); VersionNumber.loc = new Vector2(8, Config.WINDOW_HEIGHT - 16); VersionNumber.SetFont(Config.UI_FONT, Global.Content, "White"); VersionNumber.text = string.Format("v {0}", Global.RUNNING_VERSION); #if PRERELEASE || DEBUG VersionNumber.text += " - Private Beta"; #endif VersionNumber.stereoscopic = Config.MAPCOMMAND_WINDOW_DEPTH; // Background Background = new Menu_Background(); Background.texture = Global.Content.Load <Texture2D>(@"Graphics/Pictures/Status_Background"); Background.vel = new Vector2(-0.25f, 0); Background.tile = new Vector2(3, 2); Background.tint = new Color(128, 128, 128, 255); Background.stereoscopic = Config.MAPMENU_BG_DEPTH; }
internal StatusPrimaryStatUINode( string helpLabel, string label, Func <Game_Unit, PrimaryStatState> statFormula, Func <Game_Unit, Color> labelHueFormula, int textOffset = 48) : base(helpLabel, label, null, textOffset) { StatFormula = statFormula; LabelHueFormula = labelHueFormula; if (LabelHueFormula != null) { Label.SetColor(Global.Content, "StatHueWhite"); } Bonus = new TextSprite(); Bonus.draw_offset = new Vector2(textOffset + 0, 0); Bonus.SetFont(Config.UI_FONT + "Bonus", Config.UI_FONT); Bar = new Stat_Bar(); Bar.draw_offset = new Vector2(16, 8); Bar.offset = new Vector2(-2, 0); PenaltyArrow = new Weapon_Triangle_Arrow(); PenaltyArrow.draw_offset = new Vector2(16, 0) + new Vector2(-12, 1); Size = new Vector2(textOffset + 24, 16); }
protected virtual void initialize_text(Vector2 draw_offset) { Text = new TextSprite(); Text.draw_offset = draw_offset; Text.SetFont(Config.UI_FONT); set_color("White"); }
protected void set_choices(int ox, string str1, string str2) { List <TextUINode> choices = new List <TextUINode>(); var text1 = new TextSprite(); text1.SetFont(Config.CONVO_FONT, Global.Content, "White"); text1.text = str1; var node = new TextUINode("", text1, text1.text_width); node.loc = new Vector2(88 + ox, 32); choices.Add(node); var text2 = new TextSprite(); text2.SetFont(Config.CONVO_FONT, Global.Content, "White"); text2.text = str2; node = new TextUINode("", text2, text2.text_width); node.loc = new Vector2(88 + ox + 40, 32); choices.Add(node); Choices = new UINodeSet <TextUINode>(choices); Cursor = new UICursor <TextUINode>(Choices); Cursor.draw_offset = new Vector2(-16, 0); Cursor.ratio = new int[] { 1, 1 }; Cursor.hide_when_using_mouse(false); Cursor.move_to_target_loc(); }
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 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(); }
protected override void set_text(TactileLibrary.Data_Equipment item, bool battle_scene) { int x = 8; Got = new TextSprite(); Got.loc = new Vector2(x, 8); Got.SetFont(Config.UI_FONT, Global.Content, battle_scene ? "CombatBlue" : "White"); Got.text = got_text(); x += Got.text_width; A_Name = new TextSprite(); A_Name.loc = new Vector2(x, 8); A_Name.SetFont(Config.UI_FONT, Global.Content, battle_scene ? "CombatBlue" : "Blue"); A_Name.text = aname_text(item.Name, item); x += A_Name.text_width + 1; Icon.loc = new Vector2(x, 8); x += 17; Broke = new TextSprite(); Broke.loc = new Vector2(x, 8); Broke.SetFont(Config.UI_FONT, Global.Content, "White"); Broke.text = broke_text(); x += Broke.text_width; Width = x + 8 + (x % 8 != 0 ? (8 - x % 8) : 0); }
public Gold_Gain_Popup(int value) { Timer_Max = 113; Width += 8; Got = new TextSprite(); Got.loc = new Vector2(Width, 8); Got.SetFont(Config.UI_FONT, Global.Content, "White"); Got.text = value >= 0 ? "Got " : ""; Width += Font_Data.text_width(Got.text); Amount = new TextSprite(); Amount.loc = new Vector2(Width, 8); Amount.SetFont(Config.UI_FONT, Global.Content, "Blue"); Amount.text = Math.Abs(value).ToString(); Width += Font_Data.text_width(Amount.text); Gold = new TextSprite(); Gold.loc = new Vector2(Width, 8); Gold.SetFont(Config.UI_FONT, Global.Content, "White"); Gold.text = value >= 0 ? " gold." : " gold was stolen."; Width += Font_Data.text_width(Gold.text); Width += 8 + (Width % 8 != 0 ? (8 - Width % 8) : 0); Window = new System_Color_Window(); Window.width = Width; Window.height = 32; loc = new Vector2((Config.WINDOW_WIDTH - Width) / 2, 80); }
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); }
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); }
private TextSprite ranking_text(string text) { var rank = new TextSprite(); rank.SetFont(Tactile.Config.UI_FONT, Global.Content, "Blue"); rank.text = text; return(rank); }
public Unit_Detail_Info_Hp_Gauge() { init_images(); Slash = new TextSprite(); Slash.SetFont(Config.INFO_FONT, Global.Content); Slash.text = "/"; set_constants(); }
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(); }