fix cityhall menu not close
This commit is contained in:
@@ -21,7 +21,7 @@ export default function (globalData: GlobalData) {
|
|||||||
mp.game.ui.setTextComponentFormat('STRING');
|
mp.game.ui.setTextComponentFormat('STRING');
|
||||||
mp.game.ui.addTextComponentSubstringPlayerName('Drücke ~INPUT_CONTEXT~, um das Stadthallen-Menü zu öffnen');
|
mp.game.ui.addTextComponentSubstringPlayerName('Drücke ~INPUT_CONTEXT~, um das Stadthallen-Menü zu öffnen');
|
||||||
mp.game.ui.displayHelpTextFromStringLabel(0, true, true, -1);
|
mp.game.ui.displayHelpTextFromStringLabel(0, true, true, -1);
|
||||||
|
|
||||||
joblist = JSON.parse(joblista);
|
joblist = JSON.parse(joblista);
|
||||||
|
|
||||||
if (!keyBound) {
|
if (!keyBound) {
|
||||||
@@ -32,7 +32,7 @@ export default function (globalData: GlobalData) {
|
|||||||
|
|
||||||
mp.events.add("SERVER:CityHall_ClearHelpText", () => {
|
mp.events.add("SERVER:CityHall_ClearHelpText", () => {
|
||||||
mp.game.ui.clearHelp(false);
|
mp.game.ui.clearHelp(false);
|
||||||
if (menu) menu.Close();
|
if (menu) menu.Close(true);
|
||||||
if (keyBound) {
|
if (keyBound) {
|
||||||
mp.keys.unbind(0x45, false, keyPressHandler);
|
mp.keys.unbind(0x45, false, keyPressHandler);
|
||||||
keyBound = false;
|
keyBound = false;
|
||||||
@@ -70,7 +70,7 @@ export default function (globalData: GlobalData) {
|
|||||||
mp.events.callRemote("CLIENT:JobCenter_AcceptJob", index + 1);
|
mp.events.callRemote("CLIENT:JobCenter_AcceptJob", index + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.Close();
|
menu.Close(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
jobMenu.Visible = false;
|
jobMenu.Visible = false;
|
||||||
@@ -92,7 +92,7 @@ export default function (globalData: GlobalData) {
|
|||||||
input.show();
|
input.show();
|
||||||
input.getValue((name: string) => {
|
input.getValue((name: string) => {
|
||||||
mp.events.callRemote("CLIENT:CityHall_CreateGroup", name);
|
mp.events.callRemote("CLIENT:CityHall_CreateGroup", name);
|
||||||
menu.Close();
|
menu.Close(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user