mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-02 05:12:02 +00:00
[client] overlay: guard ImGui table and tab bar scopes
This commit is contained in:
@@ -84,21 +84,24 @@ static void config_renderLGTab(void)
|
||||
{
|
||||
igTextWrapped("%s", LG_DONATION_STR);
|
||||
|
||||
igBeginTable("donations_split", 2, 0, (ImVec2){}, 0.0f);
|
||||
if (igBeginTable("donations_split", 2, 0, (ImVec2){}, 0.0f))
|
||||
{
|
||||
igTableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, fontSize, 0);
|
||||
igTableNextColumn();
|
||||
igBulletText("");
|
||||
igTableNextColumn();
|
||||
overlayTextURL(LG_DONATION_URL, NULL);
|
||||
|
||||
igEndTable();
|
||||
}
|
||||
}
|
||||
|
||||
if (igCollapsingHeader_BoolPtr("Help & Support", NULL,
|
||||
ImGuiTreeNodeFlags_DefaultOpen))
|
||||
{
|
||||
igBeginTable("help_support_split", 2, 0, (ImVec2){}, 0.0f);
|
||||
igTableSetupColumn("", ImGuiTableColumnFlags_WidthFixed, fontSize * 9.0f, 0);
|
||||
if (igBeginTable("help_support_split", 2, 0, (ImVec2){}, 0.0f))
|
||||
{
|
||||
igTableSetupColumn("", ImGuiTableColumnFlags_WidthFixed,
|
||||
fontSize * 9.0f, 0);
|
||||
for(const StringPair * help = LG_HELP_LINKS; help->name; ++help)
|
||||
{
|
||||
igTableNextColumn();
|
||||
@@ -108,6 +111,7 @@ static void config_renderLGTab(void)
|
||||
}
|
||||
igEndTable();
|
||||
}
|
||||
}
|
||||
|
||||
if (igCollapsingHeader_BoolPtr("The Looking Glass Team", NULL,
|
||||
ImGuiTreeNodeFlags_DefaultOpen))
|
||||
@@ -126,10 +130,13 @@ static void config_renderLGTab(void)
|
||||
"do so directly via the following platform%s:",
|
||||
member->donate[1].name ? "s" : "");
|
||||
|
||||
igBeginTable("member_donations_split", 2, 0, (ImVec2){}, 0.0f);
|
||||
if (igBeginTable("member_donations_split", 2, 0,
|
||||
(ImVec2){}, 0.0f))
|
||||
{
|
||||
igTableSetupColumn("", ImGuiTableColumnFlags_WidthFixed,
|
||||
fontSize * 10.0f, 0);
|
||||
for(const StringPair * donate = member->donate; donate->name; ++donate)
|
||||
for(const StringPair * donate = member->donate;
|
||||
donate->name; ++donate)
|
||||
{
|
||||
igTableNextColumn();
|
||||
igBulletText("%s", donate->name);
|
||||
@@ -138,6 +145,7 @@ static void config_renderLGTab(void)
|
||||
}
|
||||
igEndTable();
|
||||
}
|
||||
}
|
||||
igTreePop();
|
||||
igSeparator();
|
||||
}
|
||||
@@ -181,8 +189,8 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
||||
return 1;
|
||||
}
|
||||
|
||||
igBeginTabBar("Configuration#tabs", 0);
|
||||
|
||||
if (igBeginTabBar("Configuration#tabs", 0))
|
||||
{
|
||||
if (igBeginTabItem("About", NULL, 0))
|
||||
{
|
||||
config_renderLGTab();
|
||||
@@ -233,6 +241,7 @@ static int config_render(void * udata, bool interactive, struct Rect * windowRec
|
||||
}
|
||||
|
||||
igEndTabBar();
|
||||
}
|
||||
|
||||
overlayGetImGuiRect(windowRects);
|
||||
igEnd();
|
||||
|
||||
@@ -51,8 +51,8 @@ static void configCallback(void * udata, int * id)
|
||||
igCheckbox("Show timing graphs", &gs.show);
|
||||
igSeparator();
|
||||
|
||||
igBeginTable("graphs_split", 2, 0, (ImVec2){}, 0);
|
||||
|
||||
if (igBeginTable("graphs_split", 2, 0, (ImVec2){}, 0))
|
||||
{
|
||||
GraphHandle graph;
|
||||
ll_lock(gs.graphs);
|
||||
ll_forEachNL(gs.graphs, item, graph)
|
||||
@@ -66,6 +66,7 @@ static void configCallback(void * udata, int * id)
|
||||
|
||||
igEndTable();
|
||||
}
|
||||
}
|
||||
|
||||
static void showTimingKeybind(int sc, void * opaque)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user