refactor(app): compose settings and developer tools
This commit is contained in:
parent
60a1698ce7
commit
cd7b519f78
24 changed files with 2073 additions and 333 deletions
|
|
@ -57,6 +57,22 @@ public sealed class FramebufferResizeControllerTests
|
|||
Assert.Equal(["viewport:800x600", "camera:1.333", "devtools:800x600"], calls);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DevToolsBindingReleasesExpectedTargetWithoutReplayingResize()
|
||||
{
|
||||
var calls = new List<string>();
|
||||
var owner = new FramebufferResizeController(new ViewportAspectState());
|
||||
var target = new DevTools(calls);
|
||||
using var binding = new FramebufferDevToolsBinding(owner, target);
|
||||
|
||||
owner.Resize(900, 700);
|
||||
binding.Dispose();
|
||||
binding.Dispose();
|
||||
owner.Resize(1000, 800);
|
||||
|
||||
Assert.Equal(["devtools:900x700"], calls);
|
||||
}
|
||||
|
||||
private sealed class Viewport(List<string> calls) : IFramebufferViewportTarget
|
||||
{
|
||||
public void ResizeViewport(int width, int height) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue