impr: Add close button to toolbar
This commit is contained in:
parent
5f8c813aa7
commit
f5cbcce112
@ -569,6 +569,12 @@ namespace hex {
|
||||
ImGui::SameLine();
|
||||
}
|
||||
|
||||
if (auto provider = ImHexApi::Provider::get(); provider != nullptr) {
|
||||
if (ImGui::CloseButton(ImGui::GetID("ProviderCloseButton"), ImGui::GetCursorScreenPos() + ImVec2(ImGui::GetContentRegionAvail().x - 17_scaled, 3_scaled))) {
|
||||
ImHexApi::Provider::remove(provider);
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndMenuBar();
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@ namespace hex::plugin::builtin {
|
||||
EventManager::subscribe<EventProviderOpened>([this](auto *newProvider) {
|
||||
if (newProvider == this)
|
||||
return;
|
||||
|
||||
|
||||
ImHexApi::Provider::remove(this, true);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user