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

@@ -6,6 +6,7 @@
#include <array>
#include "raid/raid.hpp"
#include "./frames/config.hpp"
#include "./frames/data_table.hpp"
namespace raid_test
@@ -20,12 +21,17 @@ private:
render_fn_t render;
};
static constexpr Frame FRAMES[] = {
{.title = CONFIG_TITLE, .render = &renderConfig},
{.title = DATA_TABLE_TITLE, .render = &renderDataTable}
};
static constexpr std::size_t NUM_FRAMES = sizeof(FRAMES) / sizeof(FRAMES[0]);
raid::FileConfig mConfig;
bool mShowMetrics = false;
std::array<bool, NUM_FRAMES> mFrameOpen{};
public:
[[nodiscard]]
raid::FileConfig& getConfig() noexcept { return mConfig; }
protected:
bool init() override;
void configureImgui() override;