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(); }
public Window_Command_Item_Preparations_Repair(int actor_id, Vector2 loc, bool facing_right, int active_item) : base(actor_id, loc, facing_right, true) { // Set items again, after setting the Active_Item Active_Item = active_item; add_commands(new List <string>()); refresh_equipped_tag(); this.immediate_index = active_item; Active_Item_Cursor = new Hand_Cursor(); Active_Item_Cursor.tint = new Color(192, 192, 192, 255); Active_Item_Cursor.draw_offset = new Vector2(-16, 0); Active_Item_Cursor.force_loc(UICursor.target_loc); }
private void initialize_images() { // Face Face1 = new Face_Sprite(actor1.face_name, true); if (actor1.generic_face) { Face1.recolor_country(actor1.name_full); } Face1.expression = Face1.status_frame; Face1.phase_in(); Face1.loc = new Vector2(loc.X + SPACING / 2, loc.Y + 12 + (int)Math.Max(0, (Face1.src_rect.Height - Face1.eyes_offset.Y) - 40) / 2); Face1.mirrored = true; // Face Face2 = new Face_Sprite(actor2.face_name, true); if (actor2.generic_face) { Face2.recolor_country(actor2.name_full); } Face2.expression = Face2.status_frame; Face2.phase_in(); Face2.loc = new Vector2((int)loc.X + SPACING + SPACING / 2, loc.Y + 12 + (int)Math.Max(0, (Face2.src_rect.Height - Face2.eyes_offset.Y) - 40) / 2); Grey_Cursor = new Hand_Cursor(); Grey_Cursor.visible = false; Grey_Cursor.draw_offset = new Vector2(-12, 0); Window1 = new System_Color_Window(); Window1.width = SPACING; Window1.height = Num * 16 + 16; Window1.loc = loc; Window2 = new System_Color_Window(); Window2.width = SPACING; Window2.height = Num * 16 + 16; Window2.loc = loc + new Vector2(SPACING, 0); Equipped_Tag1 = new TextSprite(); Equipped_Tag1.SetFont(Config.UI_FONT, Global.Content, "White"); Equipped_Tag1.text = "$"; Equipped_Tag2 = new TextSprite(); Equipped_Tag2.SetFont(Config.UI_FONT, Global.Content, "White"); Equipped_Tag2.text = "$"; Glowing_Line = new Unit_Line_Cursor(SPACING - 16); }
public Window_Command_Item_Target_Inventory(int unit_id, Vector2 loc, int active_item) { Unit_Id = unit_id; Active_Item = active_item; if (this.unit.items[Active_Item].to_item.can_repair) { WIDTH += 24; } initialize(loc, WIDTH, new List <string>()); this.immediate_index = active_item; Active_Item_Cursor = new Hand_Cursor(); Active_Item_Cursor.tint = new Color(192, 192, 192, 255); Active_Item_Cursor.draw_offset = new Vector2(-16, 0); Active_Item_Cursor.force_loc(UICursor.target_loc); }
public SettingsWindow(Vector2 loc, int width, ISettings settings) : base() { Settings = settings; Rows = ROWS; List <string> strs = new List <string>(); foreach (string label in Settings.SettingLabels) { strs.Add(label); } loc.Y = Math.Min(loc.Y, (Config.WINDOW_HEIGHT - 16) - (ROWS + 1) * 16); SelectedSettingCursor = new Hand_Cursor(); SelectedSettingCursor.draw_offset = new Vector2(-16, 0); initialize(loc, width, strs); }
protected virtual void initialize_sprites() { // Window Window_Img = new Prepartions_Item_Window(false); Window_Img.width = this.Width; Window_Img.height = this.Height; refresh_nodes(); Rows = (int)Math.Ceiling(ActorList.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; } // Cursor Selected_Cursor = new Hand_Cursor(); Selected_Cursor.loc = cursor_loc() + new Vector2(8, 4); Selected_Cursor.tint = new Color(192, 192, 192, 255); }
protected virtual void initialize(Vector2 loc, int width, List <string> strs) { initialize_window(); Grey_Cursor = new Hand_Cursor(); Grey_Cursor.tint = new Color(192, 192, 192, 255); Grey_Cursor.draw_offset = new Vector2(-16, 0); //Hand_Texture = Global.Content.Load<Texture2D>(@"Graphics/Windowskins/Menu_Hand"); this.loc = loc; Width = width; if (Window_Img != null) { Window_Img.width = Width; } if (Glowing_Line == null) { Glowing_Line = new Unit_Line_Cursor(column_width); Glowing_Line.color_override = Window_Img.color_override; } set_items(strs); update(false); }