public override void MouseMove(Vec2 pos) { base.MouseMove(pos); pos = new Camera(10).FromWH(pos, App.Width, App.Height); foreach (var b in buttons) b.Selected = b.Inside(pos); }
public override void Render() { if (tex == null || tex.Width != Draw.Width || tex.Height != Draw.Height) tex = new Texture(Draw.Width, Draw.Height); Draw.BeginTexture(tex); base.Render(); Draw.EndTexture(); tex.RemoveAlpha(); Draw.Save(); Draw.Scale(2); Draw.Align(0.5, 0.5); tex.Render(); if (back != null) { Draw.Color(1, 1, 1, t); back.Render(); } Draw.Load(); var cam = new Camera(20); Draw.Save(); cam.Apply(); Draw.Translate(cam.FromWH(Mouse.Position, Draw.Width, Draw.Height)); Draw.Align(0.5, 0.5); cursor.Render(); Draw.Load(); }
public SceneView(ClientView clientView) { this.clientView = clientView; this.client = clientView.client; this.model = clientView.model; terrain = model.Terrain; camera = client.Camera; }