17 #ifndef HEADER_SUPERTUX_GUI_ITEM_COLORCHANNEL_HPP 18 #define HEADER_SUPERTUX_GUI_ITEM_COLORCHANNEL_HPP 20 #include "gui/menu_item.hpp" 22 #include "util/colorspace_oklab.hpp" 23 #include "video/color.hpp" 30 bool is_linear =
false);
33 virtual void draw(
DrawingContext&,
const Vector& pos,
int menu_width,
bool active)
override;
42 virtual void event(
const SDL_Event& ev)
override;
44 virtual Color get_color()
const override;
48 void change_input(
const std::string& input_) { set_text(input_); }
51 void enable_edit_mode();
52 void add_char(
char c);
72 enum class ChannelType { CHANNEL_L, CHANNEL_C, CHANNEL_H };
77 bool active)
override;
79 virtual int get_width()
const override {
return 64; }
81 virtual void event(
const SDL_Event& ev)
override;
90 ChannelType m_channel;
virtual int get_width() const override
Returns the minimum width of the menu item.
Definition: item_colorchannel_rgba.cpp:78
virtual void draw(DrawingContext &, const Vector &pos, int menu_width, bool active) override
Draws the menu item.
Definition: item_colorchannel_rgba.cpp:62
Definition: item_colorchannel.hpp:26
Definition: item_colorchannel.hpp:69
virtual bool changes_width() const override
Returns true when the width must be recalculated when an action is processed.
Definition: item_colorchannel.hpp:82
Definition: colorspace_oklab.hpp:24
virtual int get_width() const override
Returns the minimum width of the menu item.
Definition: item_colorchannel.hpp:79
virtual void process_action(const MenuAction &action) override
Processes the menu action.
Definition: item_colorchannel_rgba.cpp:164
virtual void event(const SDL_Event &ev) override
Processes the given event.
Definition: item_colorchannel_rgba.cpp:95
virtual bool changes_width() const override
Returns true when the width must be recalculated when an action is processed.
Definition: item_colorchannel.hpp:46
This class provides functions for drawing things on screen.
Definition: drawing_context.hpp:42