about summary refs log tree commit diff
path: root/src/engine/client/ui.h
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2007-05-24 20:54:08 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2007-05-24 20:54:08 +0000
commit82023866ab4c7483652e9d4605290e39ced3bec3 (patch)
treecbff99cb472b4434d18e8e1fe3c556ca194096a6 /src/engine/client/ui.h
parent34e3df396630e9bb271ea8965869d23260900a7d (diff)
downloadzcatch-82023866ab4c7483652e9d4605290e39ced3bec3.tar.gz
zcatch-82023866ab4c7483652e9d4605290e39ced3bec3.zip
large change. moved around all source. splitted server and client into separate files
Diffstat (limited to 'src/engine/client/ui.h')
-rw-r--r--src/engine/client/ui.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/engine/client/ui.h b/src/engine/client/ui.h
new file mode 100644
index 00000000..1a420906
--- /dev/null
+++ b/src/engine/client/ui.h
@@ -0,0 +1,33 @@
+#ifndef _UI_H
+#define _UI_H
+/*
+extern void *hot_item;
+extern void *active_item;
+extern void *becomming_hot_item;
+extern float mouse_x, mouse_y; // in gui space
+extern float mouse_wx, mouse_wy; // in world space
+extern unsigned mouse_buttons;*/
+
+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);
+
+void ui_set_hot_item(void *id);
+void ui_set_active_item(void *id);
+void *ui_hot_item();
+void *ui_active_item();
+
+int ui_mouse_inside(float x, float y, float w, float h);
+
+typedef void (*draw_button_callback)(void *id, const char *text, int checked, float x, float y, float w, float h, void *extra);
+
+void ui_do_image(int texture, float x, float y, float w, float h);
+void ui_do_label(float x, float y, char *text);
+int ui_do_button(void *id, const char *text, int checked, float x, float y, float w, float h, draw_button_callback draw_func, void *extra);
+int ui_do_button(void *id, const char *text, int checked, float x, float y, float w, float h, draw_button_callback draw_func);
+
+#endif