27 lines
783 B
C++
27 lines
783 B
C++
#pragma once
|
|
#include <AudioSettings.hpp>
|
|
#include <CPUSettings.hpp>
|
|
#include <GeneralSettings.hpp>
|
|
#include <Window.hpp>
|
|
#include <vector>
|
|
|
|
class SettingsWindow final {
|
|
GeneralSettings generalSettings;
|
|
CPUSettings cpuSettings;
|
|
AudioSettings audioSettings;
|
|
bool applyEnabled = false;
|
|
|
|
std::vector<std::pair<std::string, SettingsTab *>> tabs = {
|
|
{"General", &generalSettings},
|
|
{"CPU", &cpuSettings},
|
|
{"Audio", &audioSettings},
|
|
};
|
|
|
|
public:
|
|
bool isOpen = false;
|
|
bool render();
|
|
explicit SettingsWindow(gui::Window &window) : generalSettings(window) {}
|
|
[[nodiscard]] float getVolumeL() const { return audioSettings.volumeL / 100.f; }
|
|
[[nodiscard]] float getVolumeR() const { return audioSettings.volumeR / 100.f; }
|
|
};
|