BuGUI
BUtton Grid User Interface
Loading...
Searching...
No Matches
base_painter.hpp
1#pragma once
2#include <color/color.hpp>
3
4namespace bugui
5{
8struct base_painter
9{
11 void set_color(uint8_t&& r = 0
12 , uint8_t&& g = 0
13 , uint8_t&& b = 0
14 , uint8_t&& a = 255);
15
17 void set_blink(uint8_t&& red
18 , uint8_t&& green
19 , uint8_t&& blue
20 , uint8_t&& alpha = 255
21 , uint8_t&& secondary_red = 0
22 , uint8_t&& secondary_green = 0
23 , uint8_t&& secondary_blue = 0
24 , uint8_t&& secondary_alpha = 255);
25
27 void set_pulse(uint8_t&& red
28 , uint8_t&& green
29 , uint8_t&& blue
30 , uint8_t&& alpha = 255
31 , uint8_t&& secondary_red = 0
32 , uint8_t&& secondary_green = 0
33 , uint8_t&& secondary_blue = 0
34 , uint8_t&& secondary_alpha = 255);
35
36protected:
37 explicit base_painter();
38
39 color current_color;
40};
41
42} // namespace bugui
void set_pulse(uint8_t &&red, uint8_t &&green, uint8_t &&blue, uint8_t &&alpha=255, uint8_t &&secondary_red=0, uint8_t &&secondary_green=0, uint8_t &&secondary_blue=0, uint8_t &&secondary_alpha=255)
Sets primary and secondary colour along with the pulsing state.
void set_blink(uint8_t &&red, uint8_t &&green, uint8_t &&blue, uint8_t &&alpha=255, uint8_t &&secondary_red=0, uint8_t &&secondary_green=0, uint8_t &&secondary_blue=0, uint8_t &&secondary_alpha=255)
Sets primary and secondary colour along with the blinking state.
void set_color(uint8_t &&r=0, uint8_t &&g=0, uint8_t &&b=0, uint8_t &&a=255)
Sets the primary colour along with the constant state.
Generic colour class holding RGBA values of a primary and a secondary colour. The blinking and pulsin...
Definition color.hpp:12