예제 #1
0
 protected override void InternalInit()
 {
     _screen = MenuScreen.VictoryScreen;
 }
예제 #2
0
        public static void Init()
        {
            MainScreen           = new MenuScreen(4, MainOptions.Instance);
            MainScreen._menus[0] = MainStatus.Instance;
            MainScreen._menus[1] = MainOptions.Instance;
            MainScreen._menus[2] = MainTime.Instance;
            MainScreen._menus[3] = MainLocation.Instance;

            ItemScreen           = new MenuScreen(5, ItemList.Instance);
            ItemScreen._menus[0] = ItemTop.Instance;
            ItemScreen._menus[1] = ItemStats.Instance;
            ItemScreen._menus[2] = ItemList.Instance;
            ItemScreen._menus[3] = ItemInfo.Instance;
            ItemScreen._menus[4] = ItemLabel.Instance;

            EquipScreen           = new MenuScreen(6, EquipTop.Instance);
            EquipScreen._menus[0] = EquipTop.Instance;
            EquipScreen._menus[1] = EquipList.Instance;
            EquipScreen._menus[2] = EquipStats.Instance;
            EquipScreen._menus[3] = EquipSelected.Instance;
            EquipScreen._menus[4] = EquipInfo.Instance;
            EquipScreen._menus[5] = EquipLabel.Instance;

            MateriaScreen           = new MenuScreen(7, MateriaTop.Instance);
            MateriaScreen._menus[0] = MateriaTop.Instance;
            MateriaScreen._menus[1] = MateriaStats.Instance;
            MateriaScreen._menus[2] = MateriaList.Instance;
            MateriaScreen._menus[3] = MateriaInfo.Instance;
            MateriaScreen._menus[4] = MateriaLabel.Instance;
            MateriaScreen._menus[5] = MateriaArrange.Instance;
            MateriaScreen._menus[6] = MateriaPrompt.Instance;

            StatusScreen           = new MenuScreen(4, StatusLabel.Instance);
            StatusScreen._menus[0] = StatusOne.Instance;
            StatusScreen._menus[1] = StatusTwo.Instance;
            StatusScreen._menus[2] = StatusThree.Instance;
            StatusScreen._menus[3] = StatusLabel.Instance;

            PhsScreen           = new MenuScreen(5, PHSStats.Instance);
            PhsScreen._menus[0] = PHSTop.Instance;
            PhsScreen._menus[1] = PHSStats.Instance;
            PhsScreen._menus[2] = PHSList.Instance;
            PhsScreen._menus[3] = PHSInfo.Instance;
            PhsScreen._menus[4] = PHSLabel.Instance;

            VictoryScreen           = new MenuScreen(6, VictoryLabel.Instance);
            VictoryScreen._menus[0] = VictoryLabel.Instance;
            VictoryScreen._menus[1] = VictoryEXP.Instance;
            VictoryScreen._menus[2] = VictoryAP.Instance;
            VictoryScreen._menus[3] = VictoryTop.Instance;
            VictoryScreen._menus[4] = VictoryMiddle.Instance;
            VictoryScreen._menus[5] = VictoryBottom.Instance;

            HoardScreen           = new MenuScreen(5, HoardLabel.Instance);
            HoardScreen._menus[0] = HoardLabel.Instance;
            HoardScreen._menus[1] = HoardGilLeft.Instance;
            HoardScreen._menus[2] = HoardGilRight.Instance;
            HoardScreen._menus[3] = HoardItemLeft.Instance;
            HoardScreen._menus[4] = HoardItemRight.Instance;

            Item.Target = Globals.Party[0];

            Menu.SetSelection();
        }
예제 #3
0
 public void ChangeScreen(MenuScreen el)
 {
     _layer.Control.SetNotControl();
     _layer = el;
     el.ChangeToDefaultControl();
 }
예제 #4
0
        private static void Init()
        {
            _random = new Random();

            InitializeLua();

            Application.Init();
            if (!GLib.Thread.Supported)
            {
                GLib.Thread.Init();
            }
            Gdk.Threads.Init();

            Gdk.Threads.Enter();

            _window = new Gtk.Window(Globals.WINDOW_NAME);
            _window.SetDefaultSize(Globals.WIDTH, Globals.HEIGHT);
            _window.AppPaintable     = true;
            _window.DoubleBuffered   = false;
            _window.DeleteEvent     += OnWinDelete;
            _window.KeyPressEvent   += OnKeyPress;
            _window.KeyReleaseEvent += OnKeyRelease;
            //_window.ConfigureEvent += OnWindowConfigure;

            DrawingArea da = new DrawingArea();

            da.ExposeEvent += OnExposed;

            Gdk.Color col = new Gdk.Color(0, 0, 0);
            _window.ModifyBg(StateType.Normal, col);
            da.ModifyBg(StateType.Normal, col);

            GLib.Timeout.Add(33, new GLib.TimeoutHandler(Graphics.TimedDraw));

            _window.Add(da);
            _window.ShowAll();

            Gdk.Threads.Leave();

            Graphics.Init();    // depends on _window being initialized
            Item.Init();
            Enemy.Init();       // depends on Globals ctor
            Weapon.Init();      // depends on Globals ctor
            Armor.Init();       // depends on Globals ctor
            Accessory.Init();   // depends on Globals ctor
            Materia.Init();     // depends on Globals ctor
            Character.Init();   // depends on [Weapons|Armor|Materia].Init()
            Globals.Init();     // depends on Character.Init()
            MenuScreen.Init();  // depends on Globals.Init()
            Inventory.Init();   // depends on a whole lot of things
            Spell.Init();       // depends on Globals ctor
            Materiatory.Init(); // depends on Materia.Init()

            int time = Int32.Parse(Globals.SaveGame.SelectSingleNode("//time").InnerText);

            _clock = new Clock(time); // depends on Globals ctor

            // Go to Main Menu
            _state = MainMenu;

            // Go to new Battle
            //GoToBattleState();

            // Go to Post-Battle
            //List<IItem> i = new List<IItem>();
            //i.Add(Item.ItemTable["powersource"]);
            //i.Add(Item.ItemTable["powersource"]);
            //i.Add(Item.ItemTable["potion"]);
            //PostBattle = new PostBattleState(234, 12, 1200, i);
            //_state = PostBattle;

            _state.Init();

            if (Globals.Party[0] == null && Globals.Party[1] == null && Globals.Party[2] == null)
            {
                throw new GamedataException("No character in party!");
            }

            // Level-up demo
            //using (StreamWriter w = new StreamWriter(@"c:\scripts\test.txt"))
            //{
            //    while (Character.Cloud.Level < 98)
            //    {
            //        Character.Cloud.GainExperience(Character.Cloud.ToNextLevel + 10);
            //        w.WriteLine(Character.Cloud.ToString());
            //    }
            //    w.Flush();
            //}
        }
예제 #5
0
 protected override void InternalInit()
 {
     _layer = MenuScreen.MainScreen;
     _layer.Control.SetAsControl();
 }