Added configuration helper types.
This commit is contained in:
26
private/raid_test/frames/config.cpp
Normal file
26
private/raid_test/frames/config.cpp
Normal 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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user