ddnet/src/engine/client/ui.h

36 lines
980 B
C
Raw Normal View History

2007-05-22 15:03:32 +00:00
#ifndef _UI_H
#define _UI_H
#ifdef __cplusplus
extern "C" {
#endif
2007-05-22 15:03:32 +00:00
int ui_update(float mx, float my, float mwx, float mwy, int buttons);
float ui_mouse_x();
float ui_mouse_y();
float ui_mouse_world_x();
float ui_mouse_world_y();
int ui_mouse_button(int index);
2007-11-04 21:36:03 +00:00
void ui_set_hot_item(const void *id);
void ui_set_active_item(const void *id);
2007-07-21 16:33:01 +00:00
void ui_clear_last_active_item();
2007-11-04 21:36:03 +00:00
const void *ui_hot_item();
const void *ui_active_item();
const void *ui_last_active_item();
2007-05-22 15:03:32 +00:00
int ui_mouse_inside(float x, float y, float w, float h);
2007-11-04 21:36:03 +00:00
typedef void (*draw_button_callback)(const void *id, const char *text, int checked, float x, float y, float w, float h, void *extra);
2007-05-22 15:03:32 +00:00
void ui_do_image(int texture, float x, float y, float w, float h);
2007-06-01 02:21:46 +00:00
void ui_do_label(float x, float y, const char *text, float size);
2007-11-04 21:36:03 +00:00
int ui_do_button(const void *id, const char *text, int checked, float x, float y, float w, float h, draw_button_callback draw_func, void *extra);
#ifdef __cplusplus
}
#endif
2007-05-22 15:03:32 +00:00
#endif