FocusManager:focusTopLeftWidget(): only if hasDPad (#8737)

Focusing (highlighting/inverting) widgets should not
happen on touch devices withoud DPad.
This commit is contained in:
Philip Chan
2022-01-29 05:55:26 +08:00
committed by GitHub
parent f2557a7aa6
commit 978aa2006a

View File

@@ -219,7 +219,10 @@ end
--- Container call this method after init to let first widget render in focus style
function FocusManager:focusTopLeftWidget()
self:onFocusMove({0, 0})
if Device:hasDPad() then
-- trigger selected widget in focused style
self:onFocusMove({0, 0})
end
end
return FocusManager