feat: add and option to toggle stats and graphs temporaily in toolbox
This commit is contained in:
@@ -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