ui
This commit is contained in:
parent
617d86276a
commit
91b851acd6
8 changed files with 204 additions and 8 deletions
|
|
@ -148,6 +148,31 @@ void suic_draw_cube_wires(float x, float y, float z, float width, float height,
|
|||
DrawCubeWires((Vector3){x, y, z}, width, height, length, (Color){r, g, b, a});
|
||||
}
|
||||
|
||||
// 2D Drawing (UI Framework Utils)
|
||||
void suic_draw_text(const char *text, int x, int y, int font_size, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
|
||||
DrawText(text, x, y, font_size, (Color){r, g, b, a});
|
||||
}
|
||||
|
||||
void suic_draw_rectangle(int x, int y, int width, int height, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
|
||||
DrawRectangle(x, y, width, height, (Color){r, g, b, a});
|
||||
}
|
||||
|
||||
void suic_draw_rectangle_lines(int x, int y, int width, int height, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
|
||||
DrawRectangleLines(x, y, width, height, (Color){r, g, b, a});
|
||||
}
|
||||
|
||||
int suic_measure_text(const char *text, int font_size) {
|
||||
return MeasureText(text, font_size);
|
||||
}
|
||||
|
||||
void suic_draw_circle(int center_x, int center_y, float radius, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
|
||||
DrawCircle(center_x, center_y, radius, (Color){r, g, b, a});
|
||||
}
|
||||
|
||||
void suic_draw_line(int start_x, int start_y, int end_x, int end_y, unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
|
||||
DrawLine(start_x, start_y, end_x, end_y, (Color){r, g, b, a});
|
||||
}
|
||||
|
||||
// Input - Keyboard
|
||||
bool suic_is_key_down(int key) { return IsKeyDown(key); }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue