Added configuration helper types.
This commit is contained in:
@@ -14,6 +14,10 @@ bool Application::init()
|
||||
setMainWindowStyle(ImGuiStyleVar_WindowPadding, ImVec2());
|
||||
setMainWindowStyle(ImGuiStyleVar_WindowBorderSize, 0.f);
|
||||
std::ranges::fill(mFrameOpen, true);
|
||||
|
||||
if (const mijin::Result<> result = mConfig.init(getFS().getPath("/config/persistent.yml")); !result.isSuccess()) {
|
||||
msgError("Error initializing config: {}.", result.getError().message);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -26,6 +30,10 @@ void Application::configureImgui()
|
||||
|
||||
void Application::render()
|
||||
{
|
||||
if (const mijin::Result<> result = mConfig.save(); !result.isSuccess()) {
|
||||
msgError("Error while saving config: {}.", result.getError().message);
|
||||
}
|
||||
|
||||
if (ImGui::BeginMenuBar())
|
||||
{
|
||||
if (ImGui::BeginMenu("File"))
|
||||
|
||||
Reference in New Issue
Block a user