From c97aa4a4923c276986fb77353b9f1b551173fb0d Mon Sep 17 00:00:00 2001 From: "Sander.M" Date: Tue, 1 Oct 2019 16:38:24 +0300 Subject: [PATCH 1/3] stop scrollpane from vanishing when camera zoomed --- Nez.Portable/UI/Containers/ScrollPane.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Nez.Portable/UI/Containers/ScrollPane.cs b/Nez.Portable/UI/Containers/ScrollPane.cs index 753a5d742..e94828a18 100644 --- a/Nez.Portable/UI/Containers/ScrollPane.cs +++ b/Nez.Portable/UI/Containers/ScrollPane.cs @@ -1213,8 +1213,8 @@ public override void Draw(Batcher batcher, float parentAlpha) Validate(); // setup transform for this group. - if (transform) - ApplyTransform(batcher, ComputeTransform()); + if( transform ) + ApplyTransform(batcher, ComputeTransform() * _stage.Camera.TransformMatrix ); if (_scrollX) _hKnobBounds.X = _hScrollBounds.X + @@ -1320,8 +1320,8 @@ public override void Draw(Batcher batcher, float parentAlpha) public override void DebugRender(Batcher batcher) { - if (transform) - ApplyTransform(batcher, ComputeTransform()); + if( transform ) + ApplyTransform(batcher, ComputeTransform() * _stage.Camera.TransformMatrix ); var scissor = ScissorStack.CalculateScissors(_stage?.Camera, batcher.TransformMatrix, _widgetAreaBounds); From ca819525e21d5a46b0c78808a0d68a78e439c23a Mon Sep 17 00:00:00 2001 From: witlock Date: Sun, 6 Oct 2019 12:11:27 +0300 Subject: [PATCH 2/3] format --- Nez.Portable/UI/Containers/ScrollPane.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Nez.Portable/UI/Containers/ScrollPane.cs b/Nez.Portable/UI/Containers/ScrollPane.cs index e94828a18..20037de80 100644 --- a/Nez.Portable/UI/Containers/ScrollPane.cs +++ b/Nez.Portable/UI/Containers/ScrollPane.cs @@ -1213,8 +1213,8 @@ public override void Draw(Batcher batcher, float parentAlpha) Validate(); // setup transform for this group. - if( transform ) - ApplyTransform(batcher, ComputeTransform() * _stage.Camera.TransformMatrix ); + if (transform) + ApplyTransform(batcher, ComputeTransform() * _stage.Camera.TransformMatrix); if (_scrollX) _hKnobBounds.X = _hScrollBounds.X + @@ -1320,8 +1320,8 @@ public override void Draw(Batcher batcher, float parentAlpha) public override void DebugRender(Batcher batcher) { - if( transform ) - ApplyTransform(batcher, ComputeTransform() * _stage.Camera.TransformMatrix ); + if (transform) + ApplyTransform(batcher, ComputeTransform() * _stage.Camera.TransformMatrix); var scissor = ScissorStack.CalculateScissors(_stage?.Camera, batcher.TransformMatrix, _widgetAreaBounds); From 611b00add553c653de1b133677674bd1147ba61c Mon Sep 17 00:00:00 2001 From: witlock Date: Sun, 6 Oct 2019 12:12:28 +0300 Subject: [PATCH 3/3] format --- Nez.Portable/UI/Containers/ScrollPane.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nez.Portable/UI/Containers/ScrollPane.cs b/Nez.Portable/UI/Containers/ScrollPane.cs index 20037de80..0dd6642b6 100644 --- a/Nez.Portable/UI/Containers/ScrollPane.cs +++ b/Nez.Portable/UI/Containers/ScrollPane.cs @@ -1321,7 +1321,7 @@ public override void Draw(Batcher batcher, float parentAlpha) public override void DebugRender(Batcher batcher) { if (transform) - ApplyTransform(batcher, ComputeTransform() * _stage.Camera.TransformMatrix); + ApplyTransform(batcher, ComputeTransform() * _stage.Camera.TransformMatrix); var scissor = ScissorStack.CalculateScissors(_stage?.Camera, batcher.TransformMatrix, _widgetAreaBounds);