mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-09-04 00:03:23 +00:00
Add Config.Phone.AllowMovement and route it through the central focus resolver. Keep camera and attention overlays authoritative over movement input, document the setting, and cover the focus-state combinations.
22 lines
700 B
Lua
22 lines
700 B
Lua
SkyPhoneFocus = {}
|
|
|
|
function SkyPhoneFocus.Resolve(state)
|
|
if state.activity_suspended then
|
|
return { focused = false, keep_input = false }
|
|
end
|
|
if state.call_focus then
|
|
return { focused = true, keep_input = false }
|
|
end
|
|
if state.camera_active and not state.camera_nui_focused then
|
|
return { focused = false, keep_input = true }
|
|
end
|
|
return {
|
|
focused = state.is_open
|
|
or state.notification_focus
|
|
or state.payphone_focus
|
|
or state.sim_picker_open
|
|
or (state.camera_active and state.camera_nui_focused),
|
|
keep_input = state.is_open and state.allow_movement and not state.camera_active,
|
|
}
|
|
end
|