fix TerminalEmbed
This commit is contained in:
@@ -12,6 +12,8 @@ void TerminalEmbed::run() {
|
|||||||
modules[m]->run();
|
modules[m]->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleEvents();
|
||||||
|
|
||||||
for(auto m : toClose) {
|
for(auto m : toClose) {
|
||||||
unload(m);
|
unload(m);
|
||||||
}
|
}
|
||||||
@@ -29,3 +31,36 @@ void TerminalEmbed::run() {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TerminalEmbed::onEvent(const Archimedes::Event& event) {
|
||||||
|
|
||||||
|
unsigned int type = getEventType(event);
|
||||||
|
|
||||||
|
if(type == getEventType(Archimedes::DoLoadModuleEvent())) {
|
||||||
|
|
||||||
|
Archimedes::DoLoadModuleEvent& e = (Archimedes::DoLoadModuleEvent&) event;
|
||||||
|
|
||||||
|
startModule(e.module);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
} else if(type == getEventType(Archimedes::DoUnloadModuleEvent())) {
|
||||||
|
|
||||||
|
Archimedes::DoUnloadModuleEvent& e = (Archimedes::DoUnloadModuleEvent&) event;
|
||||||
|
|
||||||
|
stopModule(e.module);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
|
||||||
|
} else if(type == getEventType(Archimedes::LoadModuleEvent())) {
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else if(type == getEventType(Archimedes::UnloadModuleEvent())) {
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} else if(type == getEventType(Archimedes::AnonymousEvent())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
glfw
|
glfw
|
||||||
glew
|
glew
|
||||||
|
|
||||||
|
curl
|
||||||
|
glm
|
||||||
|
nlohmann_json
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
@@ -29,10 +33,12 @@
|
|||||||
$imgui/backends/imgui_impl_opengl3.cpp \
|
$imgui/backends/imgui_impl_opengl3.cpp \
|
||||||
$imgui/misc/cpp/*.cpp \
|
$imgui/misc/cpp/*.cpp \
|
||||||
$imgui/*.cpp \
|
$imgui/*.cpp \
|
||||||
-DRENDERER=1 \
|
-DRENDERER_OPENGL=1 \
|
||||||
-DWINDOW=1 \
|
-DWINDOW_GLFW=1 \
|
||||||
-I include -I $imgui -I . \
|
-I include -I $imgui -I . \
|
||||||
-lGL -lglfw -lGLEW \
|
-lGL -lglfw -lGLEW \
|
||||||
|
$(curl-config --cflags) \
|
||||||
|
$(curl-config --libs) \
|
||||||
-Wall \
|
-Wall \
|
||||||
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
|
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -17,6 +17,10 @@
|
|||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
glfw
|
glfw
|
||||||
glew
|
glew
|
||||||
|
|
||||||
|
curl
|
||||||
|
glm
|
||||||
|
nlohmann_json
|
||||||
];
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
@@ -28,12 +32,14 @@
|
|||||||
$imgui/backends/imgui_impl_opengl3.cpp \
|
$imgui/backends/imgui_impl_opengl3.cpp \
|
||||||
$imgui/misc/cpp/*.cpp \
|
$imgui/misc/cpp/*.cpp \
|
||||||
$imgui/*.cpp \
|
$imgui/*.cpp \
|
||||||
-DRENDERER=1 \
|
-DRENDERER_OPENGL=1 \
|
||||||
-DWINDOW=1 \
|
-DWINDOW_GLFW=1 \
|
||||||
-DTERMINAL_DYNAMIC \
|
-DTERMINAL_DYNAMIC \
|
||||||
-fpic -shared \
|
-fpic -shared \
|
||||||
-I include -I $imgui -I . \
|
-I include -I $imgui -I . \
|
||||||
-lEGL -lglfw -lGLEW \
|
-lEGL -lglfw -lGLEW \
|
||||||
|
$(curl-config --cflags) \
|
||||||
|
$(curl-config --libs) \
|
||||||
-Wall \
|
-Wall \
|
||||||
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
|
-o $name -DIMGUI_IMPL_GLFW_DISABLE_X11
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user