about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/gfx.cpp5
-rw-r--r--src/engine/client/ui.cpp4
-rw-r--r--src/engine/client/ui.h1
3 files changed, 9 insertions, 1 deletions
diff --git a/src/engine/client/gfx.cpp b/src/engine/client/gfx.cpp
index 5280ef5d..cf9e49fd 100644
--- a/src/engine/client/gfx.cpp
+++ b/src/engine/client/gfx.cpp
@@ -160,6 +160,11 @@ bool gfx_init(bool fullscreen)
 	return true;
 }
 
+int gfx_get_video_modes(video_mode *list, int maxcount)
+{
+	return context.getvideomodes((opengl::videomode *)list, maxcount);
+}
+
 int gfx_unload_texture(int index)
 {
 	textures[index].tex.clear();
diff --git a/src/engine/client/ui.cpp b/src/engine/client/ui.cpp
index 8c8dba2c..4c13ca00 100644
--- a/src/engine/client/ui.cpp
+++ b/src/engine/client/ui.cpp
@@ -19,6 +19,7 @@ void gfx_pretty_text(float x, float y, float size, const char *text);
 
 static void *hot_item = 0;
 static void *active_item = 0;
+static void *last_active_item = 0;
 static void *becomming_hot_item = 0;
 static float mouse_x, mouse_y; // in gui space
 static float mouse_wx, mouse_wy; // in world space
@@ -31,9 +32,10 @@ float ui_mouse_world_y() { return mouse_wy; }
 int ui_mouse_button(int index) { return (mouse_buttons>>index)&1; }
 
 void ui_set_hot_item(void *id) { becomming_hot_item = id; }
-void ui_set_active_item(void *id) { active_item = id; }
+void ui_set_active_item(void *id) { active_item = id; last_active_item = id; }
 void *ui_hot_item() { return hot_item; }
 void *ui_active_item() { return active_item; }
+void *ui_last_active_item() { return last_active_item; }
 
 int ui_update(float mx, float my, float mwx, float mwy, int buttons)
 {
diff --git a/src/engine/client/ui.h b/src/engine/client/ui.h
index 268785be..9678453e 100644
--- a/src/engine/client/ui.h
+++ b/src/engine/client/ui.h
@@ -20,6 +20,7 @@ void ui_set_hot_item(void *id);
 void ui_set_active_item(void *id);
 void *ui_hot_item();
 void *ui_active_item();
+void *ui_last_active_item();
 
 int ui_mouse_inside(float x, float y, float w, float h);