New dirty flag system. Avoid calling updates in rendering (yuck!)

This commit is contained in:
2026-06-02 00:54:36 +02:00
parent 2576ea87bc
commit b29ab443fe
14 changed files with 295 additions and 237 deletions

View File

@@ -20,7 +20,7 @@ public class TestGame : Game
InitializeSystemsDefault();
_uiSystem = new UISystem(Input);
_uiSystem.RenderDebugRects = true;
_uiSystem.RenderDebugRects = false;
ResourceManager.EnableFileWatching();
@@ -73,7 +73,7 @@ public class TestGame : Game
_uiSystem.SetStyleSheet(_styleSheet);
var addButton = new Button("", _defaultFontSet);
var addButton = new Button("Default button", _defaultFontSet);
var removeButton = new Button("Danger button", _defaultFontSet);
@@ -90,7 +90,7 @@ public class TestGame : Game
{
StyleVariant = "Layer01",
ConfineToContents = true,
Anchor = Anchor.TopCenter
Anchor = Anchor.TopCenter,
};
var inputField = new InputField(string.Empty, _defaultFontSet)
@@ -124,6 +124,8 @@ public class TestGame : Game
// ResourceManager.Reload();
// _particleSystem!.RestartEmitter(_emitterId);
}
_uiSystem.SetWindowSize(Renderer.WindowSize);
}
protected override void Render(double deltaTime)