mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-09 09:11:05 +00:00
[console] Clean up the debug camera window
Now that I have menus, I can close the window.
This commit is contained in:
parent
21a9cbc61b
commit
12b4cd8aba
1 changed files with 49 additions and 44 deletions
|
@ -403,16 +403,61 @@ camera_mouse_trackball (const IE_event_t *ie_event)
|
|||
}
|
||||
|
||||
static void
|
||||
camera_window (void)
|
||||
hs (void)
|
||||
{
|
||||
IMUI_Spacer (debug_imui, imui_size_pixels, 10, imui_size_expand, 100);
|
||||
}
|
||||
|
||||
static imui_window_t system_info_window = {
|
||||
.name = "System Info##window",
|
||||
.xpos = 50,
|
||||
.ypos = 50,
|
||||
};
|
||||
|
||||
static imui_window_t cam_window = {
|
||||
.name = "Debug Camera",
|
||||
};
|
||||
|
||||
static imui_window_t debug_menu = {
|
||||
.name = "Debug##menu",
|
||||
.group_offset = 0,
|
||||
.is_open = true,
|
||||
.no_collapse = true,
|
||||
};
|
||||
|
||||
static imui_window_t renderer_menu = {
|
||||
.name = "Renderer##menu",
|
||||
.group_offset = 1,
|
||||
.reference_gravity = grav_northwest,
|
||||
.anchor_gravity = grav_southwest,
|
||||
};
|
||||
|
||||
static void
|
||||
menu_bar (void)
|
||||
{
|
||||
UI_MenuBar (&debug_menu) {
|
||||
if (UI_MenuItem ("System Info##menu_item")) {
|
||||
system_info_window.is_open = true;
|
||||
}
|
||||
hs ();
|
||||
if (UI_Button ("Camera")) {
|
||||
cam_window.is_open = true;
|
||||
}
|
||||
if (r_funcs->debug_ui) {
|
||||
hs ();
|
||||
// create the menu so the renderer can access it
|
||||
UI_Menu (&renderer_menu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
camera_window (void)
|
||||
{
|
||||
static int cam_state;
|
||||
static int cam_mode;
|
||||
|
||||
int old_mode = cam_mode;
|
||||
cam_window.is_open = true;//force open for now
|
||||
UI_Window (&cam_window) {
|
||||
if (cam_window.is_collapsed) {
|
||||
continue;
|
||||
|
@ -480,46 +525,6 @@ camera_window (void)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
hs (void)
|
||||
{
|
||||
IMUI_Spacer (debug_imui, imui_size_pixels, 10, imui_size_expand, 100);
|
||||
}
|
||||
|
||||
static imui_window_t system_info_window = {
|
||||
.name = "System Info##window",
|
||||
.xpos = 50,
|
||||
.ypos = 50,
|
||||
};
|
||||
|
||||
static imui_window_t renderer_menu = {
|
||||
.name = "Renderer##menu",
|
||||
.group_offset = 1,
|
||||
.reference_gravity = grav_northwest,
|
||||
.anchor_gravity = grav_southwest,
|
||||
};
|
||||
|
||||
static void
|
||||
menu_bar (void)
|
||||
{
|
||||
static imui_window_t menu = {
|
||||
.name = "Debug##menu",
|
||||
.group_offset = 0,
|
||||
.is_open = true,
|
||||
.no_collapse = true,
|
||||
};
|
||||
UI_MenuBar (&menu) {
|
||||
if (UI_MenuItem ("System Info##menu_item")) {
|
||||
system_info_window.is_open = true;
|
||||
}
|
||||
if (r_funcs->debug_ui) {
|
||||
hs ();
|
||||
// create the menu so the renderer can access it
|
||||
UI_Menu (&renderer_menu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool close_debug_pressed = false;
|
||||
static void
|
||||
system_info (void)
|
||||
|
|
Loading…
Reference in a new issue