示例#1
0
        public RemoteService(Controller controller, Config config)
        {
            this.controller = controller;

            config.RemoteServerChanged += this.RemoteServerPortChanged;
        }
示例#2
0
        public void UpdateState(Bindings bindings, Controller controller)
        {
            foreach (Bind key in bindings.KeyBindings)
            {
                foreach (Control control in this.infoPanel.Controls)
                {
                    if (key.XboxKey.Equals(control.Tag))
                    {
                        switch (key.Type)
                        {
                            case KeyType.Keyboard:
                                control.Text = key.Key.ToString();
                                break;
                            case KeyType.Mouse:
                                control.Text = key.Mouse.ToString();
                                break;
                            default:
                                throw new NotSupportedException();
                        }

                        break;
                    }
                }
            }

            if (controller.Connected)
            {
                this.statusButton.IconColor = Colors.White;
            }
            else
            {
                this.statusButton.IconColor = Colors.DarkGray;
            }
        }
示例#3
0
        public void DrawStatus(GameTime gameTime, String gameName, Bindings bindings, Controller controller)
        {
            this.render.Init3d();
            this.worldEngine.RenderWorld();

            this.render.Init2d();
            this.statusWindow.GameName = gameName;
            this.statusWindow.UpdateState(bindings, controller);
            this.statusDesktop.Render((float)gameTime.ElapsedGameTime.TotalMilliseconds / 1000.0f);
        }