restructure modules. make GuiModules depend on WindowModule
This commit is contained in:
24
modules/WindowModule/src/WindowModule.cpp
Normal file
24
modules/WindowModule/src/WindowModule.cpp
Normal file
@@ -0,0 +1,24 @@
|
||||
#include "WindowModule.h"
|
||||
|
||||
WindowModule::WindowModule(void* h, Archimedes::App* a) : Module(h, a) {
|
||||
name = "Window";
|
||||
}
|
||||
|
||||
WindowModule::~WindowModule() {
|
||||
if(window)
|
||||
delete window;
|
||||
}
|
||||
|
||||
void WindowModule::onLoad() {
|
||||
|
||||
window = new Archimedes::Window();
|
||||
}
|
||||
|
||||
void WindowModule::run() {
|
||||
|
||||
if(window->shouldClose()) {
|
||||
app->end();
|
||||
}
|
||||
|
||||
window->doFrame();
|
||||
}
|
||||
Reference in New Issue
Block a user