Exemplo n.º 1
0
 public void OnMouseInput( MouseInput input )
 {
     Sync.CheckSyncUnchanged( world, () =>
     {
         Widget.HandleInput( input );
     } );
 }
Exemplo n.º 2
0
 public void OnMouseInput(MouseInput input)
 {
 }
Exemplo n.º 3
0
 public void OnMouseInput(MouseInput input)
 {
     Sync.CheckSyncUnchanged(world, () => Ui.HandleInput(input));
 }
Exemplo n.º 4
0
        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 );
        }
Exemplo n.º 5
0
		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;
		}
Exemplo n.º 6
0
 public void OnMouseInput(MouseInput input)
 {
     Sync.CheckSyncUnchanged(world, () => Ui.HandleInput(input));
 }
Exemplo n.º 7
0
 public void OnMouseInput(MouseInput input)
 {
 }
Exemplo n.º 8
0
 public void OnMouseInput(MouseInput input)
 {
     Sync.RunUnsynced(Game.Settings.Debug.SyncCheckUnsyncedCode, world, () => Ui.HandleInput(input));
 }