1
0
mirror of synced 2025-02-20 04:01:01 +01:00

fix: Store download buttons only working in order

This commit is contained in:
WerWolv 2021-09-09 01:57:11 +02:00
parent a8c9e96b72
commit c605986e8a

View File

@ -44,6 +44,7 @@ namespace hex {
ImGui::TableHeadersRow();
u32 id = 1;
for (auto &entry : content) {
ImGui::TableNextRow(ImGuiTableRowFlags_None, ImGui::GetTextLineHeight() + 4.0F * ImGui::GetStyle().FramePadding.y);
ImGui::TableNextColumn();
@ -52,6 +53,7 @@ namespace hex {
ImGui::TextUnformatted(entry.description.c_str());
ImGui::TableNextColumn();
ImGui::PushID(id);
ImGui::BeginDisabled(this->m_download.valid() && this->m_download.wait_for(0s) != std::future_status::ready);
{
if (entry.downloading) {
@ -90,6 +92,8 @@ namespace hex {
}
}
ImGui::EndDisabled();
ImGui::PopID();
id++;
}
ImGui::EndTable();