ImguiModule doesn't need a run function
This commit is contained in:
@@ -61,23 +61,3 @@ void ImguiModule::onLoad() {
|
|||||||
ImGui_ImplGlfw_NewFrame();
|
ImGui_ImplGlfw_NewFrame();
|
||||||
ImGui::NewFrame();
|
ImGui::NewFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImguiModule::run() {
|
|
||||||
ImGuiIO& io = ImGui::GetIO();
|
|
||||||
static float f = 0.0f;
|
|
||||||
static int counter = 0;
|
|
||||||
|
|
||||||
ImGui::Begin("Hello, world!"); // 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)
|
|
||||||
|
|
||||||
ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
|
|
||||||
|
|
||||||
if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
|
|
||||||
counter++;
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Text("counter = %d", counter);
|
|
||||||
|
|
||||||
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
|
|
||||||
ImGui::End();
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ class ImguiModule : public Archimedes::GuiModule {
|
|||||||
|
|
||||||
bool onEvent(const Archimedes::Event& e) { return false; }
|
bool onEvent(const Archimedes::Event& e) { return false; }
|
||||||
|
|
||||||
void run();
|
|
||||||
|
|
||||||
ImGuiContext* getContext() { return context; }
|
ImGuiContext* getContext() { return context; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user