mirror of https://github.com/WerWolv/ImHex.git
fix: Static tooltips not rendering correctly
This commit is contained in:
parent
db3072630a
commit
9fd37221f6
|
@ -650,29 +650,24 @@ namespace hex::plugin::builtin {
|
|||
callback(address, data, size);
|
||||
}
|
||||
|
||||
const auto &tooltips = ImHexApi::HexEditor::impl::getTooltips();
|
||||
if (!tooltips.empty()) {
|
||||
ImGui::BeginTooltip();
|
||||
|
||||
for (const auto &[id, tooltip] : tooltips) {
|
||||
for (const auto &[id, tooltip] : ImHexApi::HexEditor::impl::getTooltips()) {
|
||||
if (tooltip.getRegion().overlaps({ address, size })) {
|
||||
ImGui::BeginTooltip();
|
||||
if (ImGui::BeginTable("##tooltips", 1, ImGuiTableFlags_NoHostExtendX | ImGuiTableFlags_RowBg | ImGuiTableFlags_NoClip)) {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
if (tooltip.getRegion().overlaps({ address, size })) {
|
||||
ImGui::ColorButton(tooltip.getValue().c_str(), ImColor(tooltip.getColor()));
|
||||
ImGui::SameLine(0, 10);
|
||||
ImGui::TextUnformatted(tooltip.getValue().c_str());
|
||||
}
|
||||
ImGui::ColorButton(tooltip.getValue().c_str(), ImColor(tooltip.getColor()));
|
||||
ImGui::SameLine(0, 10);
|
||||
ImGui::TextUnformatted(tooltip.getValue().c_str());
|
||||
|
||||
ImGui::PushStyleColor(ImGuiCol_TableRowBg, tooltip.getColor());
|
||||
ImGui::PushStyleColor(ImGuiCol_TableRowBgAlt, tooltip.getColor());
|
||||
ImGui::EndTable();
|
||||
ImGui::PopStyleColor(2);
|
||||
}
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::EndTooltip();
|
||||
}
|
||||
|
||||
ImGui::PopStyleVar();
|
||||
|
|
|
@ -412,6 +412,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.view.yara.header.rules", "规则" },
|
||||
{ "hex.builtin.view.yara.reload", "重新加载" },
|
||||
{ "hex.builtin.view.yara.match", "匹配规则" },
|
||||
//{ "hex.builtin.view.yara.reset", "Reset" },
|
||||
{ "hex.builtin.view.yara.matching", "匹配中..." },
|
||||
{ "hex.builtin.view.yara.error", "Yara 编译器错误: " },
|
||||
{ "hex.builtin.view.yara.header.matches", "匹配" },
|
||||
|
|
|
@ -409,6 +409,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.view.yara.header.rules", "規則" },
|
||||
{ "hex.builtin.view.yara.reload", "重新載入" },
|
||||
{ "hex.builtin.view.yara.match", "Match Rules" },
|
||||
//{ "hex.builtin.view.yara.reset", "Reset" },
|
||||
{ "hex.builtin.view.yara.matching", "Matching..." },
|
||||
{ "hex.builtin.view.yara.error", "Yara 編譯器錯誤:" },
|
||||
{ "hex.builtin.view.yara.header.matches", "Matches" },
|
||||
|
|
Loading…
Reference in New Issue