ui/patterns: Added settings tooltips, fixed pattern crash (#464)

* fix: pattern segfault typo

* ui: added few tooltips into settings

Co-authored-by: WerWolv <werwolv98@gmail.com>
This commit is contained in:
Lukas Cone
2022-03-05 23:32:30 +01:00
committed by GitHub
parent f21b22ae15
commit 3da1b3f05d
8 changed files with 17 additions and 2 deletions

View File

@@ -303,6 +303,7 @@ namespace hex::plugin::builtin {
}
});
}
ImGui::InfoTooltip("hex.builtin.setting.folders.add_folder"_lang);
if (ImGui::IconButton(ICON_VS_REMOVE_CLOSE, ImGui::GetCustomColorVec4(ImGuiCustomCol_DescButton), ImVec2(30, 30))) {
if (!folders.empty()) {
@@ -310,6 +311,7 @@ namespace hex::plugin::builtin {
ContentRegistry::Settings::write(dirsSetting, dirsSetting, folders);
}
}
ImGui::InfoTooltip("hex.builtin.setting.folders.remove_folder"_lang);
ImGui::EndGroup();

View File

@@ -50,7 +50,9 @@ namespace hex::plugin::builtin {
auto &[category, settings] = *it;
if (ImGui::BeginTabItem(LangEntry(category))) {
const std::string &categoryDesc = descriptions.count(category) ? descriptions.at(category) : category.name;
ImGui::TextUnformatted(LangEntry(categoryDesc));
LangEntry descriptionEntry{categoryDesc};
ImGui::TextUnformatted(descriptionEntry);
ImGui::InfoTooltip(descriptionEntry);
ImGui::Separator();
for (auto &[name, requiresRestart, callback] : settings) {