mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-14 03:39:57 +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();
|
const ImGuiIO& io = ImGui::GetIO();
|
||||||
|
|
||||||
ImGui::Begin("Icons", p_open);
|
if ( ImGui::Begin("Icons", p_open) ) {
|
||||||
|
|
||||||
ImVec2 pos = ImGui::GetCursorScreenPos();
|
ImVec2 pos = ImGui::GetCursorScreenPos();
|
||||||
ImGui::Image((void*)(intptr_t)textureicons, ImVec2(640, 640));
|
ImGui::Image((void*)(intptr_t)textureicons, ImVec2(640, 640));
|
||||||
@@ -372,6 +372,7 @@ void ImGuiToolkit::ShowIconsWindow(bool* p_open)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImGuiToolkit::ToolTip(const char* desc, const char* shortcut)
|
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::SetNextWindowPos(ImVec2(430, 660), ImGuiCond_FirstUseEver);
|
||||||
ImGui::SetNextWindowSize(ImVec2(1150, 220), ImGuiCond_FirstUseEver);
|
ImGui::SetNextWindowSize(ImVec2(1150, 220), ImGuiCond_FirstUseEver);
|
||||||
ImGui::SetNextWindowSizeConstraints(ImVec2(600, 180), ImVec2(FLT_MAX, FLT_MAX));
|
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
|
// window
|
||||||
ImGui::SameLine(0, 0);
|
ImGui::SameLine(0, 0);
|
||||||
static bool numbering = true;
|
static bool numbering = true;
|
||||||
@@ -75,8 +71,8 @@ struct AppLog
|
|||||||
Filter.Draw("Filter", -60.0f);
|
Filter.Draw("Filter", -60.0f);
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
ImGui::BeginChild("scrolling", ImVec2(0,0), false, ImGuiWindowFlags_AlwaysHorizontalScrollbar);
|
if ( ImGui::BeginChild("scrolling", ImVec2(0,0), false, ImGuiWindowFlags_AlwaysHorizontalScrollbar) )
|
||||||
|
{
|
||||||
if (clear)
|
if (clear)
|
||||||
Clear();
|
Clear();
|
||||||
if (copy)
|
if (copy)
|
||||||
@@ -138,8 +134,10 @@ struct AppLog
|
|||||||
ImGui::SetScrollHereY(1.0f);
|
ImGui::SetScrollHereY(1.0f);
|
||||||
|
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static AppLog logs;
|
static AppLog logs;
|
||||||
|
|||||||
Reference in New Issue
Block a user