feat: add and option to toggle stats and graphs temporaily in toolbox
This commit is contained in:
@@ -283,6 +283,29 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"[ Toggle stats overlay & graphs ]" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
"zh-Hans" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "[ 切换统计覆盖层和图表 ]"
|
||||
}
|
||||
},
|
||||
"zh-Hant" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "[ 切換統計覆蓋層和圖表 ]"
|
||||
}
|
||||
},
|
||||
"zh-HK" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "[ 切換統計覆蓋層和圖表 ]"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"[ On-screen widget tool ]" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
|
||||
@@ -13,6 +13,7 @@ import UIKit
|
||||
@objc optional func switchWidgetProfile()
|
||||
@objc optional func bringUpSoftKeyboard()
|
||||
@objc optional func enterPip()
|
||||
@objc optional func toggleStatsOverlay()
|
||||
}
|
||||
|
||||
|
||||
@@ -28,12 +29,13 @@ import UIKit
|
||||
private let viewBackgroundColor = UIColor(white: 0.2, alpha: 0.8);
|
||||
private let highlightColor = UIColor(white: 0.39, alpha: 0.8);
|
||||
private let titleLabel = UILabel()
|
||||
@objc public var specialEntries : NSMutableArray = ["widgetSwitchTool", "widgetLayoutTool", "bringUpSoftKeyboard", "enterPip"]
|
||||
@objc public var specialEntries : NSMutableArray = ["widgetSwitchTool", "widgetLayoutTool", "bringUpSoftKeyboard", "enterPip", "toggleStatsOverlay"]
|
||||
private let specialEntryAliasDic : [String:String] = [
|
||||
"widgetSwitchTool":SwiftLocalizationHelper.localizedString(forKey: "[ Switch on-screen widget profile ]"),
|
||||
"widgetLayoutTool":SwiftLocalizationHelper.localizedString(forKey: "[ On-screen widget tool ]"),
|
||||
"bringUpSoftKeyboard":SwiftLocalizationHelper.localizedString(forKey: "[ Bring up soft keyboard ]"),
|
||||
"enterPip":SwiftLocalizationHelper.localizedString(forKey: "[ Enter picture-in-picture mode ]")
|
||||
"enterPip":SwiftLocalizationHelper.localizedString(forKey: "[ Enter picture-in-picture mode ]"),
|
||||
"toggleStatsOverlay":SwiftLocalizationHelper.localizedString(forKey: "[ Toggle stats overlay & graphs ]")
|
||||
]
|
||||
|
||||
private var viewPinned: Bool = false
|
||||
@@ -377,6 +379,8 @@ import UIKit
|
||||
specialEntryDelegate?.bringUpSoftKeyboard?()
|
||||
case "enterPip":
|
||||
specialEntryDelegate?.enterPip?()
|
||||
case "toggleStatsOverlay":
|
||||
specialEntryDelegate?.toggleStatsOverlay?()
|
||||
default: break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user