Moves core ControllerSkin translucency logic to ControllerView
This commit is contained in:
parent
bb418038e2
commit
6836fb5bae
@ -1 +1 @@
|
||||
Subproject commit dd292d6ceaa1c0543e3dd0453251379287a923a7
|
||||
Subproject commit 0102a815adf25da3841d4273c044cbb59261709b
|
||||
@ -192,6 +192,8 @@ extension GameViewController
|
||||
|
||||
let gameViewContainerView = self.gameView.superview!
|
||||
|
||||
self.controllerView.translucentControllerSkinOpacity = Settings.translucentControllerSkinOpacity
|
||||
|
||||
self.sustainButtonsContentView = UIView(frame: CGRect(x: 0, y: 0, width: self.gameView.bounds.width, height: self.gameView.bounds.height))
|
||||
self.sustainButtonsContentView.translatesAutoresizingMaskIntoConstraints = false
|
||||
self.sustainButtonsContentView.isHidden = true
|
||||
@ -444,15 +446,6 @@ private extension GameViewController
|
||||
|
||||
let controllerSkin = Settings.preferredControllerSkin(for: system, traits: traits)
|
||||
self.controllerView.controllerSkin = controllerSkin
|
||||
|
||||
if controllerSkin?.isTranslucent(for: traits) ?? false
|
||||
{
|
||||
self.controllerView.alpha = Settings.translucentControllerSkinOpacity
|
||||
}
|
||||
else
|
||||
{
|
||||
self.controllerView.alpha = 1.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -860,14 +853,7 @@ private extension GameViewController
|
||||
self.updateControllerSkin()
|
||||
}
|
||||
|
||||
case .translucentControllerSkinOpacity:
|
||||
if let traits = self.controllerView.controllerSkinTraits
|
||||
{
|
||||
if self.controllerView.controllerSkin?.isTranslucent(for: traits) ?? false
|
||||
{
|
||||
self.controllerView.alpha = Settings.translucentControllerSkinOpacity
|
||||
}
|
||||
}
|
||||
case .translucentControllerSkinOpacity: self.controllerView.translucentControllerSkinOpacity = Settings.translucentControllerSkinOpacity
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user