public SupportViewerMenu() : base() { // Window Window = new WindowSupportViewerActorList(); // Background Background = new Menu_Background(); Background.texture = Global.Content.Load <Texture2D>( @"Graphics\Pictures\Preparation_Background"); (Background as Menu_Background).vel = new Vector2(0, -1 / 3f); (Background as Menu_Background).tile = new Vector2(1, 2); Background.stereoscopic = Config.MAPMENU_BG_DEPTH; // Face Window FaceWindow = new Prepartions_Item_Window(false); FaceWindow.width = 128; FaceWindow.height = 72; FaceWindow.loc = new Vector2(24, 8); FaceWindow.color_override = 0; // Face AuguryFace = new Face_Sprite(AUGURY_FACE); AuguryFace.convo_placement_offset = true; AuguryFace.loc = FaceWindow.loc + new Vector2( FaceWindow.width / 2, FaceWindow.height + FACE_CLIP_BOTTOM - 2); AuguryFace.mirrored = true; AuguryFace.expression = 1; AuguryFace.blink(3); AuguryFace.phase_in(); // Text Box TextBox = new Text_Window(152, 48); TextBox.loc = FaceWindow.loc + new Vector2(112, 16); TextBox.SetSpeakerArrow(24, SpeakerArrowSide.Left); TextBox.opacity = 255; TextBox.text_set("Select whose conversation\nyou want to read."); }
protected override void set_face(Game_Actor actor) { Face = new Face_Sprite(actor.face_name, true); if (actor.generic_face) { Face.recolor_country(actor.name_full); } Face.expression = Face.status_frame; Face.phase_in(); Face.tint = new Color(128, 128, 128, 128); Face.idle = true; }
protected virtual void set_face(Game_Actor actor) { Face = new Face_Sprite(actor.face_name, true); if (actor.generic_face) { Face.recolor_country(actor.name_full); } Face.convo_placement_offset = true; Face.expression = Face.status_frame; Face.phase_in(); Face.loc = new Vector2(244, Config.WINDOW_HEIGHT - 76); Face.loc = new Vector2(60, 4); }
public SupportViewerActorMenu(int actorId, IHasCancelButton menu) : base(menu) { ActorId = actorId; Window = new WindowCommandSupportViewerActor( ActorId, new Vector2(Config.WINDOW_WIDTH - 152, 16)); // Background Background = new Menu_Background(); Background.texture = Global.Content.Load <Texture2D>( @"Graphics\Pictures\Preparation_Background"); (Background as Menu_Background).vel = new Vector2(0, -1 / 3f); (Background as Menu_Background).tile = new Vector2(1, 2); Background.stereoscopic = Config.MAPMENU_BG_DEPTH; // Face Window FaceWindow = new Prepartions_Item_Window(false); FaceWindow.width = 128; FaceWindow.height = 96; FaceWindow.loc = new Vector2(24, 16); FaceWindow.color_override = 0; // Face string filename = ""; if (Global.data_actors.ContainsKey(ActorId)) { filename = Global.data_actors[ActorId].Name; } Face = new Face_Sprite(filename); Face.convo_placement_offset = true; Face.loc = FaceWindow.loc + new Vector2( FaceWindow.width / 2, FaceWindow.height + FACE_CLIP_BOTTOM - 2); Face.mirrored = true; if (Global.face_data.ContainsKey(filename)) { Face.expression = Global.face_data[filename].StatusFrame; } Face.blink(3); Face.phase_in(); // Name Banner NameBanner = new Sprite( Global.Content.Load <Texture2D>(@"Graphics/Pictures/Portrait_bg")); NameBanner.src_rect = new Rectangle(0, 114 + 25 * 0, 93, 25); NameBanner.loc = FaceWindow.loc + new Vector2(FaceWindow.width / 2 - 48, FaceWindow.height); NameBanner.draw_offset = new Vector2(2, 0); // Name Name = new TextSprite( Config.UI_FONT, Global.Content, "White", NameBanner.loc + new Vector2(48, 4), Global.data_actors[ActorId].Name.Split(Global.ActorConfig.ActorNameDelimiter)[0]); Name.offset.X = (int)System.Math.Ceiling(Name.text_width / 2f); }
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); }
private void refresh_face() { if (this.index < SupplyList.Count && !SupplyList[this.index].Convoy) { Game_Actor actor = Global.game_actors[SupplyList[this.index].ActorId]; Face = new Face_Sprite(actor.face_name, true); if (actor.generic_face) { Face.recolor_country(actor.name_full); } Face.expression = Face.status_frame; Face.phase_in(); Face.tint = new Color(128, 128, 128, 128); Face.idle = true; Face.loc = new Vector2(Width / 2, Rows * 16 + 8 + 2); Face.mirrored = false; } else { Face = null; } }
protected override void initialize_sprites() { base.initialize_sprites(); // Face Face = new Face_Sprite(this.actor.face_name, true); if (this.actor.generic_face) { Face.recolor_country(this.actor.name_full); } Face.expression = Face.status_frame; Face.phase_in(); Face.loc = this.item_window_loc + new Vector2(144 / 2, 12 + (int)Math.Max(0, ((Face.src_rect.Height - Face.eyes_offset.Y) - 48) * 0.75f)); Face.stereoscopic = Config.PREPTRADE_NAMES_DEPTH; Face.mirrored = true; Nameplate = new Sprite(); Nameplate.texture = Global.Content.Load <Texture2D>(@"Graphics/Windowskins/Preparations_Screen"); Nameplate.loc = new Vector2(0, 0); Nameplate.src_rect = new Rectangle(0, 40, 56, 24); Nameplate.offset = new Vector2(56, 1); Nameplate.tint = new Color(224, 224, 224, 192); Nameplate.mirrored = true; Nameplate.stereoscopic = Config.PREPTRADE_NAMES_DEPTH; Name = new TextSprite(); Name.loc = Nameplate.loc + new Vector2(24, 0); Name.SetFont(Config.UI_FONT, Global.Content, "White"); Name.text = this.actor.name; Name.offset = new Vector2(Font_Data.text_width(Name.text) / 2, 0); Name.stereoscopic = Config.PREPTRADE_NAMES_DEPTH; Owner = new TextSprite(); Owner.loc = Stock_Banner.loc + new Vector2(8, 0); Owner.SetFont(Config.UI_FONT); Owner.SetTextFontColor(0, "White"); Owner.text = "Owner: "; Owner.stereoscopic = Config.PREPTRADE_NAMES_DEPTH; }