Description:
Fix scrolling.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r95:27def80fdef3 -

@@ -397,15 +397,12
397 397 #endif
398 398 #endregion gamerate_keys
399 399
400 #if DEBUG
401 Console.Out.WriteLine(String.Format("Rate: {0}", this.simulation.currentRate));
402 #endif
403
404
405 400
406 401 MouseState mouseCur = Mouse.GetState();
407 402 this.original_point = Vector2.Transform(new Vector2(mouseCur.X, mouseCur.Y), Matrix.Invert(camera.get_transformation(GraphicsDevice)));
408 403
404 int menuBarHeight = 20;
405
409 406 if (MathUtils.Between(mouseCur.X, 0, 50))
410 407 {
411 408 this.camera.Move(new Vector2(-4, 0));
@@ -415,11 +412,11
415 412 this.camera.Move(new Vector2(4, 0));
416 413 }
417 414
418 if (MathUtils.Between(mouseCur.Y, 0, 50))
415 if (MathUtils.Between(mouseCur.Y, menuBarHeight, 50 + menuBarHeight))
419 416 {
420 417 this.camera.Move(new Vector2(0, -4));
421 418 }
422 else if (MathUtils.Between(mouseCur.Y, (FNAGame.height - 50), FNAGame.height))
419 else if (MathUtils.Between(mouseCur.Y, (FNAGame.height - 50 -menuBarHeight), FNAGame.height-menuBarHeight))
423 420 {
424 421 this.camera.Move(new Vector2(0, 4));
425 422 }
@@ -843,6 +840,7
843 840 additionalInfo.Add("mouse delta", delta.ToString());
844 841
845 842 additionalInfo.Add("Tracery Test", this.output);
843
846 844
847 845 debugWindow.Layout(debugInfo, additionalInfo, ref show_another_window);
848 846
@@ -54,7 +54,7
54 54
55 55 ImGui.SetCursorPosX(width - 350);
56 56
57 if (Menu.activeButton("&Budget", show_budget, new Num.Vector4(0.060f, 0.590f, 0.980f, 1f)))
57 if (Menu.activeButton("Budget", show_budget, new Num.Vector4(0.060f, 0.590f, 0.980f, 1f)))
58 58 {
59 59 show_budget = !show_budget;
60 60
You need to be logged in to leave comments. Login now