Example #1
0
        public InventoryScene(Module app)
            : base(app)
        {
            Background = "hint2.pac";
            Size       = new Vector2(320, 200);
            Position   = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;

            inventory                      = new InventoryWindow(app, InventorySide.Left);
            inventory.Position             = new Vector2(2, 5);
            inventory.LeftClickItemEvent  += OnLeftClickItemInventory;
            inventory.RightClickItemEvent += OnRightClickItemInventory;
            Windows += inventory;

            Button button = new Button(app);

            button.Position  = new Vector2(25, 183);
            button.Text      = app.ResourceManager.GetString("burn?354");
            button.Font      = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.HoverFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(144, 160, 212));
            button.Command  += OnButtonExit;
            button.SetTextOnly();
            Windows += button;

            waterSourceFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(72, 72, 76));

            dialog          = new DialogWindow(app);
            dialog.Position = new Vector2(33, 20);
            dialog.Hide();
            dialog.Layer      += 55;
            dialog.WindowHide += new EventHandler(dialog_WindowHide);
            Windows           += dialog;
        }
Example #2
0
        public DeathScene(Module app)
            : base(app)
        {
            Background            = "film_00.pac";
            Music                 = "09_MUS 09_HSC.ogg";
            CaptureAllMouseClicks = true;
            Position              = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;

            Image ani = new Image(app);

            ani.Background = "film_00.ani?0-10?p";
            ani.Position   = new Vector2(16, 68);
            Windows       += ani;
            ani            = new Image(app);
            ani.Background = "film_00.ani?11-21?p";
            ani.Position   = new Vector2(176, 86);
            Windows       += ani;
            ani            = new Image(app);
            ani.Background = "film_00.ani?22-32?p";
            ani.Position   = new Vector2(264, 77);
            Windows       += ani;

            bird            = new Image(app);
            bird.Background = "film_00.ani?33-72?p";
            bird.Position   = new Vector2(166, 20);
            bird.Background.Animation.Endless = false;
            bird.Background.Animation.Delay   = 8;
            Windows += bird;

            font = new GuiFont(BurntimeClassic.FontName, new PixelColor(72, 72, 76));
        }
Example #3
0
        public MapGuiWindow(Module App)
            : base(App)
        {
            Size = app.Engine.GameResolution;

            font        = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            playerColor = new GuiFont(BurntimeClassic.FontName, PixelColor.White);

            Image image = new Image(App);

            image.Background = "munt.raw?1";
            image.Position   = new Vector2(Size.x / 2 - 60, Size.y - 40);
            Windows         += image;

            image            = new Image(App);
            image.Background = "munt.raw?22";
            image.Position   = new Vector2(Size.x / 2 - 42, 0);
            Windows         += image;

            face             = new FaceWindow(App);
            face.Position    = new Vector2(Size.x / 2 - 31, Size.y - 56);
            face.FaceID      = 0;
            face.DisplayOnly = true;
            face.Layer++;
            Windows += face;
        }
Example #4
0
 public WaitScene(Module App)
     : base(App)
 {
     Size     = new Burntime.Platform.Vector2(320, 200);
     Position = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;
     //Background = new SpriteImage(App, "blz.pac");
     font = new GuiFont(BurntimeClassic.FontName, new PixelColor(255, 255, 255));
 }
Example #5
0
 public ItemWindow(Module App)
     : base(App)
 {
     Size         = new Vector2(32, 32);
     font         = new GuiFont(BurntimeClassic.FontName, new PixelColor(240, 64, 56));
     font.Borders = TextBorders.Screen;
     text         = null;
 }
Example #6
0
 public StatisticsScene(Module App)
     : base(App)
 {
     Background            = "blz.pac";
     Music                 = "17_MUS 17_HSC.ogg";
     Position              = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;
     font                  = new GuiFont(BurntimeClassic.FontName, new PixelColor(212, 212, 212), new PixelColor(92, 92, 96));
     CaptureAllMouseClicks = true;
 }
Example #7
0
        public InventoryWindow(Module App, InventorySide Side)
            : base(App)
        {
            side = (Side == InventorySide.Right);

            back = side ? "inv.raw?2" : "gfx/inventory_left.png";

            basePos = new Vector2(15, 15);
            Size    = new Vector2(back.Width, back.Height) + basePos;

            face             = new FaceWindow(App);
            face.Position    = side ? (basePos + new Vector2(67, 0)) : basePos;
            face.DisplayOnly = true;
            Windows         += face;

            grid = new ItemGridWindow(App);
            grid.LockPositions        = true;
            grid.Position             = new Vector2(side ? 9 : 19, side ? 72 : 83) + basePos;
            grid.Spacing              = new Vector2(4, side ? 16 : 5);
            grid.Grid                 = new Vector2(3, 2);
            grid.LeftClickItemEvent  += OnLeftClickItem;
            grid.RightClickItemEvent += OnRightClickItem;
            Windows += grid;

            font             = new GuiFont(BurntimeClassic.FontName, new PixelColor(128, 136, 192));
            font.Borders     = TextBorders.Screen;
            nameFont         = new GuiFont(BurntimeClassic.FontName, new PixelColor(240, 64, 56));
            nameFont.Borders = TextBorders.Screen;

            pageName = "";

            for (int i = 0; i < 5; i++)
            {
                pageButtons[i]       = new Button(App);
                pageButtons[i].Image = "munt.raw?" + (5 + i);
                if (side)
                {
                    pageButtons[i].Position = basePos + new Vector2(120 + 3 * i, 142 - 18 * i);
                }
                else
                {
                    pageButtons[i].Position = basePos + new Vector2(-3 * i, 142 - 18 * i);
                }
                pageButtons[i].Hide();
                pageButtons[i].Command += new CommandHandler(OnPage, i);
                pageIndices[i]          = i;
                Windows += pageButtons[i];
            }

            pages           = new List <InventoryPage>();
            activePageIndex = 0;
            activePage      = null;
        }
Example #8
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="app">game module</param>
        public ProgressWindow(Module app, string background, string foreground)
            : base(app)
        {
            this.Background = background;

            Image image = new Image(app, foreground);

            image.Layer += 2;
            Windows     += image;

            font = new GuiFont(BurntimeClassic.FontName, PixelColor.White);
        }
Example #9
0
        public MapView(IMapEntranceHandler Handler, Module App)
            : base(App)
        {
            enabled             = true;
            handler             = Handler;
            CaptureAllMouseMove = true;

            font = new GuiFont(BurntimeClassic.FontName, new PixelColor(212, 212, 212));

            BurntimeClassic classic = app as BurntimeClassic;

            DebugView = classic.Settings["debug"].GetBool("show_routes") && classic.Settings["debug"].GetBool("enable_cheats");
        }
Example #10
0
        public DoctorScene(Module app)
            : base(app)
        {
            Background = "arzt.pac";
            Music      = "03_MUS 03_HSC.ogg";
            Position   = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;

            Image ani = new Image(app);

            ani.Position   = new Vector2(211, 65);
            ani.Background = "arzt.ani??p";
            ani.Background.Animation.Speed          = 6.5f;
            ani.Background.Animation.IntervalMargin = 4;
            ani.Background.Animation.Progressive    = false;
            Windows += ani;

            inventory                     = new InventoryWindow(app, InventorySide.Left);
            inventory.Position            = new Vector2(2, 5);
            inventory.LeftClickItemEvent += OnLeftClickItemInventory;
            Windows += inventory;

            Button button = new Button(app);

            button.Position  = new Vector2(25, 183);
            button.Text      = app.ResourceManager.GetString("burn?354");
            button.Font      = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.HoverFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(144, 160, 212));
            button.Command  += OnButtonExit;
            button.SetTextOnly();
            Windows += button;

            button           = new Button(app);
            button.Position  = new Vector2(116, 183);
            button.Text      = app.ResourceManager.GetString("burn?369");
            button.Font      = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.HoverFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(144, 160, 212));
            button.Command  += OnButtonHeal;
            button.SetTextOnly();
            Windows += button;

            grid                     = new ItemGridWindow(app);
            grid.Position            = new Vector2(160, 165);
            grid.Spacing             = new Vector2(4, 4);
            grid.Grid                = new Vector2(4, 1);
            grid.LeftClickItemEvent += OnLeftClickItemGrid;
            Windows                 += grid;

            font = new GuiFont(BurntimeClassic.FontName, new PixelColor(212, 212, 212));
        }
Example #11
0
        public DialogWindow(Module app)
            : base(app)
        {
            IsModal = true;
            Size    = FramePos + FrameSize;

            face             = new FaceWindow(app);
            face.DisplayOnly = true;
            Windows         += face;

            fontText    = new GuiFont(BurntimeClassic.FontName, new PixelColor(240, 164, 56));
            fontOptions = new GuiFont(BurntimeClassic.FontName, new PixelColor(108, 116, 168));
            fontChoice  = new GuiFont(BurntimeClassic.FontName, new PixelColor(240, 64, 56));

            CaptureAllMouseMove = true;
        }
Example #12
0
        public ExchangeWindow(Module App)
            : base(App)
        {
            Background = "inv.raw?1";

            grid                      = new ItemGridWindow(App);
            grid.Position             = new Vector2(8, 19);
            grid.Spacing              = new Vector2(4, 7);
            grid.Grid                 = new Vector2(3, 2);
            grid.LeftClickItemEvent  += OnLeftClickItem;
            grid.RightClickItemEvent += OnRightClickItem;
            Windows                  += grid;

            font         = new GuiFont(BurntimeClassic.FontName, new PixelColor(128, 136, 192));
            font.Borders = TextBorders.Screen;
        }
Example #13
0
        public void UpdatePlayer()
        {
            ClassicGame game = app.GameState as ClassicGame;

            if (game.World.ActivePlayer == -1)
            {
                face.FaceID = -1;
                name        = "";
                return;
            }

            Player player = game.World.Players[game.World.ActivePlayer];

            face.FaceID = player.FaceID;
            name        = player.Name;
            playerColor = new GuiFont(BurntimeClassic.FontName, player.Color);
        }
Example #14
0
        public MenuWindow(Module App)
            : base(App)
        {
            top    = "munt.raw?24";
            middle = "munt.raw?25";
            bottom = "munt.raw?26";

            list = new List <MenuItem>();

            font              = new GuiFont(BurntimeClassic.FontName, new PixelColor(108, 116, 168));
            font.Borders      = TextBorders.Screen;
            hoverFont         = new GuiFont(BurntimeClassic.FontName, new PixelColor(240, 64, 56));
            hoverFont.Borders = TextBorders.Screen;

            hover   = -1;
            IsModal = true;
            CaptureAllMouseClicks = true;
        }
Example #15
0
        public ChurchScene(Module app)
            : base(app)
        {
            Music    = "14_MUS 14_HSC.ogg";
            Position = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;

            Image ani = new Image(app);

            ani.Position   = new Vector2(200, 117);
            ani.Background = "film_08.ani??p";
            ani.Background.Animation.Speed          = 4.5f;
            ani.Background.Animation.IntervalMargin = 1.0f;
            ani.Background.Animation.Progressive    = false;
            Windows += ani;

            font = new GuiFont(BurntimeClassic.FontName, new PixelColor(72, 72, 76));

            CaptureAllMouseClicks = true;
        }
Example #16
0
        public RestaurantScene(Module app)
            : base(app)
        {
            Music    = "01_MUS 01_HSC.ogg";
            Position = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;

            BurntimeClassic classic = app as BurntimeClassic;

            inventory                     = new InventoryWindow(app, InventorySide.Left);
            inventory.Position            = new Vector2(2, 5);
            inventory.LeftClickItemEvent += OnLeftClickItemInventory;
            Windows += inventory;

            Button button = new Button(app);

            button.Position  = new Vector2(25, 183);
            button.Text      = app.ResourceManager.GetString("burn?354");
            button.Font      = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.HoverFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(144, 160, 212));
            button.Command  += OnButtonExit;
            button.SetTextOnly();
            Windows += button;

            button           = new Button(app);
            button.Position  = new Vector2(116, 183);
            button.Text      = app.ResourceManager.GetString("burn?415");
            button.Font      = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.HoverFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(144, 160, 212));
            button.Command  += OnButtonEat;
            button.SetTextOnly();
            Windows += button;

            grid                     = new ItemGridWindow(app);
            grid.Position            = new Vector2(160, 165);
            grid.Spacing             = new Vector2(4, 4);
            grid.Grid                = new Vector2(4, 1);
            grid.LeftClickItemEvent += OnLeftClickItemGrid;
            Windows                 += grid;

            font = new GuiFont(BurntimeClassic.FontName, new PixelColor(212, 212, 212));
        }
Example #17
0
        public override void OnRender(RenderTarget target)
        {
            target.DrawSprite(Vector2.Zero, top);

            for (int i = 0; i < list.Count; i++)
            {
                int itemx = 0;
                int itemy = 4 + 11 * i;
                int textx = 34 - font.GetWidth(list[i].Text) / 2;
                int texty = itemy + 2;

                target.DrawSprite(new Vector2(itemx, itemy), middle);
                target.Layer++;

                GuiFont f = (hover == i) ? hoverFont : font;
                f.DrawText(target, new Vector2(textx, texty), list[i].Text, TextAlignment.Left, VerticalTextAlignment.Top);
                target.Layer--;
            }

            target.DrawSprite(new Vector2(0, top.Height + middle.Height * list.Count), bottom);
        }
Example #18
0
        public void UpdatePlayer()
        {
            ClassicGame game = app.GameState as ClassicGame;

            if (game.World.ActivePlayer == -1)
            {
                nameField.Text      = "";
                nameField.Progress  = 0;
                foodField.Text      = "";
                foodField.Progress  = 0;
                waterField.Text     = "";
                waterField.Progress = 0;
                player = null;
                return;
            }

            player = game.World.Players[game.World.ActivePlayer];

            nameField.Text  = player.Name;
            nameField.Color = player.Color;
            playerColor     = new GuiFont(BurntimeClassic.FontName, player.Color);
        }
Example #19
0
        public VictoryScene(Module app)
            : base(app)
        {
            Background            = "film_01.pac";
            Music                 = "11_MUS 11_HSC.ogg";
            CaptureAllMouseClicks = true;
            Position              = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;

            Image ani = new Image(app);

            ani.Background = "film_01.ani?0-21?p";
            ani.Position   = new Vector2(170, 43);
            Windows       += ani;
            ani            = new Image(app);
            ani.Background = "film_01.ani?22-23?p";
            ani.Position   = new Vector2(33, 23);
            Windows       += ani;
            ani            = new Image(app);
            ani.Background = "film_01.ani?24-27?p";
            ani.Position   = new Vector2(126, 121);
            Windows       += ani;

            font = new GuiFont(BurntimeClassic.FontName, new PixelColor(72, 72, 76));
        }
Example #20
0
        public OptionsScene(Module App)
            : base(App)
        {
            Background = "opti.pac";
            Music      = "16_MUS 16_HSC.ogg";
            Position   = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;

            disabled = new GuiFont(BurntimeClassic.FontName, new PixelColor(100, 100, 100));
            red      = new GuiFont(BurntimeClassic.FontName, new PixelColor(164, 0, 0));
            hover    = new GuiFont(BurntimeClassic.FontName, new PixelColor(108, 116, 168));
            hoverRed = new GuiFont(BurntimeClassic.FontName, new PixelColor(240, 64, 56));
            green    = new GuiFont(BurntimeClassic.FontName, new PixelColor(0, 108, 0));

            Image image = new Image(App);

            image.Background = "opt.ani";
            image.Position   = new Vector2(0, 4);
            Windows         += image;

            // menu buttons
            Button button = new Button(App);

            button.Font      = red;
            button.HoverFont = hover;
            button.Text      = "@burn?388";
            button.Position  = new Vector2(212, 61);
            button.SetTextOnly();
            button.Command += app.SceneManager.PreviousScene;
            Windows        += button;
            button          = new Button(App);
            if (BurntimeClassic.Instance.DisableMusic)
            {
                button.Font = disabled;
                button.Text = "@burn?389";
            }
            else
            {
                button.Font      = red;
                button.HoverFont = hover;
                button.Text      = BurntimeClassic.Instance.MusicPlayback ? "@burn?389" : "@burn?424";
                button.Command  += OnButtonMusicSwitch;
            }
            button.Position = new Vector2(212, 81);
            button.SetTextOnly();
            music            = button;
            Windows         += button;
            button           = new Button(App);
            button.Font      = red;
            button.HoverFont = hover;
            button.Text      = "@burn?390";
            button.Position  = new Vector2(212, 102);
            button.SetTextOnly();
            button.Command += OnButtonRestart;
            Windows        += button;
            button          = new Button(App);
            button.Font     = disabled;
            button.Text     = "@burn?392";
            button.Position = new Vector2(212, 124);
            button.SetTextOnly();
            Windows         += button;
            button           = new Button(App);
            button.Font      = red;
            button.HoverFont = hover;
            button.Text      = "@burn?391";
            button.Position  = new Vector2(212, 145);
            button.SetTextOnly();
            button.Command += OnButtonExit;
            Windows        += button;

            // save buttons
            load           = new Button(App);
            load.Font      = hover;
            load.HoverFont = hoverRed;
            load.Text      = "@burn?382";
            load.Position  = new Vector2(40, 122);
            load.SetTextOnly();
            load.Command  += OnLoad;
            Windows       += load;
            save           = new Button(App);
            save.Font      = hover;
            save.HoverFont = hoverRed;
            save.Text      = "@burn?383";
            save.Position  = new Vector2(74, 122);
            save.SetTextOnly();
            save.Command    += OnSave;
            Windows         += save;
            delete           = new Button(App);
            delete.Font      = hover;
            delete.HoverFont = hoverRed;
            delete.Text      = "@burn?384";
            delete.Position  = new Vector2(126, 122);
            delete.SetTextOnly();
            delete.Command += OnDelete;
            Windows        += delete;

            // savegame name input
            input          = new SavegameInputWindow(App);
            input.Font     = hover;
            input.Position = new Vector2(40, 108);
            input.Size     = new Vector2(120, 10);
            Windows       += input;

            // radio cover
            button            = new Button(App);
            button.Image      = "opta.raw?0";
            button.HoverImage = "opta.raw?1";
            button.Position   = new Vector2(186, 51);
            button.Layer     += 2;
            Windows          += button;

            CreateSaveGameButtons();
        }
Example #21
0
        public PubScene(Module app)
            : base(app)
        {
            BurntimeClassic classic = app as BurntimeClassic;

            Background = classic.InventoryBackground == 14 ? "bar.pac" : "pub1.pac";
            Music      = "19_MUS 19_HSC.ogg";
            Position   = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;

            if (classic.InventoryBackground == 14)
            {
                Image ani = new Image(app);
                ani.Position   = new Vector2(206, 67);
                ani.Background = "bar.ani??p";
                ani.Background.Animation.IntervalMargin = 6;
                ani.Background.Animation.Progressive    = false;
                Windows += ani;
            }
            else
            {
                Image ani = new Image(app);
                ani.Position   = new Vector2(201, 22);
                ani.Background = "pub1.ani?0-11?p";
                ani.Background.Animation.Speed          = 6.1f;
                ani.Background.Animation.IntervalMargin = 1;
                ani.Background.Animation.Progressive    = false;
                Windows       += ani;
                ani            = new Image(app);
                ani.Position   = new Vector2(237, 28);
                ani.Background = "pub1.ani?12-13";
                ani.Background.Animation.Speed       = 8;
                ani.Background.Animation.Progressive = false;
                Windows       += ani;
                ani            = new Image(app);
                ani.Position   = new Vector2(231, 55);
                ani.Background = "pub1.ani?14-64?p";
                ani.Background.Animation.Speed          = 6.6f;
                ani.Background.Animation.IntervalMargin = 6;
                ani.Background.Animation.Progressive    = false;
                Windows += ani;
            }

            inventory                     = new InventoryWindow(app, InventorySide.Left);
            inventory.Position            = new Vector2(2, 5);
            inventory.LeftClickItemEvent += OnLeftClickItemInventory;
            Windows += inventory;

            Button button = new Button(app);

            button.Position  = new Vector2(25, 183);
            button.Text      = app.ResourceManager.GetString("burn?354");
            button.Font      = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.HoverFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(144, 160, 212));
            button.Command  += OnButtonExit;
            button.SetTextOnly();
            Windows += button;

            button           = new Button(app);
            button.Position  = new Vector2(116, 183);
            button.Text      = app.ResourceManager.GetString("burn?414");
            button.Font      = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.HoverFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(144, 160, 212));
            button.Command  += OnButtonDrink;
            button.SetTextOnly();
            Windows += button;

            grid                     = new ItemGridWindow(app);
            grid.Position            = new Vector2(160, 165);
            grid.Spacing             = new Vector2(4, 4);
            grid.Grid                = new Vector2(4, 1);
            grid.LeftClickItemEvent += OnLeftClickItemGrid;
            Windows                 += grid;

            font = new GuiFont(BurntimeClassic.FontName, new PixelColor(212, 212, 212));
        }
Example #22
0
        public MapGuiWindowNew(Module App)
            : base(App)
        {
            Size = app.Engine.GameResolution;

            font        = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            playerColor = new GuiFont(BurntimeClassic.FontName, PixelColor.White);

            // food field
            foodField          = new ProgressWindow(app, "gfx/gui_progress.png", "gfx/gui_progress_glass.png");
            foodField.Position = new Vector2(15, Size.y - 15);
            foodField.Color    = new PixelColor(240, 64, 56);
            foodField.Progress = 1.0f;
            foodField.Border   = 2;//1.5
            foodField.Layer++;
            Windows += foodField;

            // water field
            waterField          = new ProgressWindow(app, "gfx/gui_progress.png", "gfx/gui_progress_glass.png");
            waterField.Position = new Vector2(57, Size.y - 15);
            waterField.Color    = new PixelColor(120, 132, 184);
            waterField.Progress = 1.0f;
            waterField.Border   = 2;//1.5
            waterField.Layer++;
            Windows += waterField;

            // name field
            nameField          = new ProgressWindow(app, "gfx/gui_progress_wide.png", "gfx/gui_progress_wide_glass.png");
            nameField.Position = new Vector2(Size.x / 2 - 42, Size.y - 15);
            nameField.Progress = 1.0f;
            nameField.Border   = 2;//1.5
            nameField.Layer++;
            Windows += nameField;

            // time field
            timeField          = new ProgressWindow(app, "gfx/gui_progress_wide.png", "gfx/gui_progress_wide_glass.png");
            timeField.Position = new Vector2(Size.x - 15 - 84, Size.y - 15);
            timeField.Color    = new PixelColor(240, 64, 56);
            timeField.Progress = 1.0f;
            timeField.Border   = 2;//1.5
            timeField.Layer++;
            Windows += timeField;

            Button button = new Button(app);

            button.Image      = "gfx/button_normal.png";
            button.HoverImage = "gfx/button_hover.png";
            button.Position   = new Vector2(2, Size.y - 14);
            button.Command   += new CommandHandler(OnShowInventory);
            button.Font       = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.Text       = "I";
            Windows          += button;

            button            = new Button(app);
            button.Image      = "gfx/button_normal.png";
            button.HoverImage = "gfx/button_hover.png";
            button.Position   = new Vector2(Size.x / 2 - 42 - 14, Size.y - 14);
            button.Command   += new CommandHandler(OnSwitchMap);
            button.Font       = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.Text       = "M";
            Windows          += button;

            button            = new Button(app);
            button.Image      = "gfx/button_normal.png";
            button.HoverImage = "gfx/button_hover.png";
            button.Position   = new Vector2(Size.x / 2 + 42 + 2, Size.y - 14);
            button.Command   += new CommandHandler(OnShowStatistics);
            button.Font       = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.Text       = "S";
            Windows          += button;

            button            = new Button(app);
            button.Image      = "gfx/button_normal.png";
            button.HoverImage = "gfx/button_hover.png";
            button.Position   = new Vector2(Size.x - 14, Size.y - 14);
            button.Command   += new CommandHandler(OnNextTurn);
            button.Font       = new GuiFont(BurntimeClassic.FontName, new PixelColor(92, 92, 148));
            button.Text       = "T";
            Windows          += button;
        }
Example #23
0
        public InfoScene(Module App)
            : base(App)
        {
            Background = "info.pac";
            Music      = "13_MUS 13_HSC.ogg";
            Position   = (app.Engine.GameResolution - new Vector2(320, 200)) / 2;


            Button button = new Button(App);

            button.Position = new Vector2(5, 174);
            button.Command += OnButtonBack;
            //btn.SetHover(TextDB.Singleton.GetString(TextRegion.MenuStrings, 4), ColorTable.HoverGray);
            button.Image      = "gfx/mapbutton.png";
            button.HoverImage = "gfx/mapbuttonh.png";
            Windows          += button;

            button            = new Button(App);
            button.Position   = new Vector2(107, 122);
            button.Command   += OnButtonListUp;
            button.HoverImage = "gfx/up.png";
            Windows          += button;
            button            = new Button(App);
            button.Position   = new Vector2(107, 141);
            button.Command   += OnButtonListDown;
            button.HoverImage = "gfx/down.png";
            Windows          += button;

            Image image = new Image(App);

            image.Background = "inf.ani?0-2";
            image.Background.Animation.Speed = 6.0f;
            image.Position = new Vector2(4, 105);
            Windows       += image;

            image            = new Image(App);
            image.Background = "inf.ani?4-6";
            image.Background.Animation.Speed       = 6;
            image.Background.Animation.Progressive = false;
            image.Position = new Vector2(234, 150);
            Windows       += image;

            danger          = new Image(App);
            danger.Position = new Vector2(229, 27);
            Windows        += danger;

            production                  = new ItemWindow(App);
            production.Position         = new Vector2(230, 105);
            production.ItemID           = "";
            production.LeftClickEvent  += OnProductionLeft;
            production.RightClickEvent += OnProductionRight;
            Windows += production;

            grid          = new ItemGridWindow(App);
            grid.Position = new Vector2(137, 105);
            grid.Spacing  = new Vector2(0, 6);
            grid.Grid     = new Vector2(1, 2);
            Windows      += grid;

            titleFont = new GuiFont(BurntimeClassic.FontName, new PixelColor(156, 156, 156), new PixelColor(76, 32, 4));
            font      = new GuiFont(BurntimeClassic.FontName, new PixelColor(184, 184, 184), new PixelColor(92, 92, 96));

            items = new SortedList <string, int>();

            fighterImage    = "syssze.raw?32";
            doctorImage     = "syssze.raw?16";
            technicianImage = "syssze.raw?48";
        }