mirror of
https://github.com/Relintai/sfw.git
synced 2024-11-15 00:06:17 +01:00
Clang format gui.h and cpp.
This commit is contained in:
parent
69988dcae8
commit
c30ef4ce1e
@ -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;
|
||||
|
||||
|
@ -30,7 +30,6 @@ public:
|
||||
|
||||
protected:
|
||||
static GUI *_singleton;
|
||||
|
||||
};
|
||||
|
||||
//--STRIP
|
||||
|
Loading…
Reference in New Issue
Block a user