本文整理匯總了C#中OpenTK.Input.MouseWheelEventArgs類的典型用法代碼示例。如果您正苦於以下問題:C# MouseWheelEventArgs類的具體用法?C# MouseWheelEventArgs怎麽用?C# MouseWheelEventArgs使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MouseWheelEventArgs類屬於OpenTK.Input命名空間,在下文中一共展示了MouseWheelEventArgs類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: OnMouseWheel
public void OnMouseWheel(MouseWheelEventArgs e)
{
if (e.DeltaPrecise > 0)
game.GAME_VIEW.zoom += 0.05;
else if (e.DeltaPrecise < 0)
game.GAME_VIEW.zoom -= 0.05;
}
示例2: Mouse_WheelChanged
void Mouse_WheelChanged(object sender, MouseWheelEventArgs e)
{
#region LOL Better Don't look to long at this crap here
if (e.Delta == 1)
{
if (WeaponSelectIndex != 0)
{
WeaponSelectIndex--;
}
else
{
WeaponSelectIndex = 3;
}
}
else
{
if (WeaponSelectIndex != 3)
{
WeaponSelectIndex++;
}
else
{
WeaponSelectIndex = 0;
}
}
#endregion
}
示例3: OnMouseWheel
protected override void OnMouseWheel(MouseWheelEventArgs e)
{
_scale += e.DeltaPrecise > 0 ? _scale/10 : -_scale/10;
if (_scale < float.Epsilon) _scale = float.Epsilon;
Rescale();
if (e.Mouse.MiddleButton == ButtonState.Released)
CalcData();
base.OnMouseWheel(e);
}
示例4: OnMouseWheel
protected void OnMouseWheel(object sender, MouseWheelEventArgs e)
{
if (!Focused)
return;
gwenInput.ProcessMouseMessage(e);
}
示例5: WheelMove
private void WheelMove(object sender, MouseWheelEventArgs e)
{
if (!_window.Focused) return;
_wheelPosition = e.ValuePrecise;
if(Wheel != null)
Wheel(sender, new DunamisMouseWheelEventArgs(e.Value, e.ValuePrecise, e.Delta));
}
示例6: MouseWheelChanged
protected override void MouseWheelChanged( object sender, MouseWheelEventArgs e )
{
LauncherTableWidget table = (LauncherTableWidget)widgets[view.tableIndex];
table.CurrentIndex -= e.Delta;
MarkPendingRedraw();
}
示例7: MouseZoom
public virtual bool MouseZoom( MouseWheelEventArgs e )
{
return false;
}
示例8: MouseWheelChanged
protected override void MouseWheelChanged( object sender, MouseWheelEventArgs e )
{
AdjustSelectedColour( e.Delta );
}
示例9: Game_WheelChanged
private void Game_WheelChanged(object sender, MouseWheelEventArgs e)
{
chaseDistance -= e.Delta;
}
示例10: OnMouseWheel
public void OnMouseWheel(object s, MouseWheelEventArgs e)
{
this.ZoomTarget *= (double) Math.Pow(1.1f,e.DeltaPrecise);
}
示例11: HandleMouseWheel
internal void HandleMouseWheel(object sender, MouseWheelEventArgs e)
{
state = e.Mouse;
WheelChanged(this, e);
}
示例12: OnMouseWheelChanged
void OnMouseWheelChanged(object sender, MouseWheelEventArgs e)
{
dy = e.Delta * MOUSE_DOLLY_SPEED;
cameraPosition[2] -= dy;
//if (cameraPosition[2] < 0)
// cameraPosition[2] = 0;
}
示例13: OnMouseWheelChanged
private void OnMouseWheelChanged(object sender, MouseWheelEventArgs e)
{
var changeFunc = WheelChanged;
var downFunc = WheelDown;
var upFunc = WheelUp;
var delta = e.DeltaPrecise;
if (delta < 0 && downFunc != null)
downFunc(this, e);
else if (delta > 0 && upFunc != null)
upFunc(this, e);
if (changeFunc != null)
changeFunc(this, e);
}
示例14: OnMouseWheeled
public static void OnMouseWheeled(object sender, MouseWheelEventArgs args)
{
// Renderer.Render.Instance.gui.Input.ProcessMouseMessage(args);
}
示例15: MouseWheelChanged
void MouseWheelChanged( object sender, MouseWheelEventArgs e )
{
if( !game.GetActiveScreen.HandlesMouseScroll( e.Delta ) ) {
Inventory inv = game.Inventory;
if( game.Camera.MouseZoom( e ) || !inv.CanChangeHeldBlock ) return;
int diff = -e.Delta % inv.Hotbar.Length;
int newIndex = inv.HeldBlockIndex + diff;
if( newIndex < 0 ) newIndex += inv.Hotbar.Length;
if( newIndex >= inv.Hotbar.Length ) newIndex -= inv.Hotbar.Length;
inv.HeldBlockIndex = newIndex;
}
}