-
Notifications
You must be signed in to change notification settings - Fork 4
/
renderer.h
44 lines (36 loc) · 1.03 KB
/
renderer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#pragma once
#include <stdint.h>
enum gradient_t
{
horizontal,
vertical,
};
enum font_t
{
font_menu,
font_esp,
font_esp_small,
};
class c_render
{
public:
bool fonts_initialized{ };
c_render( );
~c_render( );
void start( );
void finish( );
void rect( color_t color, float x, float y, float w, float h );
void filled_rect( color_t color, float x, float y, float w, float h );
void _filled_rect( color_t color, float x, float y, float w, float h );
void rect_gradient( gradient_t, color_t start, color_t end, float x, float y, float w, float h );
void line( color_t color, float x1, float y1, float x2, float y2 );
void string( font_t, color_t color, float x, float y, bool centered, const char* fmt, ... );
void _string( font_t, color_t color, float x, float y, bool centered, const char* fmt, ... );
void _string( font_t, color_t color, float x, float y, bool centered, const wchar_t* fmt, ... );
float text_width( font_t, const char* fmt, ... );
private:
void create_fonts( );
HFont m_menu;
HFont m_esp;
HFont m_esp_small;
};