1
0
mirror of synced 2024-11-23 23:31:02 +01:00

impr: Make right click menus open faster

This commit is contained in:
WerWolv 2024-05-01 20:50:35 +02:00
parent aa5a3ed080
commit 761bc941a8
4 changed files with 4 additions and 4 deletions

View File

@ -502,7 +502,7 @@ namespace hex::plugin::builtin {
break;
}
if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsItemHovered()) {
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsItemHovered()) {
rightClickedProvider = tabProvider;
RequestOpenPopup::post("ProviderMenu");
}

View File

@ -590,7 +590,7 @@ namespace hex::plugin::builtin {
void ViewDataProcessor::drawContextMenus(ViewDataProcessor::Workspace &workspace) {
// Handle the right click context menus
if (ImGui::IsMouseClicked(ImGuiMouseButton_Right, true) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) {
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) {
// Clear selections
ImNodes::ClearNodeSelection();
ImNodes::ClearLinkSelection();

View File

@ -531,7 +531,7 @@ namespace hex::plugin::builtin {
}
// Right click menu
if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows) && !ImGui::IsAnyItemHovered())
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows) && !ImGui::IsAnyItemHovered())
RequestOpenPopup::post("hex.builtin.menu.edit");
}

View File

@ -146,7 +146,7 @@ namespace hex::plugin::windows {
}
ImGui::PopItemWidth();
if (ImGui::IsMouseReleased(ImGuiMouseButton_Right) && ImGui::IsItemHovered() && m_portHandle != INVALID_HANDLE_VALUE && !m_transmitting)
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsItemHovered() && m_portHandle != INVALID_HANDLE_VALUE && !m_transmitting)
ImGui::OpenPopup("ConsoleMenu");
if (ImGui::BeginPopup("ConsoleMenu")) {