2026-03-27 09:51:53 +03:00
|
|
|
#pragma once
|
|
|
|
|
#include "Element.hpp"
|
|
|
|
|
|
|
|
|
|
namespace GUIStuff {
|
|
|
|
|
|
|
|
|
|
struct ColorPickerButtonData {
|
2026-03-30 17:05:24 +03:00
|
|
|
bool hasAlpha = true;
|
2026-03-27 09:51:53 +03:00
|
|
|
std::function<void()> onEdit;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
template <typename T> class ColorPickerButton : public Element {
|
|
|
|
|
public:
|
|
|
|
|
ColorPickerButton(GUIManager& gui);
|
2026-03-30 17:05:24 +03:00
|
|
|
void layout(T* val, const ColorPickerButtonData& d);
|
2026-03-27 09:51:53 +03:00
|
|
|
private:
|
|
|
|
|
ColorPickerButtonData data;
|
|
|
|
|
bool isOpen = false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|