mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
web: Trigger right click when long touching area
This commit is contained in:
@@ -492,7 +492,7 @@ namespace hex::plugin::builtin {
|
||||
break;
|
||||
}
|
||||
|
||||
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsItemHovered()) {
|
||||
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsItemHovered() && !ImGui::IsMouseDragging(ImGuiMouseButton_Right)) {
|
||||
rightClickedProvider = tabProvider;
|
||||
RequestOpenPopup::post("ProviderMenu");
|
||||
}
|
||||
|
||||
@@ -597,7 +597,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
void ViewDataProcessor::drawContextMenus(ViewDataProcessor::Workspace &workspace) {
|
||||
// Handle the right click context menus
|
||||
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) {
|
||||
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows) && !ImGui::IsMouseDragging(ImGuiMouseButton_Right)) {
|
||||
// Clear selections
|
||||
ImNodes::ClearNodeSelection();
|
||||
ImNodes::ClearLinkSelection();
|
||||
|
||||
@@ -629,7 +629,7 @@ namespace hex::plugin::builtin {
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
// Right click menu
|
||||
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows) && !ImGui::IsAnyItemHovered())
|
||||
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows) && !ImGui::IsAnyItemHovered() && !ImGui::IsMouseDragging(ImGuiMouseButton_Right))
|
||||
RequestOpenPopup::post("hex.builtin.menu.edit");
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
m_textEditor.Render("hex.builtin.view.pattern_editor.name"_lang, textEditorSize, true);
|
||||
TextEditor::FindReplaceHandler *findReplaceHandler = m_textEditor.GetFindReplaceHandler();
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||
if (ImGui::IsMouseDown(ImGuiMouseButton_Right) && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows) && !ImGui::IsMouseDragging(ImGuiMouseButton_Right)) {
|
||||
ImGui::OpenPopup("##pattern_editor_context_menu");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user