40 lines
1.3 KiB
C++
40 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#ifdef _DEBUG
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
// Configuració visual de l'editor de tilemap (Debug-only). Carregada des
|
|
// de data/config/editor.yaml; les claus absents cauen als valors compilats
|
|
// a Defaults::Editor. Mateix patró que UiConfig (Meyers singleton + load).
|
|
class EditorConfig {
|
|
public:
|
|
static auto get() -> EditorConfig&;
|
|
|
|
EditorConfig(const EditorConfig&) = delete;
|
|
EditorConfig(EditorConfig&&) = delete;
|
|
auto operator=(const EditorConfig&) -> EditorConfig& = delete;
|
|
auto operator=(EditorConfig&&) -> EditorConfig& = delete;
|
|
|
|
void load(const std::string& file_path);
|
|
|
|
[[nodiscard]] auto pickerMargin() const -> int { return picker_margin_; }
|
|
[[nodiscard]] auto pickerSpacing() const -> int { return picker_spacing_; }
|
|
[[nodiscard]] auto borderArgb() const -> std::uint32_t { return border_argb_; }
|
|
[[nodiscard]] auto pickerBgArgb() const -> std::uint32_t { return picker_bg_argb_; }
|
|
[[nodiscard]] auto pickerHoverArgb() const -> std::uint32_t { return picker_hover_argb_; }
|
|
|
|
private:
|
|
EditorConfig();
|
|
~EditorConfig() = default;
|
|
|
|
int picker_margin_;
|
|
int picker_spacing_;
|
|
std::uint32_t border_argb_;
|
|
std::uint32_t picker_bg_argb_;
|
|
std::uint32_t picker_hover_argb_;
|
|
};
|
|
|
|
#endif // _DEBUG
|