mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-15 20:08:17 +00:00
[client] overlay: use utility function to get ImGui rectangle
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "interface/overlay.h"
|
||||
#include "cimgui.h"
|
||||
#include "overlay_utils.h"
|
||||
|
||||
#include "../main.h"
|
||||
|
||||
@@ -54,13 +55,7 @@ static int fps_render(void * udata, bool interactive, struct Rect * windowRects,
|
||||
atomic_load_explicit(&g_state.fps, memory_order_relaxed),
|
||||
atomic_load_explicit(&g_state.ups, memory_order_relaxed));
|
||||
|
||||
ImVec2 size;
|
||||
igGetWindowPos(&pos);
|
||||
igGetWindowSize(&size);
|
||||
windowRects[0].x = pos.x;
|
||||
windowRects[0].y = pos.y;
|
||||
windowRects[0].w = size.x;
|
||||
windowRects[0].h = size.y;
|
||||
overlayGetImGuiRect(windowRects);
|
||||
igEnd();
|
||||
|
||||
return 1;
|
||||
|
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "ll.h"
|
||||
#include "common/debug.h"
|
||||
#include "overlay_utils.h"
|
||||
|
||||
struct GraphState
|
||||
{
|
||||
@@ -138,14 +139,7 @@ static int graphs_render(void * udata, bool interactive,
|
||||
sizeof(float));
|
||||
};
|
||||
|
||||
ImVec2 size;
|
||||
igGetWindowPos(&pos);
|
||||
igGetWindowSize(&size);
|
||||
windowRects[0].x = pos.x;
|
||||
windowRects[0].y = pos.y;
|
||||
windowRects[0].w = size.x;
|
||||
windowRects[0].h = size.y;
|
||||
|
||||
overlayGetImGuiRect(windowRects);
|
||||
igEnd();
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user