///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget /// </summary> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected internal virtual void OnMouseWheelMoved(MouseWheelEventArgs e) { }
public override bool MouseWheelMove(MouseWheelEventArgs e) { if (_entityList.MouseWheelMove(e)) return true; if (base.MouseWheelMove(e)) return true; return false; }
public override bool MouseWheelMove(MouseWheelEventArgs e) { return false; }
public void MouseWheelMove(MouseWheelEventArgs e) {}
private void MouseWheelMoved(object sender, MouseWheelEventArgs e) { if (OnMouseWheelMove != null && ContainsPoint(new Vector2i(e.X, e.Y))) { OnMouseWheelMove(sender, e, MouseCoordToDisplayCoord(new Vector2i(e.X, e.Y))); } }
public override bool MouseWheelMove(MouseWheelEventArgs e) { if (ClientArea.Contains(new Point((int) e.X, (int) e.Y))) { if (ScrollingNeeded()) { if (e.Delta> 0) { if (ScrollOffset + 1 <= _items.Count - 1) ScrollOffset++; return true; } else if (e.Delta < 0) { if (ScrollOffset - 1 >= 0) ScrollOffset--; return true; } } } return false; }
public override bool MouseWheelMove(MouseWheelEventArgs e) { if (inner_focus != null) { if (inner_focus.MouseWheelMove(e)) return true; else if (scrollbarV.IsVisible() && ClientArea.Contains(e.X, e.Y)) { scrollbarV.MouseWheelMove(e); return true; } } else if (scrollbarV.IsVisible() && ClientArea.Contains(e.X, e.Y)) { scrollbarV.MouseWheelMove(e); return true; } return false; }
private void window_MouseWheelMoved(object sender, MouseWheelEventArgs e) { zoom -= e.Delta * 0.1f; }
void OnMouseWheel(object sender, MouseWheelEventArgs e) { logIndex -= e.Delta * mouseScrollSpeed; UpdateConsoleText(); }
public virtual void OnMouseWheelMoved(MouseWheelEventArgs E) { }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget /// </summary> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e) { // Only do something when there is a scrollbar if (m_Scroll != null) { if (m_Scroll.LowValue < m_Scroll.Maximum) { // Check if you are scrolling down if (e.Delta < 0) { // Scroll down m_Scroll.Value = (int)(m_Scroll.Value + ((-e.Delta) * (m_ItemHeight / 2))); } else // You are scrolling up { int change = (int)((e.Delta) * (m_ItemHeight / 2)); // Scroll up if (change < m_Scroll.Value) m_Scroll.Value = m_Scroll.Value - change; else m_Scroll.Value = 0; } } } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget /// </summary> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e) { // Only do something when there is a scrollbar if (m_Scroll != null) { if (m_Scroll.LowValue < m_Scroll.Maximum) { // Check if you are scrolling down if (e.Delta < 0) { // Scroll down m_Scroll.Value = m_Scroll.Value + (-e.Delta * (int)m_TextSize); } else // You are scrolling up { int change = e.Delta * (int)m_TextSize; // Scroll up if (change < m_Scroll.Value) m_Scroll.Value = m_Scroll.Value - change; else m_Scroll.Value = 0; } UpdateDisplayedText(); } } }
public void MouseScrollMove(MouseWheelEventArgs e) { if(ActiveWindow != null) ActiveWindow.MouseScrollMove(e); else { CurrentState.MouseScrollMove(e); } }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget /// </summary> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e) { if (Value - e.Delta < 0) Value = 0; else Value = Value - e.Delta; }
/// <summary> /// Handles the MouseWheelMoved event of the <see cref="GameBase.RenderWindow"/>. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="SFML.Window.MouseWheelEventArgs"/> instance containing the event data.</param> void rw_MouseWheelMoved(object sender, MouseWheelEventArgs e) { if (MouseWheelMoved != null) MouseWheelMoved.Raise(this, e); }
/// <summary> /// Handles mouse wheel movement for the console. /// </summary> /// <param name="e">The <see cref="MouseWheelEventArgs"/> instance containing the event data.</param> public void OnInput(MouseWheelEventArgs e) { if (e.Delta > 0) { this.bufferPos++; } else if (e.Delta < 0) { this.bufferPos--; } if (this.bufferPos < 0) { this.bufferPos = 0; } else if (this.bufferPos > this.consoleBuffer.Count) { this.bufferPos = this.consoleBuffer.Count; } }
/// <summary> /// マウス ホイールの回転を処理するハンドラー /// </summary> /// <param name="sender">ウィンドウ</param> /// <param name="e">マウス ホイール イベント</param> void OnMouseWheelMovedEventHandler(object sender, MouseWheelEventArgs e) { if (e.Delta > 0) { this.keyBuffer.Add (KeyCode.MouseWheeleUp); } if (e.Delta < 0) { this.keyBuffer.Add (KeyCode.MouseWheeleDown); } this.wheele += e.Delta; }
public override bool MouseWheelMove(MouseWheelEventArgs e) { Value += ((Math.Sign(e.Y)*-1)*Math.Max(((max/20)), 1)); return true; }
public override bool MouseWheelMove(MouseWheelEventArgs e) { foreach (var curr in _tabs) { if (curr.Key.MouseWheelMove(e)) return true; if (_activeTab != null) if (_activeTab.MouseWheelMove(e)) return true; } return base.MouseWheelMove(e); }
static void MouseWheelMoved(object sender, MouseWheelEventArgs e) { EventMgr.Notify (Event.MouseWheelMoved, e); }
void InputSystem_MouseWheel(object sender, MouseWheelEventArgs e) { if (screens.Count > 0) CurrentScreen.MouseScroll(e.Delta); }
public override bool MouseWheelMove(MouseWheelEventArgs e) { if (ClientArea.Contains(e.X, e.Y)) { if (e.Delta > 0) { if (Selected + 1 <= _items.Count - 1) Selected++; return true; } else if (e.Delta < 0) { if (Selected - 1 >= 0) Selected--; return true; } } return false; }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget /// </summary> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e) { if (!m_ListBox.Visible) { // Check if you are scrolling down if (e.Delta < 0) { // select the next item if ((uint)(m_ListBox.GetSelectedItemIndex() + 1) < m_ListBox.GetItems().Count) m_ListBox.SetSelectedItem(m_ListBox.GetSelectedItemIndex() + 1); } else // You are scrolling up { // select the previous item if (m_ListBox.GetSelectedItemIndex() > 0) m_ListBox.SetSelectedItem(m_ListBox.GetSelectedItemIndex()-1); } } }
void window_MouseWheelMoved(object sender, MouseWheelEventArgs e) { renderFrame.scale += ((float)e.Delta) / 10.0f; renderFrame.CalcZoom(); if (currentObject != null) { if (currentObject is Circle) { Circle circle = currentObject as Circle; circle.center = ToGlobalCoords(Mouse.GetPosition(window)); } } }
public void MouseWheelMove ( MouseWheelEventArgs e ) { UserInterfaceManager.MouseWheelMove(e); }
internal void updateMouseWheel(object sender, MouseWheelEventArgs e) { mouseWheelPos += e.Delta; }
/// <summary> /// Handles mouse wheel input. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The MouseWheelEventArgs instance containing the event data.</param> private void MouseWheelMoveEvent(object sender, MouseWheelEventArgs e) { if (_stateManager != null) _stateManager.MouseWheelMove(e); }
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Tells the widget that the mouse wheel has moved while the mouse was on top of the widget /// </summary> /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// protected internal override void OnMouseWheelMoved(MouseWheelEventArgs e) { e.X -= (int)m_Borders.Left; e.Y -= (int)(m_TitleBarHeight + m_Borders.Top); base.OnMouseWheelMoved(e); }
void OnMouseWheelMoved(object sender, MouseWheelEventArgs e) { currentMouseWheelDelta = e.Delta; }
public override bool MouseWheelMove(MouseWheelEventArgs e) { return _inventoryContainer.MouseWheelMove(e); }