mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-13 11:19:58 +01:00
imgui code cleanup
This commit is contained in:
@@ -345,7 +345,7 @@ void ImGuiToolkit::ShowIconsWindow(bool* p_open)
|
||||
|
||||
const ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
ImGui::Begin("Icons", p_open);
|
||||
if ( ImGui::Begin("Icons", p_open) ) {
|
||||
|
||||
ImVec2 pos = ImGui::GetCursorScreenPos();
|
||||
ImGui::Image((void*)(intptr_t)textureicons, ImVec2(640, 640));
|
||||
@@ -372,6 +372,7 @@ void ImGuiToolkit::ShowIconsWindow(bool* p_open)
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
|
||||
void ImGuiToolkit::ToolTip(const char* desc, const char* shortcut)
|
||||
|
||||
12
Log.cpp
12
Log.cpp
@@ -57,12 +57,8 @@ struct AppLog
|
||||
ImGui::SetNextWindowPos(ImVec2(430, 660), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSize(ImVec2(1150, 220), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSizeConstraints(ImVec2(600, 180), ImVec2(FLT_MAX, FLT_MAX));
|
||||
if (!ImGui::Begin(title, p_open))
|
||||
if (ImGui::Begin(title, p_open))
|
||||
{
|
||||
ImGui::End();
|
||||
return;
|
||||
}
|
||||
|
||||
// window
|
||||
ImGui::SameLine(0, 0);
|
||||
static bool numbering = true;
|
||||
@@ -75,8 +71,8 @@ struct AppLog
|
||||
Filter.Draw("Filter", -60.0f);
|
||||
|
||||
ImGui::Separator();
|
||||
ImGui::BeginChild("scrolling", ImVec2(0,0), false, ImGuiWindowFlags_AlwaysHorizontalScrollbar);
|
||||
|
||||
if ( ImGui::BeginChild("scrolling", ImVec2(0,0), false, ImGuiWindowFlags_AlwaysHorizontalScrollbar) )
|
||||
{
|
||||
if (clear)
|
||||
Clear();
|
||||
if (copy)
|
||||
@@ -138,8 +134,10 @@ struct AppLog
|
||||
ImGui::SetScrollHereY(1.0f);
|
||||
|
||||
ImGui::EndChild();
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static AppLog logs;
|
||||
|
||||
Reference in New Issue
Block a user