Start on MainGUI
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
#include "TestImgui.h"
|
||||
#include "MainGUI.h"
|
||||
#include "modules/ImguiModule/src/ImguiModule.h"
|
||||
|
||||
TestImgui::TestImgui(Archimedes::App* a, void* h) : Archimedes::Module(a, h) {
|
||||
MainGUI::MainGUI(Archimedes::App* a, void* h) : Archimedes::Module(a, h) {
|
||||
|
||||
name = "TestImgui";
|
||||
name = "MainGUI";
|
||||
|
||||
ImguiModule* im = new ImguiModule(a, nullptr);
|
||||
deps[im->getName()] = im;
|
||||
}
|
||||
|
||||
TestImgui::~TestImgui() {
|
||||
MainGUI::~MainGUI() {
|
||||
|
||||
}
|
||||
|
||||
void TestImgui::onLoad() {
|
||||
void MainGUI::onLoad() {
|
||||
|
||||
ImguiModule* im = (ImguiModule*) moduleInstances["ImguiModule"];
|
||||
|
||||
if(!im) {
|
||||
std::cout << "No ImguiModule for TestImgui!\n";
|
||||
std::cout << "No ImguiModule for MainGUI!\n";
|
||||
std::abort();
|
||||
}
|
||||
|
||||
@@ -26,18 +26,13 @@ void TestImgui::onLoad() {
|
||||
|
||||
}
|
||||
|
||||
void TestImgui::run() {
|
||||
if(demo)
|
||||
ImGui::ShowDemoWindow(&this->demo);
|
||||
else
|
||||
app->end();
|
||||
|
||||
void MainGUI::run() {
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
static float f = 0.0f;
|
||||
static int counter = 0;
|
||||
|
||||
ImGui::Begin("TestImgui Module"); // Create a window called "Hello, world!" and append into it.
|
||||
ImGui::Begin("MainGUI Module"); // Create a window called "Hello, world!" and append into it.
|
||||
|
||||
ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user