more functional buttons
This commit is contained in:
1 parent
732ec9a9cd
commit
8fd43d47dd
3 files changed
+182
-2
No files matched your search
@@ -49,6 +49,9 @@ import ObjectiveC.runtime
|
|||||||
@objc public weak var functionalButtonDelegate: OnScreenFunctionalButtonDelegate?
|
@objc public weak var functionalButtonDelegate: OnScreenFunctionalButtonDelegate?
|
||||||
@objc protocol OnScreenFunctionalButtonDelegate: AnyObject {
|
@objc protocol OnScreenFunctionalButtonDelegate: AnyObject {
|
||||||
func expandSettingsView()
|
func expandSettingsView()
|
||||||
|
func disconnectRemoteSession()
|
||||||
|
func disconnectAndQuitApp()
|
||||||
|
func enterPip()
|
||||||
func bringUpToolboxMenu()
|
func bringUpToolboxMenu()
|
||||||
func openWidgetLayoutTool()
|
func openWidgetLayoutTool()
|
||||||
func openWidgetProfileTable(pickProfile: Bool)
|
func openWidgetProfileTable(pickProfile: Bool)
|
||||||
@@ -2516,8 +2519,14 @@ import ObjectiveC.runtime
|
|||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {
|
||||||
self.functionalButtonDelegate?.expandSettingsView()
|
self.functionalButtonDelegate?.expandSettingsView()
|
||||||
}
|
}
|
||||||
|
case "DISCONNECT":
|
||||||
|
self.functionalButtonDelegate?.disconnectRemoteSession()
|
||||||
|
case "QUITAPP":
|
||||||
|
self.functionalButtonDelegate?.disconnectAndQuitApp()
|
||||||
case "TOOLBOX":
|
case "TOOLBOX":
|
||||||
self.functionalButtonDelegate?.bringUpToolboxMenu()
|
self.functionalButtonDelegate?.bringUpToolboxMenu()
|
||||||
|
case "PIP":
|
||||||
|
self.functionalButtonDelegate?.enterPip()
|
||||||
case "WIDGETTOOL":
|
case "WIDGETTOOL":
|
||||||
temporaryDisableFolderButtonAnimation()
|
temporaryDisableFolderButtonAnimation()
|
||||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {
|
DispatchQueue.main.asyncAfter(deadline: .now() + 0.05) {
|
||||||
|
|||||||
@@ -675,6 +675,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"=Folder" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "控件夹"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "控制項夾"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "控制項夾"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"=GamepadOverlayOff" : {
|
"=GamepadOverlayOff" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
@@ -3483,6 +3506,52 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Disconnect and quit current app" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "断开并退出当前应用"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "斷開並退出目前應用程式"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "斷開並退出目前應用程式"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Disconnect current connection" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "断开当前连接"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "斷開目前連線"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "斷開目前連線"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"Displacement-based right stick pad" : {
|
"Displacement-based right stick pad" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
@@ -3846,7 +3915,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Edit Layout" : {
|
"Edit layout" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
"zh-Hans" : {
|
"zh-Hans" : {
|
||||||
@@ -4117,6 +4186,52 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Enter picture-in-picture mode" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "进入画中画模式"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "進入子母畫面模式"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "進入子母畫面模式"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Enter PiP" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "画中画"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "子母畫面"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "子母畫面"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"Enter the command & alias label" : {
|
"Enter the command & alias label" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
@@ -8954,6 +9069,29 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"Quit app" : {
|
||||||
|
"extractionState" : "manual",
|
||||||
|
"localizations" : {
|
||||||
|
"zh-Hans" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "退出应用"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-Hant" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "退出應用程式"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"zh-HK" : {
|
||||||
|
"stringUnit" : {
|
||||||
|
"state" : "translated",
|
||||||
|
"value" : "退出應用程式"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"Quit App" : {
|
"Quit App" : {
|
||||||
"extractionState" : "manual",
|
"extractionState" : "manual",
|
||||||
"localizations" : {
|
"localizations" : {
|
||||||
|
|||||||
@@ -357,6 +357,36 @@ struct WidgetPickerView: View {
|
|||||||
allowsShortcutCombo: false,
|
allowsShortcutCombo: false,
|
||||||
forcedComboMode: nil
|
forcedComboMode: nil
|
||||||
),
|
),
|
||||||
|
FunctionalButtonOption(
|
||||||
|
label: SwiftLocalizationHelper.localizedString(forKey: "Disconnect"),
|
||||||
|
cmd: "DISCONNECT",
|
||||||
|
tip: SwiftLocalizationHelper.localizedString(forKey: "Disconnect current connection"),
|
||||||
|
allowsKeyboardCombination: false,
|
||||||
|
allowsGamepadCombination: false,
|
||||||
|
allowsSkillCombo: false,
|
||||||
|
allowsShortcutCombo: false,
|
||||||
|
forcedComboMode: nil
|
||||||
|
),
|
||||||
|
FunctionalButtonOption(
|
||||||
|
label: SwiftLocalizationHelper.localizedString(forKey: "Quit app"),
|
||||||
|
cmd: "QUITAPP",
|
||||||
|
tip: SwiftLocalizationHelper.localizedString(forKey: "Disconnect and quit current app"),
|
||||||
|
allowsKeyboardCombination: false,
|
||||||
|
allowsGamepadCombination: false,
|
||||||
|
allowsSkillCombo: false,
|
||||||
|
allowsShortcutCombo: false,
|
||||||
|
forcedComboMode: nil
|
||||||
|
),
|
||||||
|
FunctionalButtonOption(
|
||||||
|
label: SwiftLocalizationHelper.localizedString(forKey: "Enter PiP"),
|
||||||
|
cmd: "PIP",
|
||||||
|
tip: SwiftLocalizationHelper.localizedString(forKey: "Enter picture-in-picture mode"),
|
||||||
|
allowsKeyboardCombination: false,
|
||||||
|
allowsGamepadCombination: false,
|
||||||
|
allowsSkillCombo: false,
|
||||||
|
allowsShortcutCombo: false,
|
||||||
|
forcedComboMode: nil
|
||||||
|
),
|
||||||
FunctionalButtonOption(
|
FunctionalButtonOption(
|
||||||
label: SwiftLocalizationHelper.localizedString(forKey: "Folder"),
|
label: SwiftLocalizationHelper.localizedString(forKey: "Folder"),
|
||||||
cmd: "FOLDER",
|
cmd: "FOLDER",
|
||||||
@@ -378,7 +408,7 @@ struct WidgetPickerView: View {
|
|||||||
forcedComboMode: nil
|
forcedComboMode: nil
|
||||||
),
|
),
|
||||||
FunctionalButtonOption(
|
FunctionalButtonOption(
|
||||||
label: SwiftLocalizationHelper.localizedString(forKey: "Edit Layout"),
|
label: SwiftLocalizationHelper.localizedString(forKey: "Edit layout"),
|
||||||
cmd: "WIDGETTOOL",
|
cmd: "WIDGETTOOL",
|
||||||
tip: SwiftLocalizationHelper.localizedString(forKey: "Open on-screen widget layout tool"),
|
tip: SwiftLocalizationHelper.localizedString(forKey: "Open on-screen widget layout tool"),
|
||||||
allowsKeyboardCombination: false,
|
allowsKeyboardCombination: false,
|
||||||
@@ -1745,6 +1775,9 @@ struct WidgetPickerView: View {
|
|||||||
let initialButtonLabel,
|
let initialButtonLabel,
|
||||||
targetWidgetKind == .button {
|
targetWidgetKind == .button {
|
||||||
widgetButtonLabel = initialButtonLabel
|
widgetButtonLabel = initialButtonLabel
|
||||||
|
} else if targetWidgetKind == .button,
|
||||||
|
let selectedFunctionalButtonOption {
|
||||||
|
widgetButtonLabel = selectedFunctionalButtonOption.cmd == "FOLDER" ? SwiftLocalizationHelper.localizedString(forKey: "=Folder") : selectedFunctionalButtonOption.label
|
||||||
} else {
|
} else {
|
||||||
widgetButtonLabel = ""
|
widgetButtonLabel = ""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user