Beispiel #1
0
        public StatusWindow(Desktop desktop, GraphicsDevice graphics) : base(desktop, CreationFlag.FlagsNone, "g_ui/main_menu/status.window.xml")
        {
            this.gameName = FindControl<Label>("gameTextBox");
            this.statusPanel = FindControl<Panel>("statusPanel");
            this.infoPanel = FindControl<Panel>("infoPanel");
            this.statusButton = FindControl<Button>("statusButton");
            this.graphics = graphics;

            int x = 700;
            int y = 0;
            int dy = 32;

            AddLabel("rt", x, y += dy, X360Keys.RT);
            AddLabel("a", x, y += dy, X360Keys.A, new Color(105,163,25,255));
            AddLabel("b", x, y += dy, X360Keys.B, new Color(186,47,24,255));
            AddLabel("x", x, y += dy, X360Keys.X, new Color(50,77,156,255));
            AddLabel("y", x, y += dy, X360Keys.Y, new Color(181,145,7,255));

            x = 600;
            y = 0;

            AddLabel("r_stick_up", x, y += dy, X360Keys.RSUp);
            AddLabel("r_stick_down", x, y += dy, X360Keys.RSDown);
            AddLabel("r_stick_left", x, y += dy, X360Keys.RSLeft);
            AddLabel("r_stick_right", x, y += dy, X360Keys.RSRight);
            AddLabel("r_stick", x, y += dy, X360Keys.RS);

            x = 500;
            y = 0;

            AddLabel("lb", x, y += dy, X360Keys.LB);
            AddLabel("back", x, y += dy, X360Keys.Back);
            AddLabel("guide", x, y += dy, X360Keys.Guide);
            AddLabel("start", x, y += dy, X360Keys.Start);
            AddLabel("rb", x, y += dy, X360Keys.RB);

            x = 400;
            y = 0;

            AddLabel("l_stick_up", x, y += dy, X360Keys.LSUp);
            AddLabel("l_stick_down", x, y += dy, X360Keys.LSDown);
            AddLabel("l_stick_left", x, y += dy, X360Keys.LSLeft);
            AddLabel("l_stick_right", x, y += dy, X360Keys.LSRight);
            AddLabel("l_stick", x, y += dy, X360Keys.LS);

            x = 300;
            y = 0;

            AddLabel("lt", x, y += dy, X360Keys.LT);
            AddLabel("dpad_up", x, y += dy, X360Keys.Up);
            AddLabel("dpad_down", x, y += dy, X360Keys.Down);
            AddLabel("dpad_left", x, y += dy, X360Keys.Left);
            AddLabel("dpad_right", x, y += dy, X360Keys.Right);

            this.Desktop.Resized += (sender, a) => { this.Bounds = new Rectangle(0, 0, sender.Width, sender.Height); };
        }
Beispiel #2
0
        private void MainDesktopCursorChanged(Desktop sender, EventArgs data)
        {
#if WINDOWS
            switch (this.worldEngine.MainDesktop.Desktop.CurrentCursor)
            {
                case UI.Controls.MousePointers.PointerHand:
                    System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Hand;
                    break;
                default:
                    System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Arrow;
                    break;
            }
#endif
        }
Beispiel #3
0
        /// <summary>
        /// Saves settings o nthe thead while displaying spinner window.
        /// </summary>
        /// <param name="desktop">desktop to which attch saving window</param>
        /// <param name="config">config to save</param>
        internal static void Save(Desktop desktop, Config config)
        {
            Window window = desktop.NewWindow("g_ui/main_menu/saving.window.xml");

            window.Visible = true;

            Thread thread = new Thread(new ThreadStart(() => 
            {
                Config.Save(config, "x360.xonfig.xml");

                Thread.Sleep(100);

                window.Close(); 
            }));

            thread.Start();
        }