yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
palette_editor_widget.h
Go to the documentation of this file.
1#ifndef YAZE_APP_GUI_WIDGETS_PALETTE_EDITOR_WIDGET_H
2#define YAZE_APP_GUI_WIDGETS_PALETTE_EDITOR_WIDGET_H
3
4#include <functional>
5#include <vector>
6
8#include "app/rom.h"
9#include "imgui/imgui.h"
10
11namespace yaze {
12namespace gui {
13
21 public:
23
24 void Initialize(Rom* rom);
25 void Draw();
26
27 // Callback when palette is modified
28 void SetOnPaletteChanged(std::function<void(int palette_id)> callback) {
29 on_palette_changed_ = callback;
30 }
31
32 // Get/Set current editing palette
35
36 private:
38 void DrawColorGrid();
39 void DrawColorPicker();
40
41 Rom* rom_ = nullptr;
44
45 // Callback for palette changes
46 std::function<void(int palette_id)> on_palette_changed_;
47
48 // Temp color for editing (RGB 0-1 range for ImGui)
49 ImVec4 editing_color_{0, 0, 0, 1};
50};
51
52} // namespace gui
53} // namespace yaze
54
55#endif // YAZE_APP_GUI_WIDGETS_PALETTE_EDITOR_WIDGET_H
56
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:71
Simple visual palette editor with color picker.
std::function< void(int palette_id)> on_palette_changed_
void SetOnPaletteChanged(std::function< void(int palette_id)> callback)
Main namespace for the application.