Added configuration helper types.

This commit is contained in:
Patrick Wuttke
2025-09-22 17:12:35 +02:00
parent 9bc56a2748
commit 20020318e1
11 changed files with 627 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#include "raid_test/frames/config.hpp"
#include <imgui.h>
#include "raid/config.hpp"
#include "raid_test/application.hpp"
namespace raid_test
{
void renderConfig(bool& open)
{
if (!ImGui::Begin(CONFIG_TITLE, &open))
{
ImGui::End();
return;
}
static constexpr const char* TEST_BOOL_PATH = "test/section/bool";
bool testBool = gApplication.getConfig().getValue(TEST_BOOL_PATH).asBool();
if (ImGui::Checkbox("Test Bool", &testBool)) {
gApplication.getConfig().setValue(TEST_BOOL_PATH, testBool);
}
ImGui::End();
}
}

View File

@@ -0,0 +1,14 @@
#pragma once
#if !defined(RAID_TEST_FRAMES_CONFIG_HPP_INCLUDED)
#define RAID_TEST_FRAMES_CONFIG_HPP_INCLUDED 1
namespace raid_test
{
inline constexpr const char* CONFIG_TITLE = "Config";
void renderConfig(bool& open);
} // namespace raid_test
#endif // !defined(RAID_TEST_FRAMES_CONFIG_HPP_INCLUDED)

View File

@@ -1,6 +1,7 @@
#include "raid_test/frames/data_table.hpp"
#include <array>
#include <chrono>
#include <random>
#include <imgui.h>