void _wvm_RequestZoom(object sender, BCCL.Framework.Events.EventArgs<bool> e) { if (e.Value1) { Zoom(1); } else { Zoom(-1); } }
void _wvm_RequestScroll(object sender, BCCL.Framework.Events.EventArgs<ScrollDirection> e) { float x = _scrollPosition.X; float y = _scrollPosition.Y; float inc = 1 / _zoom * 10; switch (e.Value1) { case ScrollDirection.Up: y += inc; break; case ScrollDirection.Down: y -= inc; break; case ScrollDirection.Left: x += inc; break; case ScrollDirection.Right: x -= inc; break; } _scrollPosition = new Vector2(x, y); ClampScroll(); }