From 967fbe8072128e819e1a53306700a76fe20c2d50 Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Thu, 28 Aug 2025 13:23:35 +0800 Subject: [PATCH] feat: no click option for mousePad on-screen widget --- VoidLink/Base.lproj/iPad.storyboard | 1 + VoidLink/Base.lproj/iPhone.storyboard | 7 ++- .../Input/CustomOSC/OnScreenButtonState.h | 1 + VoidLink/Input/OnScreenWidgetView.swift | 4 +- VoidLink/mul.lproj/iPad.xcstrings | 30 ++++++++++ VoidLink/mul.lproj/iPhone.xcstrings | 60 ++++++++++++++----- 6 files changed, 84 insertions(+), 19 deletions(-) diff --git a/VoidLink/Base.lproj/iPad.storyboard b/VoidLink/Base.lproj/iPad.storyboard index aac388a0..43893ff1 100644 --- a/VoidLink/Base.lproj/iPad.storyboard +++ b/VoidLink/Base.lproj/iPad.storyboard @@ -1590,6 +1590,7 @@ + diff --git a/VoidLink/Base.lproj/iPhone.storyboard b/VoidLink/Base.lproj/iPhone.storyboard index 709c75e8..4db4ff38 100644 --- a/VoidLink/Base.lproj/iPhone.storyboard +++ b/VoidLink/Base.lproj/iPhone.storyboard @@ -554,9 +554,10 @@ - - - + + + + diff --git a/VoidLink/Input/CustomOSC/OnScreenButtonState.h b/VoidLink/Input/CustomOSC/OnScreenButtonState.h index 12a37e6a..b7635d39 100644 --- a/VoidLink/Input/CustomOSC/OnScreenButtonState.h +++ b/VoidLink/Input/CustomOSC/OnScreenButtonState.h @@ -55,6 +55,7 @@ typedef NS_ENUM(NSInteger, MouseButtonAction) { leftButtonDown, middleButtonDown, rightButtonDown, + noClick }; typedef NS_ENUM(NSInteger, ButtonSlideMode) { diff --git a/VoidLink/Input/OnScreenWidgetView.swift b/VoidLink/Input/OnScreenWidgetView.swift index ee80517e..eb899efc 100644 --- a/VoidLink/Input/OnScreenWidgetView.swift +++ b/VoidLink/Input/OnScreenWidgetView.swift @@ -1224,7 +1224,7 @@ import UIKit LiSendMouseButtonEvent(CChar(BUTTON_ACTION_PRESS), BUTTON_MIDDLE) case .rightButtonDown: LiSendMouseButtonEvent(CChar(BUTTON_ACTION_PRESS), BUTTON_RIGHT) - case .hovering: + case .hovering,.noClick: break default: break @@ -1489,6 +1489,8 @@ import UIKit quickDoubleTapDetected = false } mousePointerMoved = false // reset this flag + case .noClick: + break default: break } diff --git a/VoidLink/mul.lproj/iPad.xcstrings b/VoidLink/mul.lproj/iPad.xcstrings index 520ccfe0..96bfe3a9 100644 --- a/VoidLink/mul.lproj/iPad.xcstrings +++ b/VoidLink/mul.lproj/iPad.xcstrings @@ -1765,6 +1765,36 @@ } } }, + "H8S-aI-EBo.segmentTitles[4]" : { + "comment" : "Class = \"UISegmentedControl\"; H8S-aI-EBo.segmentTitles[4] = \"no click\"; ObjectID = \"H8S-aI-EBo\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "no click" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "无点击" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "無點擊" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "無點擊" + } + } + } + }, "hAo-1k-oYF.text" : { "comment" : "Class = \"UILabel\"; text = \"90° Display Rotation\"; ObjectID = \"hAo-1k-oYF\";", "extractionState" : "extracted_with_value", diff --git a/VoidLink/mul.lproj/iPhone.xcstrings b/VoidLink/mul.lproj/iPhone.xcstrings index 94cd9d69..ef4f3e27 100644 --- a/VoidLink/mul.lproj/iPhone.xcstrings +++ b/VoidLink/mul.lproj/iPhone.xcstrings @@ -2936,95 +2936,125 @@ } }, "tE5-Bm-4OB.segmentTitles[1]" : { - "comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[1] = \"left button\"; ObjectID = \"tE5-Bm-4OB\";", + "comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[1] = \"left btn\"; ObjectID = \"tE5-Bm-4OB\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "left button" + "value" : "left btn" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "左键" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "左鍵" } }, "zh-HK" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "左鍵" } } } }, "tE5-Bm-4OB.segmentTitles[2]" : { - "comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[2] = \"middle button\"; ObjectID = \"tE5-Bm-4OB\";", + "comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[2] = \"middle btn\"; ObjectID = \"tE5-Bm-4OB\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "middle button" + "value" : "middle btn" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "中键" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "中鍵" } }, "zh-HK" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "中鍵" } } } }, "tE5-Bm-4OB.segmentTitles[3]" : { - "comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[3] = \"right button\"; ObjectID = \"tE5-Bm-4OB\";", + "comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[3] = \"right btn\"; ObjectID = \"tE5-Bm-4OB\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "right button" + "value" : "right btn" } }, "zh-Hans" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "右键" } }, "zh-Hant" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "右鍵" } }, "zh-HK" : { "stringUnit" : { - "state" : "translated", + "state" : "needs_review", "value" : "右鍵" } } } }, + "tE5-Bm-4OB.segmentTitles[4]" : { + "comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[4] = \"no click\"; ObjectID = \"tE5-Bm-4OB\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "no click" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "无点击" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "無點擊" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "無點擊" + } + } + } + }, "TJx-6E-kgr.segmentTitles[0]" : { "comment" : "Class = \"UISegmentedControl\"; TJx-6E-kgr.segmentTitles[0] = \"No\"; ObjectID = \"TJx-6E-kgr\";", "extractionState" : "extracted_with_value",