yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
color.h
Go to the documentation of this file.
1#ifndef YAZE_GUI_COLOR_H
2#define YAZE_GUI_COLOR_H
3
4#include "imgui/imgui.h"
5
6#include <cmath>
7#include <string>
8
9#include "absl/status/status.h"
10#include "app/gfx/bitmap.h"
12
13namespace yaze {
14namespace app {
15namespace gui {
16
17using gfx::SnesColor;
18
19// A utility function to convert an SnesColor object to an ImVec4 with
20// normalized color values
21ImVec4 ConvertSnesColorToImVec4(const SnesColor& color);
22
23// The wrapper function for ImGui::ColorButton that takes a SnesColor reference
24IMGUI_API bool SnesColorButton(absl::string_view id, SnesColor& color,
25 ImGuiColorEditFlags flags = 0,
26 const ImVec2& size_arg = ImVec2(0, 0));
27
28IMGUI_API bool SnesColorEdit4(absl::string_view label, SnesColor* color,
29 ImGuiColorEditFlags flags = 0);
30
31absl::Status DisplayPalette(app::gfx::SnesPalette& palette, bool loaded);
32
33void SelectablePalettePipeline(uint64_t& palette_id, bool& refresh_graphics,
34 gfx::SnesPalette& palette);
35
36} // namespace gui
37} // namespace app
38} // namespace yaze
39
40#endif
IMGUI_API bool SnesColorEdit4(absl::string_view label, SnesColor *color, ImGuiColorEditFlags flags)
Definition color.cc:42
absl::Status DisplayPalette(app::gfx::SnesPalette &palette, bool loaded)
Definition color.cc:56
void SelectablePalettePipeline(uint64_t &palette_id, bool &refresh_graphics, gfx::SnesPalette &palette)
Definition color.cc:129
ImVec4 ConvertSnesColorToImVec4(const SnesColor &color)
Definition color.cc:16
IMGUI_API bool SnesColorButton(absl::string_view id, SnesColor &color, ImGuiColorEditFlags flags, const ImVec2 &size_arg)
Definition color.cc:25
Definition common.cc:21