- button down action for MOUSEPAD
This commit is contained in:
@@ -1164,7 +1164,7 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="z5Q-bW-WQ8" userLabel="widgetPanelStack" customClass="WidgetPanelStackView">
|
||||
<rect key="frame" x="325" y="156" width="650" height="267.5"/>
|
||||
<rect key="frame" x="325" y="156" width="650" height="308.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Profile:" textAlignment="center" lineBreakMode="tailTruncation" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iel-xl-xd9">
|
||||
<rect key="frame" x="0.0" y="0.0" width="650" height="37"/>
|
||||
@@ -1296,6 +1296,31 @@
|
||||
</slider>
|
||||
</subviews>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="GMQ-EQ-Hum" userLabel="mouseDownButtonStack">
|
||||
<rect key="frame" x="0.0" y="277.5" width="650" height="31"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Down Button" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c1r-Hf-b7t" userLabel="mouseDownButtonLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="31"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="eNs-gl-lQc"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="H8S-aI-EBo">
|
||||
<rect key="frame" x="160" y="0.0" width="490" height="32"/>
|
||||
<segments>
|
||||
<segment title="hovering"/>
|
||||
<segment title="left button"/>
|
||||
<segment title="middle button"/>
|
||||
<segment title="right button"/>
|
||||
</segments>
|
||||
<color key="tintColor" systemColor="systemGray2Color"/>
|
||||
<color key="selectedSegmentTintColor" red="0.23136288839999999" green="0.45776400810000001" blue="0.5149240678" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="650" id="Rav-Dp-9pI"/>
|
||||
@@ -1322,6 +1347,8 @@
|
||||
<outlet property="exitButton" destination="7bp-Wn-j9n" id="Kku-3T-RSO"/>
|
||||
<outlet property="loadButton" destination="OId-gk-Wkg" id="adP-54-1ir"/>
|
||||
<outlet property="loadConfigTipLabel" destination="xfv-K0-1CO" id="GeX-Qc-CLA"/>
|
||||
<outlet property="mouseButtonDownSelector" destination="H8S-aI-EBo" id="em1-fK-Cpb"/>
|
||||
<outlet property="mouseDownButtonStack" destination="GMQ-EQ-Hum" id="sxb-40-3NI"/>
|
||||
<outlet property="saveButton" destination="uda-zt-xrG" id="FyB-WY-rri"/>
|
||||
<outlet property="sensitivityLabel" destination="vJs-pg-hHe" id="RRw-Zq-LUa"/>
|
||||
<outlet property="sensitivitySlider" destination="DiG-XX-r8c" id="fz5-Et-1WV"/>
|
||||
@@ -1450,6 +1477,9 @@
|
||||
<systemColor name="systemBrownColor">
|
||||
<color red="0.63529411759999999" green="0.51764705879999995" blue="0.36862745099999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemGray2Color">
|
||||
<color red="0.68235294120000001" green="0.68235294120000001" blue="0.69803921570000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
<systemColor name="systemTealColor">
|
||||
<color red="0.18823529410000001" green="0.69019607839999997" blue="0.78039215689999997" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</systemColor>
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" ambiguous="YES" axis="vertical" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="BVp-3O-vZ7" userLabel="widgetPanelStack" customClass="WidgetPanelStackView">
|
||||
<rect key="frame" x="325" y="226" width="550" height="217.5"/>
|
||||
<rect key="frame" x="325" y="226" width="550" height="244.5"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Profile:" textAlignment="center" lineBreakMode="tailTruncation" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="f46-Pt-0Pv">
|
||||
<rect key="frame" x="0.0" y="0.0" width="550" height="28"/>
|
||||
@@ -498,6 +498,34 @@
|
||||
<constraint firstAttribute="height" constant="20" id="5gJ-L7-twt"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lEZ-1a-89J" userLabel="mouseButtonDownStack">
|
||||
<rect key="frame" x="0.0" y="224.5" width="550" height="20"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Button Down" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ozU-7C-qKE" userLabel="sensitivityFactorLabel">
|
||||
<rect key="frame" x="0.0" y="0.0" width="160" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="160" id="Sii-hk-yFR"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="tE5-Bm-4OB">
|
||||
<rect key="frame" x="160" y="0.0" width="390" height="21"/>
|
||||
<segments>
|
||||
<segment title="hovering"/>
|
||||
<segment title="left button"/>
|
||||
<segment title="middle button"/>
|
||||
<segment title="right button"/>
|
||||
</segments>
|
||||
<color key="tintColor" systemColor="systemGray2Color"/>
|
||||
<color key="selectedSegmentTintColor" red="0.23136288839999999" green="0.45776400810000001" blue="0.5149240678" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
</segmentedControl>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="Vgj-B6-LEU"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="550" id="fNg-fG-rV5"/>
|
||||
@@ -518,6 +546,8 @@
|
||||
<outlet property="chevronView" destination="Zll-IP-PFt" id="MGR-C0-h57"/>
|
||||
<outlet property="currentProfileLabel" destination="f46-Pt-0Pv" id="BjA-jF-t86"/>
|
||||
<outlet property="loadConfigTipLabel" destination="9Gg-66-UdB" id="cMS-ly-En0"/>
|
||||
<outlet property="mouseButtonDownSelector" destination="tE5-Bm-4OB" id="9fh-99-8pu"/>
|
||||
<outlet property="mouseDownButtonStack" destination="lEZ-1a-89J" id="R6t-gC-kcD"/>
|
||||
<outlet property="sensitivityLabel" destination="dJh-Ck-ugh" id="vso-QW-vxX"/>
|
||||
<outlet property="sensitivitySlider" destination="Vqk-gH-0xO" id="CVC-XX-0LQ"/>
|
||||
<outlet property="sensitivityStack" destination="fem-TG-vr3" id="O9M-Ip-ZlT"/>
|
||||
|
||||
@@ -366,6 +366,7 @@ static CGRect streamViewBounds;
|
||||
buttonState.backgroundAlpha = widgetView.backgroundAlpha;
|
||||
buttonState.borderWidth = widgetView.borderWidth;
|
||||
buttonState.vibrationStyle = widgetView.vibrationStyle;
|
||||
buttonState.mouseButtonAction = widgetView.mouseButtonAction;
|
||||
buttonState.sensitivityFactor = widgetView.sensitivityFactor;
|
||||
buttonState.stickIndicatorOffset = widgetView.stickIndicatorOffset;
|
||||
buttonState.widgetShape = widgetView.shape;
|
||||
|
||||
@@ -38,6 +38,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic, assign) CGFloat oscLayerSizeFactor; // for OnScreenController CALayer
|
||||
@property (nonatomic, assign) CGFloat backgroundAlpha; // for OnScreenController CALayer
|
||||
@property (nonatomic, assign) uint8_t vibrationStyle; // for OnScreenController CALayer
|
||||
@property (nonatomic, assign) uint8_t mouseButtonAction; // for OnScreenController CALayer
|
||||
|
||||
// @property (nonatomic, assign) BOOL hasValidPosition;
|
||||
|
||||
@@ -46,6 +47,14 @@ typedef NS_ENUM(NSInteger, OnScreenButtonType) {
|
||||
CustomOnScreenWidget
|
||||
};
|
||||
|
||||
typedef NS_ENUM(NSInteger, MouseButtonAction) {
|
||||
hovering,
|
||||
leftButtonDown,
|
||||
middleButtonDown,
|
||||
rightButtonDown,
|
||||
};
|
||||
|
||||
|
||||
- (id) initWithButtonName:(NSString*)name buttonType:(uint8_t)buttonType andPosition:(CGPoint)position;
|
||||
|
||||
+ (BOOL) supportsSecureCoding;
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
[encoder encodeObject:self.alias forKey:@"alias"];
|
||||
[encoder encodeInt:self.buttonType forKey:@"buttonType"];
|
||||
[encoder encodeInt:self.vibrationStyle forKey:@"vibrationStyle"];
|
||||
[encoder encodeInt:self.mouseButtonAction forKey:@"mouseButtonAction"];
|
||||
[encoder encodeCGPoint:self.position forKey:@"position"];
|
||||
[encoder encodeBool:self.isHidden forKey:@"isHidden"];
|
||||
[encoder encodeFloat:self.widthFactor forKey:@"widthFactor"];
|
||||
@@ -53,6 +54,7 @@
|
||||
self.alias = [decoder decodeObjectForKey:@"alias"];
|
||||
self.buttonType = [decoder decodeIntForKey:@"buttonType"];
|
||||
self.vibrationStyle = [decoder decodeIntForKey:@"vibrationStyle"];
|
||||
self.mouseButtonAction = [decoder decodeIntForKey:@"mouseButtonAction"];
|
||||
self.position = [decoder decodeCGPointForKey:@"position"];
|
||||
self.isHidden = [decoder decodeBoolForKey:@"isHidden"];
|
||||
self.widthFactor = [decoder decodeFloatForKey:@"widthFactor"];
|
||||
|
||||
@@ -19,19 +19,19 @@ import UIKit
|
||||
}
|
||||
}
|
||||
|
||||
@objc public weak var guidelineDelegate: OnScreenWidgetGuidelineUpdateDelegate?
|
||||
|
||||
@objc protocol OnScreenWidgetGuidelineUpdateDelegate: AnyObject {
|
||||
func updateGuidelinesForOnScreenWidget(_ sender: Any)
|
||||
}
|
||||
@objc public weak var guidelineDelegate: OnScreenWidgetGuidelineUpdateDelegate?
|
||||
|
||||
|
||||
enum WidgetTypeEnum: UInt8 {
|
||||
case uninitialized = 0
|
||||
case button = 1
|
||||
case touchPad = 2
|
||||
@objc enum WidgetTypeEnum: UInt8 {
|
||||
case uninitialized
|
||||
case button
|
||||
case touchPad
|
||||
}
|
||||
|
||||
private var widgetType: WidgetTypeEnum = WidgetTypeEnum.uninitialized
|
||||
@objc public var widgetType: WidgetTypeEnum = WidgetTypeEnum.uninitialized
|
||||
|
||||
@objc static public var editMode: Bool = false
|
||||
@objc public var buttonLabel: String
|
||||
@@ -54,7 +54,7 @@ import UIKit
|
||||
@objc public var storedCenter: CGPoint = .zero // location from persisted data
|
||||
@objc public var initialCenter: CGPoint = .zero // location from persisted data
|
||||
@objc public var layoutChanges: [CGPoint] = []
|
||||
|
||||
@objc public var mouseButtonAction: MouseButtonAction = .hovering;
|
||||
|
||||
private let appWindow: UIView
|
||||
|
||||
@@ -1034,6 +1034,21 @@ import UIKit
|
||||
default:
|
||||
break
|
||||
}
|
||||
|
||||
if self.widgetType == WidgetTypeEnum.touchPad && self.touchPadString == "MOUSEPAD" && allCapturedTouchesCount == 1 && !twoTouchesDetected {
|
||||
switch mouseButtonAction{
|
||||
case .leftButtonDown:
|
||||
LiSendMouseButtonEvent(CChar(BUTTON_ACTION_PRESS), BUTTON_LEFT)
|
||||
case .middleButtonDown:
|
||||
LiSendMouseButtonEvent(CChar(BUTTON_ACTION_PRESS), BUTTON_MIDDLE)
|
||||
case .rightButtonDown:
|
||||
LiSendMouseButtonEvent(CChar(BUTTON_ACTION_PRESS), BUTTON_RIGHT)
|
||||
case .hovering:
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1178,14 +1193,28 @@ import UIKit
|
||||
|
||||
// deal with pure MOUSPAD first
|
||||
if !OnScreenWidgetView.editMode && self.widgetType == WidgetTypeEnum.touchPad && self.touchPadString == "MOUSEPAD" && allCapturedTouchesCount == 1 && !twoTouchesDetected {
|
||||
if !mousePointerMoved && !quickDoubleTapDetected {self.sendLongMouseLeftButtonClickEvent()} // deal with single tap(click)
|
||||
if quickDoubleTapDetected { //deal with quick double tap
|
||||
LiSendMouseButtonEvent(CChar(BUTTON_ACTION_RELEASE), BUTTON_LEFT) //must release the button anyway, because the button is likely being held down since the long click turned into a dragging event.
|
||||
if !mousePointerMoved {self.sendShortMouseLeftButtonClickEvent()}
|
||||
quickDoubleTapDetected = false
|
||||
}
|
||||
mousePointerMoved = false // reset this flag
|
||||
|
||||
switch mouseButtonAction{
|
||||
case .leftButtonDown:
|
||||
LiSendMouseButtonEvent(CChar(BUTTON_ACTION_RELEASE), BUTTON_LEFT)
|
||||
case .middleButtonDown:
|
||||
LiSendMouseButtonEvent(CChar(BUTTON_ACTION_RELEASE), BUTTON_MIDDLE)
|
||||
case .rightButtonDown:
|
||||
LiSendMouseButtonEvent(CChar(BUTTON_ACTION_RELEASE), BUTTON_RIGHT)
|
||||
case .hovering:
|
||||
if !mousePointerMoved && !quickDoubleTapDetected {self.sendLongMouseLeftButtonClickEvent()} // deal with single tap(click)
|
||||
if quickDoubleTapDetected { //deal with quick double tap
|
||||
LiSendMouseButtonEvent(CChar(BUTTON_ACTION_RELEASE), BUTTON_LEFT) //must release the button anyway, because the button is likely being held down since the long click turned into a dragging event.
|
||||
if !mousePointerMoved {self.sendShortMouseLeftButtonClickEvent()}
|
||||
quickDoubleTapDetected = false
|
||||
}
|
||||
mousePointerMoved = false // reset this flag
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if !OnScreenWidgetView.editMode && self.widgetType == WidgetTypeEnum.touchPad && self.touchPadString == "MOUSEPAD" && twoTouchesDetected && touches.count == allCapturedTouchesCount { // need to enable multi-touch first
|
||||
// touches.count == allCapturedTouchesCount means allfingers are lifting
|
||||
self.sendMouseRightButtonClickEvent()
|
||||
|
||||
@@ -403,6 +403,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
widgetView.heightFactor = buttonState.heightFactor;
|
||||
widgetView.borderWidth = buttonState.borderWidth;
|
||||
[widgetView setVibrationWithStyle:buttonState.vibrationStyle];
|
||||
widgetView.mouseButtonAction = buttonState.mouseButtonAction;
|
||||
widgetView.sensitivityFactor = buttonState.sensitivityFactor;
|
||||
widgetView.stickIndicatorOffset = buttonState.stickIndicatorOffset;
|
||||
widgetView.minStickOffset = buttonState.minStickOffset;
|
||||
|
||||
@@ -4,4 +4,5 @@
|
||||
|
||||
#include <Limelight.h>
|
||||
#import "OnScreenControls.h"
|
||||
#import "OnScreenButtonState.h"
|
||||
// #import "RelativeTouchHandler.h"
|
||||
|
||||
@@ -80,6 +80,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@property (strong, nonatomic) IBOutlet UILabel *loadConfigTipLabel;
|
||||
|
||||
@property (strong, nonatomic) IBOutlet UIStackView *mouseDownButtonStack;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *mouseButtonDownSelector;
|
||||
|
||||
|
||||
|
||||
|
||||
+25
-6
@@ -108,6 +108,7 @@
|
||||
widgetView.heightFactor = buttonState.heightFactor;
|
||||
widgetView.borderWidth = buttonState.borderWidth;
|
||||
[widgetView setVibrationWithStyle:buttonState.vibrationStyle];
|
||||
widgetView.mouseButtonAction = buttonState.mouseButtonAction;
|
||||
widgetView.sensitivityFactor = buttonState.sensitivityFactor;
|
||||
widgetView.stickIndicatorOffset = buttonState.stickIndicatorOffset;
|
||||
widgetView.minStickOffset = buttonState.minStickOffset;
|
||||
@@ -555,6 +556,7 @@
|
||||
- (void) updateWidget:(OnScreenWidgetView* )widget byParams:(NSMutableDictionary* )widgetInitParams createNew:(bool)createNew{
|
||||
if(![self isWidgetParamsValid:widgetInitParams]) return;
|
||||
OnScreenWidgetView* newWidget = [[OnScreenWidgetView alloc] initWithCmdString:widgetInitParams[@"cmdString"] buttonLabel:widgetInitParams[@"buttonLabel"] shape:widgetInitParams[@"shape"]]; //reconstruct widgetView
|
||||
newWidget.guidelineDelegate = (id<OnScreenWidgetGuidelineUpdateDelegate>)self;
|
||||
newWidget.translatesAutoresizingMaskIntoConstraints = NO; // weird but this is mandatory, or you will find no key views added to the right place
|
||||
newWidget.widthFactor = widget.widthFactor;
|
||||
newWidget.heightFactor = widget.heightFactor;
|
||||
@@ -563,7 +565,7 @@
|
||||
newWidget.stickIndicatorOffset = widget.stickIndicatorOffset;
|
||||
newWidget.minStickOffset = [widgetInitParams[@"minStickOffsetString"] floatValue];
|
||||
[newWidget setVibrationWithStyle:widget.vibrationStyle];
|
||||
// Add the widgetView to the view controller's view
|
||||
newWidget.mouseButtonAction = widget.mouseButtonAction;
|
||||
[self.view insertSubview:newWidget belowSubview:self.widgetPanelStack];
|
||||
|
||||
if(createNew) [newWidget setLocationWithPosition:CGPointMake(90, 130)];
|
||||
@@ -571,7 +573,6 @@
|
||||
[newWidget resizeWidgetView]; // resize must be called after relocation
|
||||
[newWidget adjustTransparencyWithAlpha:widget.backgroundAlpha];
|
||||
[newWidget adjustBorderWithWidth:widget.borderWidth];
|
||||
[newWidget setVibrationWithStyle:widget.vibrationStyle];
|
||||
[self.OnScreenWidgetViews addObject:newWidget];
|
||||
self->selectedWidgetView = newWidget;
|
||||
if(!createNew){
|
||||
@@ -585,6 +586,7 @@
|
||||
if(![self isWidgetParamsValid:widgetInitParams]) return;
|
||||
//saving & present the keyboard button:
|
||||
OnScreenWidgetView* widgetView = [[OnScreenWidgetView alloc] initWithCmdString:widgetInitParams[@"cmdString"] buttonLabel:widgetInitParams[@"buttonLabel"] shape:widgetInitParams[@"shape"]];
|
||||
widgetView.guidelineDelegate = (id<OnScreenWidgetGuidelineUpdateDelegate>)self;
|
||||
widgetView.translatesAutoresizingMaskIntoConstraints = NO; // weird but this is mandatory, or you will find no key views added to the right place
|
||||
widgetView.minStickOffset = [widgetInitParams[@"minStickOffsetString"] floatValue];
|
||||
[self.OnScreenWidgetViews addObject:widgetView];
|
||||
@@ -659,6 +661,7 @@
|
||||
|
||||
self.sensitivityStack.hidden = !showSensitivityFactorSlider;
|
||||
self.stickIndicatorOffsetStack.hidden = !showStickIndicatorOffsetSlider;
|
||||
self.mouseDownButtonStack.hidden = !([selectedWidgetView.cmdString containsString:@"MOUSEPAD"] && selectedWidgetView.widgetType == WidgetTypeEnumTouchPad);
|
||||
[self autoFitView:self.widgetPanelStack];
|
||||
|
||||
if(showSensitivityFactorSlider){
|
||||
@@ -679,7 +682,12 @@
|
||||
[self.widgetHeightLabel setText:[LocalizationHelper localizedStringForKey:@"Height: %.2f", self->selectedWidgetView.heightFactor]];
|
||||
[self.widgetAlphaLabel setText:[LocalizationHelper localizedStringForKey:@"Alpha: %.2f", self->selectedWidgetView.backgroundAlpha]];
|
||||
[self.widgetBorderWidthLabel setText:[LocalizationHelper localizedStringForKey:@"Border Width: %.2f", self->selectedWidgetView.borderWidth]];
|
||||
|
||||
self.mouseButtonDownSelector.selectedSegmentIndex = selectedWidgetView.mouseButtonAction;
|
||||
|
||||
if([self isIPhone]){
|
||||
self.vibrationStyleStack.hidden = [widgetView.cmdString containsString:@"MOUSEPAD"];
|
||||
[self autoFitView:self.widgetPanelStack];
|
||||
self.vibrationStyleSelector.selectedSegmentIndex = self->selectedWidgetView.vibrationStyle;
|
||||
}
|
||||
}
|
||||
@@ -710,6 +718,7 @@
|
||||
[self.widgetHeightLabel setText:[LocalizationHelper localizedStringForKey:@"Height: %.2f", sizeFactor]];
|
||||
[self.widgetAlphaLabel setText:[LocalizationHelper localizedStringForKey:@"Alpha: %.2f", alpha]];
|
||||
if([self isIPhone]){
|
||||
self.vibrationStyleStack.hidden = NO;
|
||||
NSNumber *style = [OnScreenControls.layerVibrationStyleDic objectForKey:selectedControllerLayer.name];
|
||||
self.vibrationStyleSelector.selectedSegmentIndex = [style unsignedCharValue];
|
||||
}
|
||||
@@ -762,6 +771,12 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- (void)mouseDownButtonChanged:(UISegmentedControl* )sender{
|
||||
if(self->selectedWidgetView != nil && self->widgetViewSelected){
|
||||
selectedWidgetView.mouseButtonAction = _mouseButtonDownSelector.selectedSegmentIndex;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)vibrationStyleChanged:(UISegmentedControl* )sender{
|
||||
bool vibraiontOn;
|
||||
if (@available(iOS 13.0, *)) {
|
||||
@@ -878,14 +893,18 @@
|
||||
self.stickIndicatorOffsetLabel.text = [LocalizationHelper localizedStringForKey:@"Indicator Offset"];
|
||||
self.stickIndicatorOffsetStack.hidden = YES;
|
||||
|
||||
[self.mouseButtonDownSelector addTarget:self action:@selector(mouseDownButtonChanged:) forControlEvents:(UIControlEventValueChanged)];
|
||||
NSDictionary *whiteFontAttributes = @{
|
||||
NSForegroundColorAttributeName: [UIColor whiteColor]
|
||||
};
|
||||
[self.mouseButtonDownSelector setTitleTextAttributes:whiteFontAttributes forState:UIControlStateNormal];
|
||||
self.mouseDownButtonStack.hidden = YES;
|
||||
|
||||
|
||||
if([self isIPhone]){
|
||||
[self.vibrationStyleSelector addTarget:self action:@selector(vibrationStyleChanged:) forControlEvents:(UIControlEventValueChanged)];
|
||||
self.vibrationStyleStack.hidden = YES;
|
||||
NSDictionary *normalAttributes = @{
|
||||
NSForegroundColorAttributeName: [UIColor whiteColor]
|
||||
};
|
||||
[self.vibrationStyleSelector setTitleTextAttributes:normalAttributes forState:UIControlStateNormal];
|
||||
[self.vibrationStyleSelector setTitleTextAttributes:whiteFontAttributes forState:UIControlStateNormal];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -643,6 +643,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"c1r-Hf-b7t.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Down Button\"; ObjectID = \"c1r-Hf-b7t\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Down Button"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "鼠标按下"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "鼠标按下"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "鼠标按下"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ckc-Dm-8ex.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; ckc-Dm-8ex.segmentTitles[0] = \"360p\"; ObjectID = \"ckc-Dm-8ex\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
@@ -1093,6 +1123,126 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"H8S-aI-EBo.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; H8S-aI-EBo.segmentTitles[0] = \"hovering\"; ObjectID = \"H8S-aI-EBo\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "hovering"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "悬浮"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "悬浮"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "悬浮"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"H8S-aI-EBo.segmentTitles[1]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; H8S-aI-EBo.segmentTitles[1] = \"left button\"; ObjectID = \"H8S-aI-EBo\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "left button"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "左键"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "左键"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "左键"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"H8S-aI-EBo.segmentTitles[2]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; H8S-aI-EBo.segmentTitles[2] = \"middle button\"; ObjectID = \"H8S-aI-EBo\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "middle button"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中键"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中键"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中键"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"H8S-aI-EBo.segmentTitles[3]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; H8S-aI-EBo.segmentTitles[3] = \"right button\"; ObjectID = \"H8S-aI-EBo\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "right button"
|
||||
}
|
||||
},
|
||||
"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",
|
||||
@@ -1105,19 +1255,19 @@
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "needs_review",
|
||||
"state" : "translated",
|
||||
"value" : "90°转屏"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "needs_review",
|
||||
"state" : "translated",
|
||||
"value" : "90°转屏"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "needs_review",
|
||||
"state" : "translated",
|
||||
"value" : "90°转屏"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1807,6 +1807,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"ozU-7C-qKE.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Button Down\"; ObjectID = \"ozU-7C-qKE\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "Button Down"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "鼠标按下"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "鼠标按下"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "鼠标按下"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Pdb-Bs-kMJ.text" : {
|
||||
"comment" : "Class = \"UILabel\"; text = \"Statistics Overlay\"; ObjectID = \"Pdb-Bs-kMJ\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
@@ -2149,6 +2179,126 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"tE5-Bm-4OB.segmentTitles[0]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[0] = \"hovering\"; ObjectID = \"tE5-Bm-4OB\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "hovering"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "悬浮"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "悬浮"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "悬浮"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tE5-Bm-4OB.segmentTitles[1]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[1] = \"left button\"; ObjectID = \"tE5-Bm-4OB\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "left button"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "左键"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "左键"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "左键"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tE5-Bm-4OB.segmentTitles[2]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[2] = \"middle button\"; ObjectID = \"tE5-Bm-4OB\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "middle button"
|
||||
}
|
||||
},
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中键"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中键"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "中键"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tE5-Bm-4OB.segmentTitles[3]" : {
|
||||
"comment" : "Class = \"UISegmentedControl\"; tE5-Bm-4OB.segmentTitles[3] = \"right button\"; ObjectID = \"tE5-Bm-4OB\";",
|
||||
"extractionState" : "extracted_with_value",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "new",
|
||||
"value" : "right button"
|
||||
}
|
||||
},
|
||||
"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",
|
||||
|
||||
Reference in New Issue
Block a user