impr: Make right click menus open faster
This commit is contained in:
parent
aa5a3ed080
commit
761bc941a8
@ -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");
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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")) {
|
||||
|
Loading…
Reference in New Issue
Block a user