private static void Messages_OnMessage(Messages.WindowMessage args) { if (args.Message == WindowMessages.LeftButtonDown) { Chat.Print(user.ServerPosition); } }
private static void Messages_OnMessage(Messages.WindowMessage args) { if (Keybind?.Keys == null) { return; } if (args.Message == WindowMessages.KeyDown) { if ((args.Handle.WParam == Keybind.Keys.Item1) || (args.Handle.WParam == Keybind.Keys.Item2)) { Orbwalker.ActiveModesFlags |= Orbwalker.ActiveModes.Combo; } } if (args.Message != WindowMessages.KeyUp) { return; } if ((args.Handle.WParam == Keybind.Keys.Item1) || (args.Handle.WParam == Keybind.Keys.Item2)) { Orbwalker.ActiveModesFlags = Orbwalker.ActiveModes.None; } }
internal void OnMessage(Messages.WindowMessage args) { switch (args.Message) { case WindowMessages.LeftButtonDown: OnMouseDown((Messages.LeftButtonDown)args); break; } }
internal static void OnMessage(Messages.WindowMessage args) { switch (args.Message) { case WindowMessages.KeyDown: CurrentlyDownKeys.Add(args.Handle.WParam); break; case WindowMessages.KeyUp: CurrentlyDownKeys.RemoveAll(o => o == args.Handle.WParam); break; } }
private void Messages_OnMessage(Messages.WindowMessage args) { if (args.Message == WindowMessages.MouseMove) { return; } if (args.Message == WindowMessages.LeftButtonDown) { ColorPicker_OnLeftMouseDown(this, new EventArgs()); } if (args.Message == WindowMessages.LeftButtonUp) { ColorPicker_OnLeftMouseUp(this, new EventArgs()); } }
/// <summary> /// Use while events are not being called /// </summary> /// <param name="args"></param> private void Messages_OnMessage(Messages.WindowMessage args) { if (args.Message == WindowMessages.MouseMove) { return; } //Because events are not being called i have to call them my self if (args.Message == WindowMessages.LeftButtonDown) { ColorPicker_OnLeftMouseDown(this, new EventArgs()); } if (args.Message == WindowMessages.LeftButtonUp) { ColorPicker_OnLeftMouseUp(this, new EventArgs()); } }
private static void Messages_OnMessage(Messages.WindowMessage args) { if (args.Message == WindowMessages.KeyDown) { if (args.Handle.WParam == Keybind.Keys.Item1 || args.Handle.WParam == Keybind.Keys.Item2) { Orbwalker.ActiveModesFlags |= Orbwalker.ActiveModes.Combo; } } if (args.Message == WindowMessages.KeyUp) { if (args.Handle.WParam == Keybind.Keys.Item1 || args.Handle.WParam == Keybind.Keys.Item2) { Orbwalker.ActiveModesFlags = Orbwalker.ActiveModes.None; } } }
private static void Messages_OnMessage(Messages.WindowMessage args) { if (args.Message != WindowMessages.LeftButtonUp) { return; } var targetNearMouse = EntityManager.Heroes.Allies.OrderBy(a => a.Distance(Game.CursorPos)) .FirstOrDefault(a => !a.IsMe && a.IsInRange(Game.CursorPos, 200)); if (targetNearMouse == null) { return; } Chat.Print("Selected new ADC = " + targetNearMouse.ChampionName); MyADC = targetNearMouse; }
private static void ProcessOnMessage(Messages.WindowMessage a) { if (a.Message == WindowMessages.RightButtonDown) { if (ClickID == 0) { ReadyAt = Environment.TickCount + 60 * 1000; } ClickID++; Logger.Debug("Adding Move"); _clickDictionary.Add(ClickID, Environment.TickCount); if (_lastClick != 0) { var clickTime = Environment.TickCount - _lastClick; if (clickTime < FastestClick && FastestClick != 0) { FastestClick = clickTime; } } _lastClick = Environment.TickCount; } }
internal static void OnWndMessage(Messages.WindowMessage args) { // Do not open the menu when the chat is open if (!Chat.IsOpen) { // Shift key check switch (args.Message) { case WindowMessages.KeyDown: case WindowMessages.KeyUp: // Shift key if (args.Handle.WParam == 16) { if (args.Message == WindowMessages.KeyDown && CurrentKeyDown == 16) { break; } IsVisible = args.Message == WindowMessages.KeyDown; } break; } // Call key events for each control switch (args.Message) { case WindowMessages.KeyDown: if (CurrentKeyDown != args.Handle.WParam) { CurrentKeyDown = args.Handle.WParam; Instance.OnKeyDown((Messages.KeyDown)args); } break; case WindowMessages.KeyUp: CurrentKeyDown = 0; Instance.OnKeyUp((Messages.KeyUp)args); break; } } else { // Close menu on chat opening IsVisible = false; } if (IsVisible) { var mouseEvent = args as Messages.MouseEvent; if (mouseEvent != null) { // Handle main menu moving first switch (args.Message) { case WindowMessages.MouseMove: if (TitleBar.IsLeftMouseDown) { Position = Game.CursorPos2D + MoveOffset; } break; case WindowMessages.LeftButtonUp: case WindowMessages.RightButtonUp: CallMouseUpMethods(Instance, args.Message == WindowMessages.LeftButtonUp); break; } // Call general methods CallMouseMoveMethods(Instance, mouseEvent.MousePosition, Control.IsOnOverlay(mouseEvent.MousePosition)); // Get the top most control to work with switch (args.Message) { case WindowMessages.LeftButtonDown: case WindowMessages.RightButtonDown: { if (args.Message == WindowMessages.LeftButtonDown) { var container = GetTopMostControl <ControlContainerBase>(Instance, mouseEvent.MousePosition, false); if (container != null && container.ContainerView.CheckScrollbarDown(mouseEvent.MousePosition)) { break; } } var control = GetTopMostControl(Instance, mouseEvent.MousePosition, false); switch (args.Message) { case WindowMessages.LeftButtonDown: control.IsLeftMouseDown = true; control.CallLeftMouseDown(); break; case WindowMessages.RightButtonDown: control.IsRightMouseDown = true; control.CallRightMouseDown(); break; } break; } case WindowMessages.MouseWheel: { var container = GetTopMostControl <ControlContainerBase>(Instance, mouseEvent.MousePosition, false); if (container != null) { container.CallMouseWheel((Messages.MouseWheel)args); } break; } } } } }