Kohi Game Engine
ui_text.h File Reference

Go to the source code of this file.

Data Structures

struct  ui_text
 

Typedefs

typedef enum ui_text_type ui_text_type
 
typedef struct ui_text ui_text
 

Enumerations

enum  ui_text_type { UI_TEXT_TYPE_BITMAP , UI_TEXT_TYPE_SYSTEM }
 

Functions

KAPI b8 ui_text_create (const char *name, ui_text_type type, const char *font_name, u16 font_size, const char *text_content, ui_text *out_text)
 
KAPI void ui_text_destroy (ui_text *text)
 
KAPI void ui_text_position_set (ui_text *u_text, vec3 position)
 Sets the position on the given UI text object. More...
 
KAPI void ui_text_text_set (ui_text *u_text, const char *text)
 Sets the text on the given UI text object. More...
 
KAPI void ui_text_draw (ui_text *u_text)
 Draws the given UI text. More...
 

Typedef Documentation

◆ ui_text

typedef struct ui_text ui_text

◆ ui_text_type

typedef enum ui_text_type ui_text_type

Enumeration Type Documentation

◆ ui_text_type

Enumerator
UI_TEXT_TYPE_BITMAP 
UI_TEXT_TYPE_SYSTEM 

Function Documentation

◆ ui_text_create()

KAPI b8 ui_text_create ( const char *  name,
ui_text_type  type,
const char *  font_name,
u16  font_size,
const char *  text_content,
ui_text out_text 
)

◆ ui_text_destroy()

KAPI void ui_text_destroy ( ui_text text)

◆ ui_text_draw()

KAPI void ui_text_draw ( ui_text u_text)

Draws the given UI text.

Parameters
u_textA pointer to the text to be drawn.

◆ ui_text_position_set()

KAPI void ui_text_position_set ( ui_text u_text,
vec3  position 
)

Sets the position on the given UI text object.

Parameters
u_textA pointer to the UI text whose text will be set.
textThe position to be set.

◆ ui_text_text_set()

KAPI void ui_text_text_set ( ui_text u_text,
const char *  text 
)

Sets the text on the given UI text object.

Parameters
u_textA pointer to the UI text whose text will be set.
textThe text to be set.