protected override void OnMouseWheel(MouseEventArgs e) { try { DXControl.ActiveScene?.OnMouseWheel(e); } catch (Exception ex) { CEnvir.SaveException(ex); } }
protected override void OnKeyPress(KeyPressEventArgs e) { try { DXControl.ActiveScene?.OnKeyPress(e); e.Handled = true; } catch (Exception ex) { CEnvir.SaveException(ex); } }
protected override void OnMouseUp(MouseEventArgs e) { if (GameScene.Game != null) { GameScene.Game.MapControl.MapButtons &= ~e.Button; } try { DXControl.ActiveScene?.OnMouseUp(e); } catch (Exception ex) { CEnvir.SaveException(ex); } }
protected override void OnMouseDown(MouseEventArgs e) { if (GameScene.Game != null && e.Button == MouseButtons.Right && (GameScene.Game.SelectedCell != null || GameScene.Game.GoldPickedUp)) { GameScene.Game.SelectedCell = null; GameScene.Game.GoldPickedUp = false; return; } try { DXControl.ActiveScene?.OnMouseDown(e); } catch (Exception ex) { CEnvir.SaveException(ex); } }
protected override void OnKeyUp(KeyEventArgs e) { CEnvir.Shift = e.Shift; CEnvir.Alt = e.Alt; CEnvir.Ctrl = e.Control; if (e.KeyCode == Keys.Pause) { CreateScreenShot(); } try { DXControl.ActiveScene?.OnKeyUp(e); e.Handled = true; } catch (Exception ex) { CEnvir.SaveException(ex); } }
protected override void OnMouseMove(MouseEventArgs e) { //TODO Move to other locations instead? if (Config.ClipMouse && Focused) { Cursor.Clip = RectangleToScreen(ClientRectangle); } else { Cursor.Clip = Rectangle.Empty; } CEnvir.MouseLocation = e.Location; try { DXControl.ActiveScene?.OnMouseMove(e); } catch (Exception ex) { CEnvir.SaveException(ex); } }
protected override void OnKeyDown(KeyEventArgs e) { base.OnKeyDown(e); CEnvir.Shift = e.Shift; CEnvir.Alt = e.Alt; CEnvir.Ctrl = e.Control; try { if (e.Alt && e.KeyCode == Keys.Enter) { DXManager.ToggleFullScreen(); return; } DXControl.ActiveScene?.OnKeyDown(e); e.Handled = true; } catch (Exception ex) { CEnvir.SaveException(ex); } }