1
0
mirror of synced 2025-01-19 01:24:15 +01:00

impr: Added tooltips to toolbar buttons

This commit is contained in:
WerWolv 2024-07-03 16:58:25 +02:00
parent dd607621d7
commit 7cd36b80eb

View File

@ -412,7 +412,8 @@ namespace hex::plugin::builtin {
ContentRegistry::Interface::addToolbarItem([] {
for (const auto &menuItem : ContentRegistry::Interface::impl::getToolbarMenuItems()) {
if (menuItem->unlocalizedNames.back().get() == ContentRegistry::Interface::impl::SeparatorValue) {
const auto &unlocalizedItemName = menuItem->unlocalizedNames.back();
if (unlocalizedItemName.get() == ContentRegistry::Interface::impl::SeparatorValue) {
ImGui::SeparatorEx(ImGuiSeparatorFlags_Vertical);
continue;
}
@ -421,6 +422,8 @@ namespace hex::plugin::builtin {
if (ImGuiExt::ToolBarButton(menuItem->icon.glyph.c_str(), ImGuiExt::GetCustomColorVec4(ImGuiCustomCol(menuItem->icon.color)))) {
menuItem->callback();
}
ImGuiExt::InfoTooltip(Lang(unlocalizedItemName));
ImGui::EndDisabled();
}
});