mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-11 01:48:09 +00:00
[client] imgui: update to cimgui 1.86
This commit is contained in:
@@ -808,8 +808,10 @@ int app_renderOverlay(struct Rect * rects, int maxRects)
|
||||
if (g_state.overlayInput)
|
||||
{
|
||||
totalDamage = true;
|
||||
ImDrawList_AddRectFilled(igGetBackgroundDrawListNil(), (ImVec2) { 0.0f , 0.0f },
|
||||
g_state.io->DisplaySize, igGetColorU32Col(ImGuiCol_ModalWindowDimBg, 1.0f), 0, 0);
|
||||
ImDrawList_AddRectFilled(igGetBackgroundDrawList_Nil(), (ImVec2) { 0.0f , 0.0f },
|
||||
g_state.io->DisplaySize,
|
||||
igGetColorU32_Col(ImGuiCol_ModalWindowDimBg, 1.0f),
|
||||
0, 0);
|
||||
|
||||
// bool test;
|
||||
// igShowDemoWindow(&test);
|
||||
|
@@ -51,9 +51,9 @@ static int alert_render(void * udata, bool interactive, struct Rect * windowRect
|
||||
igSetNextWindowBgAlpha(0.8f);
|
||||
igSetNextWindowPos((ImVec2) { screen->x / 2.0f, screen->y / 2.0f }, 0,
|
||||
(ImVec2) { 0.5f, 0.5f });
|
||||
igPushStyleColorU32(ImGuiCol_WindowBg, colours[g_state.alertType]);
|
||||
igPushStyleVarVec2(ImGuiStyleVar_WindowPadding, (ImVec2) { 4.0f , 4.0f });
|
||||
igPushStyleVarVec2(ImGuiStyleVar_WindowMinSize, (ImVec2) { 0.0f , 0.0f });
|
||||
igPushStyleColor_U32(ImGuiCol_WindowBg, colours[g_state.alertType]);
|
||||
igPushStyleVar_Vec2(ImGuiStyleVar_WindowPadding, (ImVec2) { 4.0f , 4.0f });
|
||||
igPushStyleVar_Vec2(ImGuiStyleVar_WindowMinSize, (ImVec2) { 0.0f , 0.0f });
|
||||
|
||||
igBegin(
|
||||
"Alert",
|
||||
|
@@ -78,7 +78,7 @@ static void config_renderLGTab(void)
|
||||
{
|
||||
const float fontSize = igGetFontSize();
|
||||
|
||||
if (igCollapsingHeaderBoolPtr("About", NULL,
|
||||
if (igCollapsingHeader_BoolPtr("About", NULL,
|
||||
ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
igText(LG_COPYRIGHT_STR);
|
||||
@@ -88,7 +88,7 @@ static void config_renderLGTab(void)
|
||||
igTextWrapped(LG_LICENSE_STR);
|
||||
}
|
||||
|
||||
if (igCollapsingHeaderBoolPtr("Help & Support", NULL,
|
||||
if (igCollapsingHeader_BoolPtr("Help & Support", NULL,
|
||||
ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
igBeginTable("split", 2, 0, (ImVec2){}, 0.0f);
|
||||
@@ -103,12 +103,12 @@ static void config_renderLGTab(void)
|
||||
igEndTable();
|
||||
}
|
||||
|
||||
if (igCollapsingHeaderBoolPtr("The Looking Glass Team / Donations", NULL,
|
||||
if (igCollapsingHeader_BoolPtr("The Looking Glass Team / Donations", NULL,
|
||||
ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
for(const struct LGTeamMember * member = LG_TEAM; member->name; ++member)
|
||||
{
|
||||
if (igTreeNodeStr(member->name))
|
||||
if (igTreeNode_Str(member->name))
|
||||
{
|
||||
igSpacing();
|
||||
igTextWrapped(member->blurb);
|
||||
@@ -161,7 +161,7 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
||||
(ImVec2){550, 680},
|
||||
ImGuiCond_FirstUseEver);
|
||||
|
||||
igPushIDInt(id++);
|
||||
igPushID_Int(id++);
|
||||
if (!igBegin("Configuration", NULL, 0))
|
||||
{
|
||||
overlayGetImGuiRect(windowRects);
|
||||
@@ -184,10 +184,10 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
||||
{
|
||||
for (ll_reset(cfg.callbacks); ll_walk(cfg.callbacks, (void **)&cb); )
|
||||
{
|
||||
if (!igCollapsingHeaderBoolPtr(cb->title, NULL, 0))
|
||||
if (!igCollapsingHeader_BoolPtr(cb->title, NULL, 0))
|
||||
continue;
|
||||
|
||||
igPushIDInt(id++);
|
||||
igPushID_Int(id++);
|
||||
cb->callback(cb->udata, &id);
|
||||
igPopID();
|
||||
}
|
||||
@@ -199,7 +199,7 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
||||
if (!igBeginTabItem(cb->title, NULL, 0))
|
||||
continue;
|
||||
|
||||
igPushIDInt(id++);
|
||||
igPushID_Int(id++);
|
||||
cb->callback(cb->udata, &id);
|
||||
igPopID();
|
||||
igEndTabItem();
|
||||
|
@@ -71,8 +71,8 @@ static int fps_render(void * udata, bool interactive, struct Rect * windowRects,
|
||||
ImVec2 pos = {0.0f, 0.0f};
|
||||
igSetNextWindowBgAlpha(0.6f);
|
||||
igSetNextWindowPos(pos, ImGuiCond_FirstUseEver, pos);
|
||||
igPushStyleVarVec2(ImGuiStyleVar_WindowPadding, (ImVec2) { 4.0f , 4.0f });
|
||||
igPushStyleVarVec2(ImGuiStyleVar_WindowMinSize, (ImVec2) { 0.0f , 0.0f });
|
||||
igPushStyleVar_Vec2(ImGuiStyleVar_WindowPadding, (ImVec2) { 4.0f , 4.0f });
|
||||
igPushStyleVar_Vec2(ImGuiStyleVar_WindowMinSize, (ImVec2) { 0.0f , 0.0f });
|
||||
|
||||
igBegin(
|
||||
"FPS",
|
||||
|
@@ -171,7 +171,7 @@ static int graphs_render(void * udata, bool interactive,
|
||||
"%s: min:%4.2f max:%4.2f avg:%4.2f/%4.2fHz",
|
||||
graph->name, metrics.min, metrics.max, metrics.avg, metrics.freq);
|
||||
|
||||
igPlotLinesFloatPtr(
|
||||
igPlotLines_FloatPtr(
|
||||
"",
|
||||
(float *)ringbuffer_getValues(graph->buffer),
|
||||
ringbuffer_getLength(graph->buffer),
|
||||
|
@@ -62,7 +62,8 @@ void overlayTextURL(const char * url, const char * text)
|
||||
{
|
||||
if (igIsItemClicked(ImGuiMouseButton_Left))
|
||||
lgOpenURL(url);
|
||||
overlayAddUnderline(igGetColorU32Vec4(*igGetStyleColorVec4(ImGuiCol_ButtonHovered)));
|
||||
overlayAddUnderline(igGetColorU32_Vec4(
|
||||
*igGetStyleColorVec4(ImGuiCol_ButtonHovered)));
|
||||
igSetMouseCursor(ImGuiMouseCursor_Hand);
|
||||
igSetTooltip("Open in browser: %s", url);
|
||||
}
|
||||
|
Reference in New Issue
Block a user