Files
sky_phone-sky-systems/sky_phone/source/client/focus.lua
T
Leon.Schmidt 9afafe4a27 ENH - allow movement while phone is open
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.
2026-08-15 22:17:41 +02:00

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