feat(editor): spacing, border i centrat vertical del tilepicker via editor.yaml
This commit is contained in:
1 parent
bcbf990a5f
commit
a53cf4b797
7 files changed
+235
-29
No files matched your search
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
// Configuració visual de l'editor de tilemap (Debug-only). Carregada des
|
||||
// de data/editor/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
|
||||
Reference in new issue
Block a user