Пример #1
0
        void CreateGui()
        {
            Point cursorSize = new Point(32, 32);
            Point halfSize = cursorSize / 2;

            AddCursor(Cursors.Default, new Cursor { Texture = "cursors\\Arrow.png", Size = cursorSize, HotSpot = Point.Zero });
            AddCursor(Cursors.Link, new Cursor { Texture = "cursors\\Link.png", Size = cursorSize, HotSpot = Point.Zero });
            AddCursor(Cursors.Move, new Cursor { Texture = "cursors\\Move.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.Select, new Cursor { Texture = "cursors\\Select.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.SizeNS, new Cursor { Texture = "cursors\\SizeNS.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.SizeWE, new Cursor { Texture = "cursors\\SizeWE.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.HSplit, new Cursor { Texture = "cursors\\SizeNS.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.VSplit, new Cursor { Texture = "cursors\\SizeWE.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.SizeNESW, new Cursor { Texture = "cursors\\SizeNESW.png", Size = cursorSize, HotSpot = halfSize });
            AddCursor(Cursors.SizeNWSE, new Cursor { Texture = "cursors\\SizeNWSE.png", Size = cursorSize, HotSpot = halfSize });

            TooltipControl = new SimpleTooltip();
            TooltipControl.Offset = new Point(50, 50);

            bottom = new Frame();
            bottom.Size = new Point(14, 14);
            bottom.Dock = DockStyle.Bottom;
            bottom.Style = "button";
            Desktop.Controls.Add(bottom);

            Frame center = new Frame();
            center.Dock = DockStyle.Fill;
            //Desktop.Controls.Add(center);

            actionbar1 = new ActionBar();
            actionbar2 = new ActionBar();
            statusbar = new StatusBar();
            inventory = new Inventory();
            skillbook = new Skillbook();
            chatwindow = new ChatWindow();
            charsheet = new CharacterSheet();

            center.Controls.Add(actionbar1);
            center.Controls.Add(actionbar2);
            center.Controls.Add(statusbar);

            chatwindow.Show(Desktop);
            //minimap.Show(Desktop);
            //inventory.Show(Desktop);
            //charsheet.Show(Desktop);
            //skillbook.Show(Desktop);
        }
Пример #2
0
        void CreateGui()
        {
            TooltipControl        = new SimpleTooltip();
            TooltipControl.Offset = new Point(50, 50);

            top       = new Frame();
            top.Size  = new Point(24, 24);
            top.Dock  = DockStyle.Top;
            top.Style = "button";
            Desktop.Controls.Add(top);

            bottom       = new Frame();
            bottom.Size  = new Point(14, 14);
            bottom.Dock  = DockStyle.Bottom;
            bottom.Style = "button";
            Desktop.Controls.Add(bottom);

            Frame center = new Frame();

            center.Dock = DockStyle.Fill;
            Desktop.Controls.Add(center);

            actionbar1 = new ActionBar();
            actionbar2 = new ActionBar();
            statusbar  = new StatusBar();
            minimap    = new MiniMap();
            inventory  = new Inventory();
            skillbook  = new Skillbook();
            chatwindow = new ChatWindow();
            charsheet  = new CharacterSheet();

            center.Controls.Add(actionbar1);
            center.Controls.Add(actionbar2);
            center.Controls.Add(statusbar);

            chatwindow.Show(Desktop);
            minimap.Show(Desktop);
            inventory.Show(Desktop);
            charsheet.Show(Desktop);
            skillbook.Show(Desktop);
        }