mirror of
https://github.com/antopilo/Nuake.git
synced 2026-09-09 20:08:57 +03:00
File browser doesn't display 1st element
This commit is contained in:
@@ -322,7 +322,6 @@ namespace Nuake {
|
||||
ImGui::TableNextColumn();
|
||||
if (ImGui::Button("..", ImVec2(100, 100)))
|
||||
m_CurrentDirectory = m_CurrentDirectory->Parent;
|
||||
ImGui::TableNextColumn();
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -330,13 +329,12 @@ namespace Nuake {
|
||||
{
|
||||
for (Ref<Directory>& d : m_CurrentDirectory->Directories)
|
||||
{
|
||||
DrawDirectory(d);
|
||||
|
||||
if (i + 1 % amount != 0)
|
||||
ImGui::TableNextColumn();
|
||||
else
|
||||
ImGui::TableNextRow();
|
||||
|
||||
DrawDirectory(d);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@@ -345,12 +343,11 @@ namespace Nuake {
|
||||
{
|
||||
for (auto f : m_CurrentDirectory->Files)
|
||||
{
|
||||
DrawFile(f);
|
||||
|
||||
if (i - 1 % amount != 0)
|
||||
if (i - 1 % amount != 0 || i == 1)
|
||||
ImGui::TableNextColumn();
|
||||
else
|
||||
ImGui::TableNextRow();
|
||||
DrawFile(f);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user