public RemoteService(Controller controller, Config config) { this.controller = controller; config.RemoteServerChanged += this.RemoteServerPortChanged; }
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; } }
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); }