fix: Store download buttons only working in order
This commit is contained in:
parent
a8c9e96b72
commit
c605986e8a
@ -44,6 +44,7 @@ namespace hex {
|
|||||||
|
|
||||||
ImGui::TableHeadersRow();
|
ImGui::TableHeadersRow();
|
||||||
|
|
||||||
|
u32 id = 1;
|
||||||
for (auto &entry : content) {
|
for (auto &entry : content) {
|
||||||
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeight() + 4.0F * ImGui::GetStyle().FramePadding.y);
|
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeight() + 4.0F * ImGui::GetStyle().FramePadding.y);
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
@ -52,6 +53,7 @@ namespace hex {
|
|||||||
ImGui::TextUnformatted(entry.description.c_str());
|
ImGui::TextUnformatted(entry.description.c_str());
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
|
ImGui::PushID(id);
|
||||||
ImGui::BeginDisabled(this->m_download.valid() && this->m_download.wait_for(0s) != std::future_status::ready);
|
ImGui::BeginDisabled(this->m_download.valid() && this->m_download.wait_for(0s) != std::future_status::ready);
|
||||||
{
|
{
|
||||||
if (entry.downloading) {
|
if (entry.downloading) {
|
||||||
@ -90,6 +92,8 @@ namespace hex {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::EndDisabled();
|
ImGui::EndDisabled();
|
||||||
|
ImGui::PopID();
|
||||||
|
id++;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user