sys: Improved view const-correctness

This commit is contained in:
WerWolv
2022-01-10 21:05:37 +01:00
parent e1fb0a5d72
commit e35ea13f60
9 changed files with 33 additions and 31 deletions

View File

@@ -52,11 +52,11 @@ namespace hex::plugin::builtin {
}
}
bool ViewProviderSettings::hasViewMenuItemEntry() {
bool ViewProviderSettings::hasViewMenuItemEntry() const {
return this->isAvailable();
}
bool ViewProviderSettings::isAvailable() {
bool ViewProviderSettings::isAvailable() const {
auto provider = hex::ImHexApi::Provider::get();
return provider != nullptr && provider->hasInterface();

View File

@@ -21,7 +21,6 @@ namespace hex::plugin::builtin {
void ViewSettings::drawContent() {
ImGui::SetNextWindowSize(ImVec2(500, 300) * SharedData::globalScale, ImGuiCond_Always);
if (ImGui::BeginPopupModal(View::toWindowName("hex.builtin.view.settings.name").c_str(), &this->getWindowOpenState(), ImGuiWindowFlags_NoResize)) {
if (ImGui::BeginTabBar("settings")) {
for (auto &[category, entries] : ContentRegistry::Settings::getEntries()) {