Ejemplo n.º 1
0
 protected void CreateCancelButton(IHasCancelButton menu)
 {
     if (menu != null && menu.HasCancelButton)
     {
         CreateCancelButton(
             (int)menu.CancelButtonLoc.X,
             Config.MAPCOMMAND_WINDOW_DEPTH);
     }
 }
Ejemplo n.º 2
0
        private void OpenSettingsMenu(Tactile.Options.ISettings settings, IHasCancelButton parent)
        {
            SettingsMenu settingsMenu;

            settingsMenu              = new SettingsMenu(settings, parent);
            settingsMenu.OpenSubMenu += SettingsMenu_OpenSubMenu;
            settingsMenu.Canceled    += settingsMenu_Canceled;
            AddMenu(settingsMenu);
        }
Ejemplo n.º 3
0
 public ItemRepairMenu(
     int actorId,
     int selectedItemIndex,
     Window_Command_Item_Preparations_Repair window,
     IHasCancelButton menu = null)
     : base(window, menu)
 {
     ActorId           = actorId;
     SelectedItemIndex = selectedItemIndex;
 }
Ejemplo n.º 4
0
        protected virtual void CreateCancelButton(IHasCancelButton menu)
        {
            int position = this.DefaultCancelPosition;

            if (menu != null && menu.HasCancelButton)
            {
                position = (int)menu.CancelButtonLoc.X;
            }

            CreateCancelButton(
                position,
                Config.MAPCOMMAND_WINDOW_DEPTH);
        }
        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);
        }
Ejemplo n.º 6
0
 private void CreateCancelButton(IHasCancelButton menu = null)
 {
     if (menu != null && menu.HasCancelButton)
     {
         CreateCancelButton(
             (int)menu.CancelButtonLoc.X,
             Config.MAPCOMMAND_WINDOW_DEPTH);
     }
     else
     {
         CreateCancelButton(
             Config.WINDOW_WIDTH - (32 + 48),
             Config.MAPCOMMAND_WINDOW_DEPTH);
     }
 }
Ejemplo n.º 7
0
 private void CreateCancelButton(IHasCancelButton menu = null)
 {
     if (menu != null && menu.HasCancelButton)
     {
         CreateCancelButton(
             (int)menu.CancelButtonLoc.X,
             Config.MAPCOMMAND_WINDOW_DEPTH);
     }
     else
     {
         CreateCancelButton(
             Global.player.is_on_left() ? Config.WINDOW_WIDTH - (32 + 48) : 32,
             Config.MAPCOMMAND_WINDOW_DEPTH);
     }
 }
Ejemplo n.º 8
0
        public ItemUseMenu(int actorId, Vector2 loc, IHasCancelButton menu = null) : base(null, menu)
        {
            ActorId = actorId;

            CreateItemWindow(actorId, loc);
            CreateStatsWindow();

            Stats_Info_Bg         = new Sprite();
            Stats_Info_Bg.texture = Global.Content.Load <Texture2D>(
                @"Graphics\White_Square");
            Stats_Info_Bg.dest_rect = new Rectangle(Config.WINDOW_WIDTH - 160, Config.WINDOW_HEIGHT - 58, 160, 52);
            Stats_Info_Bg.tint      = new Color(0f, 0f, 0f, 0.5f);

            RButton = Button_Description.button(Inputs.R,
                                                Global.Content.Load <Texture2D>(
                                                    @"Graphics\Windowskins\Preparations_Screen"),
                                                new Rectangle(126, 122, 24, 16));
            RButton.loc          = new Vector2(216, 172) + new Vector2(60, -16);
            RButton.offset       = new Vector2(-1, -1);
            RButton.stereoscopic = Config.PREPITEM_FUNDS_DEPTH;
        }
Ejemplo n.º 9
0
 public ItemOptionsMenu(Window_Item_Options window, IHasCancelButton menu = null)
     : base(window, menu)
 {
 }
Ejemplo n.º 10
0
 public StandardMenu(IHasCancelButton menu = null)
 {
     CreateCancelButton(menu);
 }
Ejemplo n.º 11
0
 protected override void CreateCancelButton(IHasCancelButton menu)
 {
 }
Ejemplo n.º 12
0
 public TradeMenu(Window_Trade window, IHasCancelButton menu = null)
 {
     TradeWindow = window;
     CreateCancelButton(menu);
 }
Ejemplo n.º 13
0
 protected TargetMenu(Window_Target <T> window, IHasCancelButton menu = null)
 {
     Window = window;
     CreateCancelButton(menu);
 }
Ejemplo n.º 14
0
 public LocationTargetMenu(Window_Target_Location window, IHasCancelButton menu = null)
     : base(window, menu)
 {
 }
Ejemplo n.º 15
0
        internal PreviousChapterSelectionMenu(
            Vector2 centerLoc,
            string chapterId,
            WorldmapMenuData menuData,
            IHasCancelButton menu = null)
        {
            ChapterId              = chapterId;
            ProgressionIds         = menuData.ValidPreviousChapters.Keys.ToList();
            ValidPreviousChapters  = menuData.ValidPreviousChapters;
            PreviousChapterIndices = menuData.UsablePreviousChapterIndices;

            Window        = new SystemWindowHeadered();
            Window.width  = 104;
            Window.height = 32 + 16 * (ValidPreviousChapters.Count + 1) + 4;
            Window.offset = new Vector2(0, 16);

            Loc = centerLoc -
                  (new Vector2(Window.width, Window.height) - Window.offset) / 2;

            Header             = new TextSprite();
            Header.draw_offset = new Vector2(8, -8);
            Header.SetFont(Config.UI_FONT, Global.Content, "Yellow");
            Header.text = ValidPreviousChapters.Count > 1 ? "Previous Chapters" : "Previous Chapter";

            Divider             = new StatusWindowDivider();
            Divider.draw_offset = new Vector2(8, Window.height - 44);
            Divider.SetWidth(Window.width - 16);

            LeftArrows  = new Dictionary <Page_Arrow, int>();
            RightArrows = new Dictionary <Page_Arrow, int>();

            // Center, then adjust left to account for map sprite
            int x = ((Window.width / 2) / 8 * 8) - 16;
            List <CommandUINode> nodes = new List <CommandUINode>();

            for (int i = 0; i < ProgressionIds.Count; i++)
            {
                int y = i * 16 + 8;

                var text = new TextSprite();
                text.SetFont(Config.UI_FONT, Global.Content, "White");
                text.text = chapter(i).Id;
                var node = new MapSpriteUINode("", text, 56);
                refresh_map_sprite(node, i);
                node.loc = new Vector2(x, y);
                nodes.Add(node);

                // Add arrows for this set of chapters,
                // if there's more than one choice
                if (chapter_list(i).Count > 1)
                {
                    var left_arrow = new Page_Arrow();
                    left_arrow.loc           = new Vector2(8, y);
                    left_arrow.ArrowClicked += LeftArrow_ArrowClicked;
                    LeftArrows.Add(left_arrow, i);

                    var right_arrow = new Page_Arrow();
                    right_arrow.loc           = new Vector2(Window.width - 8, y);
                    right_arrow.mirrored      = true;
                    right_arrow.ArrowClicked += RightArrow_ArrowClicked;
                    RightArrows.Add(right_arrow, i);
                }
            }

            // Add confirm choice
            var confirmText = new TextSprite(
                Config.UI_FONT, Global.Content, "White",
                new Vector2(4, 0),
                "Confirm");
            var confirm = new TextUINode("", confirmText, 56);

            confirm.loc = new Vector2(x, nodes.Count * 16 + 8 + 4);
            nodes.Add(confirm);

            Items = new UINodeSet <CommandUINode>(nodes);
            Items.WrapVerticalSameColumn    = true;
            Items.CursorMoveSound           = System_Sounds.Menu_Move1;
            Items.HorizontalCursorMoveSound = System_Sounds.Menu_Move2;

            Items.AngleMultiplier   = 2f;
            Items.TangentDirections = new List <CardinalDirections> {
                CardinalDirections.Left, CardinalDirections.Right
            };
            Items.refresh_destinations();

            Items.set_active_node(confirm);

            UICursor             = new UICursor <CommandUINode>(Items);
            UICursor.draw_offset = new Vector2(-12, 0);
            //UICursor.ratio = new int[] { 1, 3 }; //Debug

            CreateCancelButton(menu);
        }
Ejemplo n.º 16
0
 public DiscardMenu(Window_Command_Item_Discard discardWindow, IHasCancelButton menu = null) : base(discardWindow, menu)
 {
 }
Ejemplo n.º 17
0
 public SettingsMenu(ISettings settings, IHasCancelButton menu = null)
     : base()
 {
     OpenWindow(settings);
     CreateCancelButton(menu);
 }
Ejemplo n.º 18
0
 public AttackItemMenu(Window_Command_Item_Attack window, IHasCancelButton menu = null)
     : base(window, menu)
 {
 }
Ejemplo n.º 19
0
 public UnitTargetMenu(Window_Target_Unit window, IHasCancelButton menu = null)
     : base(window, menu)
 {
 }
Ejemplo n.º 20
0
 public ItemMenu(Window_Command_Item window, IHasCancelButton menu = null)
     : base(window, menu)
 {
     HideParent(true);
 }
Ejemplo n.º 21
0
 public StealMenu(Window_Steal stealWindow, IHasCancelButton menu = null) : base(stealWindow, menu)
 {
 }
Ejemplo n.º 22
0
        public CommandMenu(Window_Command window, IHasCancelButton menu = null)
        {
            Window = window;

            CreateCancelButton(menu);
        }