4#ifndef MALENA_COLORCHOOSER_H
5#define MALENA_COLORCHOOSER_H
38 enum class Layout { Tabbed, Stacked, GradientOnly, SwatchesOnly };
58 [[nodiscard]]
bool isOpen()
const {
return _open; }
65 void applyVisibility();
66 void setHexMode(
bool hex);
67 void setCurrent(
const sf::Color& c,
bool notify);
72 static std::string toHex(
const sf::Color& c);
85 std::size_t _iSave = 0, _iDone = 0;
87 Layout _layout = Layout::Tabbed;
88 std::size_t _iColor = 0, _iSwatch = 0;
95 std::function<void(
const sf::Color&)> _onColorSelected;
96 std::function<void(
const sf::Color&)> _onColorChanged;
void onColorChanged(std::function< void(const sf::Color &)> cb)
void setSize(const sf::Vector2f &size)
void setPosition(const sf::Vector2f &pos) override
Set the world-space position immediately (no animation).
void setMaxSwatches(int max)
void setLayout(Layout layout)
void onColorSelected(std::function< void(const sf::Color &)> cb)
void setColor(const sf::Color &c)
A reusable swatch grid for choosing a color.
A Photoshop-style HSV color picker: a saturation/value gradient square plus a vertical hue bar....
Two-option segmented selector with animated sliding pill.
Single-line rich text input with horizontal scrolling.
MALENA_API const sf::Font & iconFont()
The bundled Material Icons font (Apache-2.0). Use with Icon codepoints to render crisp UI glyphs.
Vector2< float > Vector2f