コード例 #1
0
 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.");
 }
コード例 #2
0
        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);
        }