mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Disable walking when an inputfield is focused (#234)
* feat(phone) Disable walking when an input is focused * refactor(phone) renamed var & replaced copy paste code Instead of copying the code it now uses a custom hook * refactor(phone/input): removed useMemo from hook * style(phone/input): changed indentation to spaces & added de-structured import
This commit is contained in:
1 parent
0e1d7f40b5
commit
870aeda3c3
16 files changed
+88
-13
No files matched your search
@@ -180,6 +180,14 @@ on(`__cfx_nui:${PhoneEvents.CLOSE_PHONE}`, async (data: any, cb: Function) => {
|
||||
cb();
|
||||
}); // Called for when the phone is closed via the UI.
|
||||
|
||||
RegisterNuiCallbackType(PhoneEvents.TOGGLE_KEYS);
|
||||
on(`__cfx_nui:${PhoneEvents.TOGGLE_KEYS}`, async (data: any, cb: Function) => {
|
||||
if (isPhoneOpen) {
|
||||
SetNuiFocusKeepInput(data.keepGameFocus);
|
||||
}
|
||||
cb();
|
||||
});
|
||||
|
||||
// setTick(async () => {
|
||||
// while (config.SwimDestroy) {
|
||||
// await Delay(config.RunRate * 1000);
|
||||
|
||||
Reference in new issue
Block a user