mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-14 01:58:25 +00:00
[client] overlay: add app_invalidateOverlay
method
This commit is contained in:
parent
ad6fa5a504
commit
0080e5f1b9
@ -102,6 +102,12 @@ int app_renderOverlay(struct Rect * rects, int maxRects);
|
|||||||
|
|
||||||
void app_freeOverlays(void);
|
void app_freeOverlays(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* invalidate the window to update the overlay, if renderTwice is set the imgui
|
||||||
|
* render code will run twice so that auto sized windows are calculated correctly
|
||||||
|
*/
|
||||||
|
void app_invalidateOverlay(bool renderTwice);
|
||||||
|
|
||||||
struct OverlayGraph;
|
struct OverlayGraph;
|
||||||
typedef struct OverlayGraph * GraphHandle;
|
typedef struct OverlayGraph * GraphHandle;
|
||||||
|
|
||||||
|
@ -622,9 +622,6 @@ void app_alert(LG_MsgAlert type, const char * fmt, ...)
|
|||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
overlayAlert_show(type, fmt, args);
|
overlayAlert_show(type, fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
g_state.renderImGuiTwice = true;
|
|
||||||
app_invalidateWindow(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
KeybindHandle app_registerKeybind(int sc, KeybindFn callback, void * opaque, const char * description)
|
KeybindHandle app_registerKeybind(int sc, KeybindFn callback, void * opaque, const char * description)
|
||||||
@ -915,3 +912,10 @@ void app_overlayConfigRegisterTab(const char * title,
|
|||||||
{
|
{
|
||||||
overlayConfig_registerTab(title, callback, udata);
|
overlayConfig_registerTab(title, callback, udata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void app_invalidateOverlay(bool renderTwice)
|
||||||
|
{
|
||||||
|
if (renderTwice)
|
||||||
|
g_state.renderImGuiTwice = true;
|
||||||
|
app_invalidateWindow(false);
|
||||||
|
}
|
||||||
|
@ -130,5 +130,6 @@ void overlayAlert_show(LG_MsgAlert type, const char * fmt, va_list args)
|
|||||||
l_alert.timeout = ALERT_TIMEOUT;
|
l_alert.timeout = ALERT_TIMEOUT;
|
||||||
l_alert.type = type;
|
l_alert.type = type;
|
||||||
l_alert.show = true;
|
l_alert.show = true;
|
||||||
l_alert.redraw = true;
|
|
||||||
|
app_invalidateOverlay(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user