Example #1
0
        public LocationScene(Module App)
            : base(App)
        {
            Size = app.Engine.GameResolution;

            view          = new MapView(this, App);
            view.Position = new Vector2(16, 0);
            view.Size     = new Vector2(Size.x - 32, Size.y - 40);
            //view.Position = new Vector2(0, 0);
            //view.Size = new Vector2(Size.x, Size.y - 16);
            view.MouseClickEvent += OnMouseClickMap;
            view.Overlays.Add(new Maps.MapViewOverlayDroppedItems(App));
            view.Overlays.Add(charOverlay = new Maps.MapViewOverlayCharacters(App));
            view.Overlays.Add(hoverInfo   = new Maps.MapViewOverlayHoverText(App));
            view.ClickObject += new EventHandler <ObjectArgs>(view_ClickObject);
            view.Scroll      += new EventHandler <MapScrollArgs>(view_Scroll);
            Windows          += view;

            menu        = new MenuWindow(App);
            menu.Layer += 50;
            menu.Hide();
            Windows += menu;

            cursorAni            = new Image(App);
            cursorAni.Background = "[email protected]?10-13";
            cursorAni.Background.Animation.Progressive = false;
            cursorAni.Layer += 59;
            Windows         += cursorAni;

            gui        = new MapGuiWindow(App);
            gui.Layer += 60;
            Windows   += gui;

            dialog          = new DialogWindow(app);
            dialog.Position = new Vector2(33, 20);
            dialog.Hide();
            dialog.Layer      += 55;
            dialog.WindowHide += new EventHandler(dialog_WindowHide);
            dialog.WindowShow += new EventHandler(dialog_WindowShow);
            Windows           += dialog;
        }
Example #2
0
        public MapScene(Module App)
            : base(App)
        {
            Size = app.Engine.GameResolution;

            view          = new ClassicMapView(this, App);
            view.Position = new Vector2(16, 0);
            view.Size     = new Vector2(Size.x - 32, Size.y - 40);
            //view.Position = new Vector2(0, 0);
            //view.Size = new Vector2(Size.x, Size.y - 16);
            view.Overlays.Add(new Maps.MapViewOverlayFlags(app));
            view.Overlays.Add(new Maps.MapViewOverlayPlayer(app));
            view.Overlays.Add(new Maps.MapViewOverlayHoverText(app));
            view.Scroll += new EventHandler <MapScrollArgs>(view_Scroll);
            Windows     += view;

            menu        = new MenuWindow(App);
            menu.Layer += 50;
            menu.AddLine("@burn?351", (CommandHandler)OnMenuInfo);
            menu.AddLine("@burn?367", (CommandHandler)OnMenuInventory);
            menu.AddLine("@burn?359", (CommandHandler)OnMenuStatistics);
            menu.AddLine("@burn?361", (CommandHandler)OnMenuOptions);
            menu.AddLine("@burn?357", (CommandHandler)OnMenuTurn);
            menu.Hide();
            Windows += menu;

            cursorAni            = new Image(App);
            cursorAni.Background = "[email protected]?24-27";
            cursorAni.Background.Animation.Progressive = false;
            cursorAni.Layer += 59;
            Windows         += cursorAni;

            gui        = new MapGuiWindow(App);
            gui.Layer += 60;
            Windows   += gui;

            BurntimeClassic classic = app as BurntimeClassic;

            debugNoTravel = classic.Settings["debug"].GetBool("no_travel") && classic.Settings["debug"].GetBool("enable_cheats");
        }