hud visual feedback demo
This commit is contained in:
1 parent
cfb8946ac3
commit
ed8a246bad
1 file changed
+2
-2
@@ -176,7 +176,7 @@ final class GamepadNavigationIllustrationHud: UIView {
|
|||||||
let keyBorderView = keyView.viewWithTag(Self.keyBorderViewTag) ?? keyView
|
let keyBorderView = keyView.viewWithTag(Self.keyBorderViewTag) ?? keyView
|
||||||
let keyContentView = keyView.viewWithTag(Self.keyContentViewTag) ?? keyView
|
let keyContentView = keyView.viewWithTag(Self.keyContentViewTag) ?? keyView
|
||||||
let keyBackgroundColor = isInAction
|
let keyBackgroundColor = isInAction
|
||||||
? ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.2 : 0.13)
|
? ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.5 : 0.5)
|
||||||
: ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.09 : 0.05)
|
: ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.09 : 0.05)
|
||||||
keyView.backgroundColor = .clear
|
keyView.backgroundColor = .clear
|
||||||
keyBorderView.layer.borderColor = ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.69 : 0.6).cgColor
|
keyBorderView.layer.borderColor = ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.69 : 0.6).cgColor
|
||||||
@@ -184,7 +184,7 @@ final class GamepadNavigationIllustrationHud: UIView {
|
|||||||
keyView.transform = .identity
|
keyView.transform = .identity
|
||||||
for subview in keyContentView.subviews {
|
for subview in keyContentView.subviews {
|
||||||
if let keyLabel = subview as? UILabel {
|
if let keyLabel = subview as? UILabel {
|
||||||
keyLabel.textColor = isInAction ? ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 1 : 1) : ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.83 : 0.83)
|
keyLabel.textColor = isInAction ? .white.withAlphaComponent(isDark ? 0.8 : 0.8) : ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.83 : 0.83)
|
||||||
} else if let imageView = subview as? UIImageView {
|
} else if let imageView = subview as? UIImageView {
|
||||||
imageView.tintColor = isInAction ? ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 1 : 1) : ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.83 : 0.83)
|
imageView.tintColor = isInAction ? ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 1 : 1) : ThemeManager.appPrimaryColor.withAlphaComponent(isDark ? 0.83 : 0.83)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user