- update widget tempates
- minor fixes
This commit is contained in:
@@ -280,7 +280,7 @@ static CGRect layoutViewBounds;
|
||||
|
||||
// NSString* persistedKey = @"widgetProfileUpdated-20251015";
|
||||
// NSString* persistedKey = @"widgetProfileUpdated-20260322";
|
||||
NSString* persistedKey = @"widgetProfileUpdated-20260408";
|
||||
NSString* persistedKey = @"widgetProfileUpdated-20260413";
|
||||
BOOL needImportDefaultTemplates = [defaults objectForKey:persistedKey] == nil;
|
||||
|
||||
if(profiles.count == 0 || needImportDefaultTemplates){
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
- (void)readyToBringUpSoftKeyboardByToolbox;
|
||||
- (void)keyboardWillShow:(NSNotification *)notification;
|
||||
- (void)keyboardWillHide;
|
||||
- (void)handleAbnormalKeyboards:(NSNotification *)notification;
|
||||
- (void)liftMetalVideoViewIfNeeded:(CGFloat)liftHeight;
|
||||
|
||||
- (void)alterAbsTouchDragWith:(int32_t)mouseButton;
|
||||
|
||||
@@ -41,6 +41,8 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
KeyboardInputField* keyInputField;
|
||||
BOOL isInputingText;
|
||||
bool dockedKeyboardActionDetected;
|
||||
|
||||
bool isPencilHovering;
|
||||
NSMutableSet* keysDown;
|
||||
float streamAspectRatio;
|
||||
@@ -257,6 +259,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
- (void)keyboardWillShow:(NSNotification *)notification{
|
||||
// NSLog(@"keyboard will show markmark %f", CACurrentMediaTime());
|
||||
dockedKeyboardActionDetected = true;
|
||||
if(settings.liftStreamViewForKeyboard && !isInputingText){
|
||||
isInputingText = true;
|
||||
|
||||
@@ -306,6 +309,29 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
NSLog(@"keyboard will show %f", CACurrentMediaTime());
|
||||
}
|
||||
|
||||
- (void)handleAbnormalKeyboards:(NSNotification *)notification{
|
||||
dispatch_time_t delayTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * NSEC_PER_SEC));
|
||||
dispatch_after(delayTime, dispatch_get_main_queue(), ^{// Code to execute after the delay
|
||||
if(!self->dockedKeyboardActionDetected){
|
||||
[self->keyboardToggleTip removeFromSuperview];
|
||||
self->dockedKeyboardActionDetected = false;
|
||||
self->isInputingText = !self->isInputingText;
|
||||
[self->keyInputField removeFromSuperview];
|
||||
|
||||
AlertControllerUtil.autoCompletion = true;
|
||||
[AlertControllerUtil showAlertIn:self->_streamFrameVC
|
||||
title:@""
|
||||
message:[LocalizationHelper localizedStringForKey:@"Floating keyboard not supported"]
|
||||
withCancel:NO
|
||||
buttonTitle:@""
|
||||
countdown:1
|
||||
action:^{}
|
||||
completion:^{}];
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
- (UIViewController *)parentViewController {
|
||||
UIResponder *responder = self;
|
||||
while (responder) {
|
||||
@@ -319,6 +345,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
// this method also deals with recovering streamview when local keyboard is turned off
|
||||
- (void)keyboardWillHide{
|
||||
dockedKeyboardActionDetected = true;
|
||||
// NSLog(@"keyboard will hide markmark %f", CACurrentMediaTime());
|
||||
|
||||
keyboardToggleRecognizer.numberOfTouchesRequired = settings.keyboardToggleFingers.intValue; // reset this number
|
||||
|
||||
@@ -704,19 +704,19 @@
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "断开"
|
||||
"value" : "断开连接"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "斷開"
|
||||
"value" : "斷開連接"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "斷開"
|
||||
"value" : "斷開連接"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4953,6 +4953,29 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Floating keyboard not supported" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "不支持悬浮键盘"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "不支援懸浮鍵盤"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "不支援懸浮鍵盤"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Folder" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+2
-2
@@ -1384,8 +1384,8 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
|
||||
let currentProfile = profilesManager.getSelectedProfile()
|
||||
// currentProfile.name = "RPG游戏示例 / RPG example (ZZZ in Genshin style)"
|
||||
currentProfile.name = "Default"
|
||||
// currentProfile.name = "Default";
|
||||
// profilesManager.replace(targetProfile as! OSCProfile, with: currentProfile)
|
||||
// currentProfile.name = "Editable default";
|
||||
profilesManager.replace(targetProfile as! OSCProfile, with: currentProfile)
|
||||
*/
|
||||
|
||||
clearSickInput()
|
||||
|
||||
@@ -541,6 +541,11 @@
|
||||
selector:@selector(keyboardWillShow:)
|
||||
name:UIKeyboardWillShowNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(handleAbnormalKeyboards:)
|
||||
name:UIKeyboardWillChangeFrameNotification
|
||||
object:nil];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(keyboardWillHide)
|
||||
@@ -763,6 +768,10 @@
|
||||
[_streamView keyboardWillHide];
|
||||
}
|
||||
|
||||
- (void)handleAbnormalKeyboards:(NSNotification *)notification{
|
||||
[_streamView handleAbnormalKeyboards:notification];
|
||||
}
|
||||
|
||||
- (void)handleWidgetLayoutGesture{
|
||||
[self configOscLayoutTool];
|
||||
[self openWidgetLayoutTool];
|
||||
|
||||
Reference in New Issue
Block a user