Clang format gui.h and cpp.

This commit is contained in:
Relintai 2024-09-14 12:10:34 +02:00
parent 69988dcae8
commit c30ef4ce1e
2 changed files with 83 additions and 86 deletions

View File

@ -9,9 +9,9 @@
#include "core/math_defs.h"
#include "core/sfw_time.h"
#include "render_core/app_window.h"
#include "render_core/input.h"
#include "render_core/input_map.h"
#include "render_core/app_window.h"
#include "core/sfw_core.h"
#include "object/core_string_names.h"
@ -24,15 +24,14 @@
//--STRIP
void GUI::test() {
ImGuiIO& io = ImGui::GetIO(); (void)io;
ImGuiIO &io = ImGui::GetIO();
(void)io;
// Our state
static bool show_demo_window = true;
static bool show_another_window = false;
static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
// 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
{
static float f = 0.0f;
@ -57,8 +56,7 @@ void GUI::test() {
}
// 3. Show another simple window.
if (show_another_window)
{
if (show_another_window) {
ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
ImGui::Text("Hello from another window!");
if (ImGui::Button("Close Me"))
@ -84,7 +82,8 @@ void GUI::initialize() {
// Setup Dear ImGui context
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO(); (void)io;
ImGuiIO &io = ImGui::GetIO();
(void)io;
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
@ -155,4 +154,3 @@ GUI *GUI::get_singleton() {
}
GUI *GUI::_singleton = NULL;

View File

@ -30,7 +30,6 @@ public:
protected:
static GUI *_singleton;
};
//--STRIP