本文整理汇总了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;
}
}