[console] Add a screenshot button to the debug ui

Saves me having to bind a key.
This commit is contained in:
Bill Currie 2023-07-12 23:23:57 +09:00
parent 1404b85846
commit 0a260129a8

View file

@ -2,6 +2,7 @@
# include "config.h"
#endif
#include "QF/cbuf.h"
#include "QF/cvar.h"
#include "QF/input.h"
#include "QF/keys.h"
@ -169,6 +170,7 @@ con_debug_f (void *data, const cvar_t *cvar)
if (!con_debug) {
IE_Set_Focus (debug_saved_focus);
IMT_SetContext (debug_saved_context);
r_override_camera = false;
} else {
IMUI_SetSize (debug_imui, deb_xlen, deb_ylen);
}
@ -512,6 +514,11 @@ static imui_window_t window = {
if (UI_Button ("Close Debug")) {
close_debug_pressed = true;
}
IMUI_Spacer (debug_imui, imui_size_pixels, 10,
imui_size_expand, 100);
if (UI_Button ("Screenshot")) {
Cbuf_AddText (con_data.cbuf, "screenshot\n");
}
UI_FlexibleSpace ();
}
#if 0