public void OnMouseInput( MouseInput input ) { Sync.CheckSyncUnchanged( world, () => { Widget.HandleInput( input ); } ); }
public void OnMouseInput(MouseInput input) { }
public void OnMouseInput(MouseInput input) { Sync.CheckSyncUnchanged(world, () => Ui.HandleInput(input)); }
public Order Order( int2 xy, MouseInput mi ) { if (Owner != World.LocalPlayer) return null; if (!World.Map.IsInMap(xy.X, xy.Y)) return null; var underCursor = World.FindUnitsAtMouse(mi.Location).FirstOrDefault(); if (underCursor != null && !underCursor.traits.Contains<Selectable>()) underCursor = null; return traits.WithInterface<IIssueOrder>() .Select( x => x.IssueOrder( this, xy, mi, underCursor ) ) .FirstOrDefault( x => x != null ); }
public bool HandleInput(World world, MouseInput mi) { if (selectedWidget != null) return selectedWidget.HandleInput(mi); if (rootWidget.HandleInput(mi)) return true; if (mi.Event == MouseInputEvent.Move) lastMousePos = mi.Location; var action = buttons.Where(a => a.First.Contains(mi.Location.ToPoint())) .Select(a => a.Second).FirstOrDefault(); if (action == null) return false; if (mi.Event == MouseInputEvent.Down) action(mi.Button == MouseButton.Left); return true; }
public void OnMouseInput(MouseInput input) { Sync.RunUnsynced(Game.Settings.Debug.SyncCheckUnsyncedCode, world, () => Ui.HandleInput(input)); }