Utility/Window: Add new event system, based on signals

Old pooling-based system remains for now but is now deprecated


Former-commit-id: d72e76bab0887baa03286aed78f7ded0a2e31928 [formerly ec70c388b12fb2b91017e54f4a6d67bac1c62335] [formerly 1a6692f78aedb5328b223c04c566d32467db6c92 [formerly 64b8d386ff07df682760ec632d753545ecff7856]]
Former-commit-id: aba6a64e2a31336ae1835bc9954d22488fda2000 [formerly a42eceabc84044a258926385db3944ada398f4fa]
Former-commit-id: 07a208c5693749b325e8574b52e7affa298bb147
This commit is contained in:
Lynix
2016-08-28 01:08:38 +02:00
parent 5528b26a25
commit 9fa65db6b9
7 changed files with 181 additions and 38 deletions

View File

@@ -16,6 +16,7 @@ int main()
Nz::RenderWindow& mainWindow = application.AddWindow<Nz::RenderWindow>();
mainWindow.Create(Nz::VideoMode(800, 600, 32), "Test");
Ndk::World& world = application.AddWorld();
world.GetSystem<Ndk::RenderSystem>().SetGlobalUp(Nz::Vector3f::Down());
world.GetSystem<Ndk::RenderSystem>().SetDefaultBackground(Nz::ColorBackground::New(Nz::Color(192, 100, 100)));
@@ -43,13 +44,6 @@ int main()
while (application.Run())
{
Nz::WindowEvent event;
while (mainWindow.PollEvent(&event))
{
if (event.type == Nz::WindowEventType_Quit)
application.Quit();
}
mainWindow.Display();
}