Files
kaizen/src/frontend/SettingsWindow.hpp
2025-06-26 23:33:03 +02:00

24 lines
732 B
C++

#pragma once
#include <AudioSettings.hpp>
#include <CPUSettings.hpp>
#include <ImGuiImpl/TabBar.hpp>
#include <ImGuiImpl/PopupWindow.hpp>
#include <ImGuiImpl/PushButton.hpp>
#include <SDL3/SDL.h>
#include <memory>
class SettingsWindow final {
gui::PushButton apply{"Apply", "", false}, savesFolder{"Open", "Save path: {}"};
nlohmann::json settings;
CPUSettings cpuSettings;
AudioSettings audioSettings;
public:
gui::PopupWindow popup{"Emulator Settings"};
bool render();
SettingsWindow();
[[nodiscard]] float getVolumeL() const { return audioSettings.volumeL.getValue() / 100.f; }
[[nodiscard]] float getVolumeR() const { return audioSettings.volumeR.getValue() / 100.f; }
gui::TabBar tabs{"SettingsTabs"};
};