ImGui
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
#include "HydraSceneGraphWindow.h"
|
||||
|
||||
#include <imgui.h>
|
||||
#include <imgui_impl_glfw.h>
|
||||
#include <imgui_impl_opengl3.h>
|
||||
|
||||
void HydraSceneGraphWindow::DrawComponents()
|
||||
{
|
||||
float f = 0.0f;
|
||||
bool val1 = false;
|
||||
bool val2 = true;
|
||||
uint32_t 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::Checkbox("Demo Window", &val1); // Edit bools storing our window open/close state
|
||||
ImGui::Checkbox("Another Window", &val2);
|
||||
|
||||
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);
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
|
||||
ImGui::End();
|
||||
}
|
||||
Reference in New Issue
Block a user