Skip to content

Commit

Permalink
feat(config): allow configurable toggle key
Browse files Browse the repository at this point in the history
Should introduce a convar for this as well
  • Loading branch information
itschip committed Jan 1, 2022
1 parent ae11040 commit eee8603
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"exportFunction": "myCheckerFunction"
},
"general": {
"useResourceIntegration": false
"useResourceIntegration": false,
"toggleKey": "f1"
},
"database": {
"useIdentifierPrefix": false,
Expand Down
2 changes: 1 addition & 1 deletion resources/client/cl_main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ onNet(PhoneEvents.SET_PLAYER_LOADED, (state: boolean) => {
}
});

RegisterKeyMapping('phone', 'Open Phone', 'keyboard', 'f1');
RegisterKeyMapping('phone', 'Open Phone', 'keyboard', config.general.toggleKey);

const getCurrentGameTime = () => {
let hour: string | number = GetClockHours();
Expand Down
1 change: 1 addition & 0 deletions typings/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface Debug {
interface General {
useDashNumber: boolean;
useResourceIntegration: boolean;
toggleKey: string;
}

interface NotificationConfig {
Expand Down

0 comments on commit eee8603

Please sign in to comment.