(changes 07:51 22.02.2024):

- Move Format into a Task
- Implement Debugging Option into Settings
This commit is contained in:
tobid7 2024-02-22 07:52:01 +01:00
parent 0092edf54f
commit 3a77cd0687
6 changed files with 27 additions and 9 deletions

7
.vscode/launch.json vendored
View File

@ -1,13 +1,6 @@
{ {
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{
"name": "Format Code",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/clang-format.py",
"cwd": "${workspaceFolder}"
},
{ {
"name": "(gdb) Launch", "name": "(gdb) Launch",
"type": "cppdbg", "type": "cppdbg",

14
.vscode/tasks.json vendored
View File

@ -18,6 +18,20 @@
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
} }
},
{
"label": "Format",
"command": "python ${workspaceFolder}/clang-format.py",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}/"
},
"presentation": {
"reveal": "always",
"panel": "new",
"focus": true
},
"problemMatcher": []
} }
] ]
} }

View File

@ -1,4 +1,4 @@
# <img alt="LOGO" src="https://github.com/NPI-D7/RenderD7/raw/main/logo.png" height="90"> # <img alt="LOGO" src="https://dev.npid7.de/tobid7/RenderD7/raw/branch/main/logo.png" height="90">
# RenderD7 as Submodule (0.9.5+) # 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. 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.

View File

@ -26,6 +26,7 @@ void Deinit();
void Update(); void Update();
float GetTime(); float GetTime();
float GetDeltaTime(); float GetDeltaTime();
bool &IsDebugging();
// Internal Function // Internal Function
// Should not be used // Should not be used
void Debug(); void Debug();

View File

@ -111,7 +111,7 @@ struct UI7_Ctx {
cbackup = R7Vec2(); cbackup = R7Vec2();
in_menu = false; in_menu = false;
current_menu = UI7ID(""); current_menu = UI7ID("");
debugging = true; debugging = false;
} }
float delta; float delta;
float time; 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 } // namespace UI7

View File

@ -678,6 +678,7 @@ void RenderD7::RSettings::Draw(void) const {
/// Request a state switch to state RSETTINGS /// Request a state switch to state RSETTINGS
shared_request[0x00000001] = RSETTINGS; shared_request[0x00000001] = RSETTINGS;
} }
UI7::Checkbox("Debug", UI7::IsDebugging());
UI7::EndMenu(); UI7::EndMenu();
} }
} else if (m_state == RMCONFIG) { } else if (m_state == RMCONFIG) {