diff --git a/.vscode/launch.json b/.vscode/launch.json
index 77e326e..45e7983 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -1,13 +1,6 @@
{
"version": "0.2.0",
"configurations": [
- {
- "name": "Format Code",
- "type": "debugpy",
- "request": "launch",
- "program": "${workspaceFolder}/clang-format.py",
- "cwd": "${workspaceFolder}"
- },
{
"name": "(gdb) Launch",
"type": "cppdbg",
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
index 1b669bb..a7392f3 100644
--- a/.vscode/tasks.json
+++ b/.vscode/tasks.json
@@ -18,6 +18,20 @@
"kind": "build",
"isDefault": true
}
+ },
+ {
+ "label": "Format",
+ "command": "python ${workspaceFolder}/clang-format.py",
+ "type": "shell",
+ "options": {
+ "cwd": "${workspaceFolder}/"
+ },
+ "presentation": {
+ "reveal": "always",
+ "panel": "new",
+ "focus": true
+ },
+ "problemMatcher": []
}
]
}
\ No newline at end of file
diff --git a/README.md b/README.md
index 7cab15e..c890630 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-#
+#
# RenderD7 as Submodule (0.9.5+)
To use RenderD7 just use this command: `git submodule add https://github.com/NPI-D7/RenderD7` and add `-b v0.9.5` for example for a specific version.
diff --git a/include/renderd7/UI7.hpp b/include/renderd7/UI7.hpp
index fb6220c..b435bf9 100644
--- a/include/renderd7/UI7.hpp
+++ b/include/renderd7/UI7.hpp
@@ -26,6 +26,7 @@ void Deinit();
void Update();
float GetTime();
float GetDeltaTime();
+bool &IsDebugging();
// Internal Function
// Should not be used
void Debug();
diff --git a/source/UI7.cpp b/source/UI7.cpp
index ffa9095..ae98a15 100644
--- a/source/UI7.cpp
+++ b/source/UI7.cpp
@@ -111,7 +111,7 @@ struct UI7_Ctx {
cbackup = R7Vec2();
in_menu = false;
current_menu = UI7ID("");
- debugging = true;
+ debugging = false;
}
float delta;
float time;
@@ -554,4 +554,13 @@ void Debug() {
}
}
+bool &IsDebugging() {
+ if (!UI7CtxValidate()) {
+ // Return a Default Val
+ static bool t = false;
+ return t;
+ }
+ return ui7_ctx->debugging;
+}
+
} // namespace UI7
\ No newline at end of file
diff --git a/source/renderd7.cpp b/source/renderd7.cpp
index 8ae0d29..f9f5caa 100644
--- a/source/renderd7.cpp
+++ b/source/renderd7.cpp
@@ -678,6 +678,7 @@ void RenderD7::RSettings::Draw(void) const {
/// Request a state switch to state RSETTINGS
shared_request[0x00000001] = RSETTINGS;
}
+ UI7::Checkbox("Debug", UI7::IsDebugging());
UI7::EndMenu();
}
} else if (m_state == RMCONFIG) {