예제 #1
0
        public GUIGameMenu(Manager manager, Network network, GameHandler handler, GameMain game)
            : base(manager)
        {
            this.manager = manager;
            this.handler = handler;
            this.network = network;
            this.game    = game;
            Init();
            Text               = "System Menu";
            Width              = 170;
            Height             = 195;
            Left               = (manager.ScreenWidth - Width) / 2;
            Top                = (manager.ScreenHeight - Height) / 2;
            Alpha              = 220;
            Resizable          = false;
            CloseButtonVisible = false;

            rebornBtn = new Button(manager);
            rebornBtn.Init();
            rebornBtn.Text    = "Reborn";
            rebornBtn.Enabled = false;
            rebornBtn.Parent  = this;
            rebornBtn.Left    = 10;
            rebornBtn.Top     = 10;
            rebornBtn.Width   = 140;
            rebornBtn.Click  += new TomShane.Neoforce.Controls.EventHandler(rebornBtn_Click);
            Add(rebornBtn);

            optionBtn = new Button(manager);
            optionBtn.Init();
            optionBtn.Text    = "Option";
            optionBtn.Enabled = false;
            optionBtn.Parent  = this;
            optionBtn.Left    = 10;
            optionBtn.Top     = 40;
            optionBtn.Width   = 140;
            Add(optionBtn);

            relogBtn = new Button(manager);
            relogBtn.Init();
            relogBtn.Text   = "Re-Login";
            relogBtn.Parent = this;
            relogBtn.Left   = 10;
            relogBtn.Top    = 70;
            relogBtn.Width  = 140;
            relogBtn.Click += new TomShane.Neoforce.Controls.EventHandler(relogBtn_Click);
            Add(relogBtn);

            exitBtn = new Button(manager);
            exitBtn.Init();
            exitBtn.Text   = "Exit Game";
            exitBtn.Parent = this;
            exitBtn.Left   = 10;
            exitBtn.Top    = 100;
            exitBtn.Width  = 140;
            exitBtn.Click += new TomShane.Neoforce.Controls.EventHandler(exitBtn_Click);
            Add(exitBtn);

            closeBtn = new Button(manager);
            closeBtn.Init();
            closeBtn.Text   = "Close";
            closeBtn.Parent = this;
            closeBtn.Left   = 10;
            closeBtn.Top    = 130;
            closeBtn.Width  = 140;
            closeBtn.Click += new TomShane.Neoforce.Controls.EventHandler(closeBtn_Click);
            Add(closeBtn);
        }