BuGUI
BUtton Grid User Interface
Loading...
Searching...
No Matches
button_painter.hpp
1#pragma once
2#include "base_painter.hpp"
3#include <macros/labels.hpp>
4
5namespace bugui
6{
9struct button_painter final : base_painter
10{
11 explicit button_painter();
12
15 void set(labels&& l
16 , uint8_t&& r
17 , uint8_t&& g
18 , uint8_t&& b
19 , uint8_t&& a);
20
24 void set_blink(labels&& l
25 , uint8_t&& r
26 , uint8_t&& g
27 , uint8_t&& b
28 , uint8_t&& a
29 , uint8_t&& blink_r
30 , uint8_t&& blink_g
31 , uint8_t&& blink_b
32 , uint8_t&& blink_a);
33
37 void set_pulse(labels&& l
38 , uint8_t&& r
39 , uint8_t&& g
40 , uint8_t&& b
41 , uint8_t&& a
42 , uint8_t&& pulse_r
43 , uint8_t&& pulse_g
44 , uint8_t&& pulse_b
45 , uint8_t&& pulse_a);
46
48 color get_color() const { return current_color; }
49
51 labels get_label() const { return label; }
52
53private:
54 labels label{};
55};
56
57} // namespace bugui
void set(labels &&l, uint8_t &&r, uint8_t &&g, uint8_t &&b, uint8_t &&a)
Sets the the button labled l to a constant colour. see color::set.
color get_color() const
Retieves the current color.
Definition button_painter.hpp:48
void set_pulse(labels &&l, uint8_t &&r, uint8_t &&g, uint8_t &&b, uint8_t &&a, uint8_t &&pulse_r, uint8_t &&pulse_g, uint8_t &&pulse_b, uint8_t &&pulse_a)
Sets the the button labled l to a smooth cycle between the primaray and secondary colour....
labels get_label() const
Retieves the current button label.
Definition button_painter.hpp:51
void set_blink(labels &&l, uint8_t &&r, uint8_t &&g, uint8_t &&b, uint8_t &&a, uint8_t &&blink_r, uint8_t &&blink_g, uint8_t &&blink_b, uint8_t &&blink_a)
Sets the the button labled l to alternate between the primaray and secondary colour....
Generic colour class holding RGBA values of a primary and a secondary colour. The blinking and pulsin...
Definition color.hpp:12