Change Globaldata Interaction -> InMenu, Fix DutyCloth Menu State
This commit is contained in:
@@ -34,7 +34,7 @@ export default function factionInteraction(globalData: GlobalData) {
|
||||
|
||||
mp.events.add("showFactionInteraction", (userFactionId, isDuty, userFactionName, isFactionLeader, reviveTaskCount, healTaskCount, fireTaskCount) => {
|
||||
mp.gui.chat.activate(false);
|
||||
globalData.Interaction = true;
|
||||
globalData.InMenu = true;
|
||||
|
||||
var rP = ((reviveTaskCount === "0") ? "~r~" : "~g~");
|
||||
var hP = ((healTaskCount === "0") ? "~r~" : "~g~");
|
||||
@@ -80,20 +80,20 @@ export default function factionInteraction(globalData: GlobalData) {
|
||||
case cancelItem:
|
||||
factionInteractionMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.Interaction = false;
|
||||
globalData.InMenu = false;
|
||||
break;
|
||||
case reviveTaskMenu:
|
||||
mp.events.callRemote("loadMedicTasks", 0)
|
||||
factionInteractionMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.Interaction = false;
|
||||
globalData.InMenu = false;
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
factionInteractionMenu.MenuClose.on(() => {
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.Interaction = false;
|
||||
globalData.InMenu = false;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -107,7 +107,7 @@ export default function factionInteraction(globalData: GlobalData) {
|
||||
mp.events.call("sortFactionTasks", false);
|
||||
|
||||
mp.gui.chat.activate(false);
|
||||
globalData.Interaction = true;
|
||||
globalData.InMenu = true;
|
||||
switch (type) {
|
||||
case 0:
|
||||
reviveTaskMenu = new Menu("Revives", "\u00c4lteste zu erst", new Point(0, screenRes.y / 2), null, null);
|
||||
@@ -144,7 +144,7 @@ export default function factionInteraction(globalData: GlobalData) {
|
||||
});
|
||||
reviveTaskMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.Interaction = false;
|
||||
globalData.InMenu = false;
|
||||
ambulanceImagePos = 0.325
|
||||
taskStart = player.position;
|
||||
taskFinish = tasks[index].Position;
|
||||
|
||||
@@ -50,7 +50,7 @@ export default function playerInteraction(globalData: GlobalData) {
|
||||
mp.events.add("showPlayerInteraction", (nearPlayerArr) => {
|
||||
mp.gui.chat.activate(false);
|
||||
nearbyPlayers = JSON.parse(nearPlayerArr);
|
||||
globalData.Interaction = true;
|
||||
globalData.InMenu = true;
|
||||
let playerInteractionMenu = new Menu("Spielerinteraktion", "", new Point(0, screenRes.y / 2), null, null);
|
||||
let playerSelect = new UIMenuListItem("Mit", "~y~W\u00e4hle den Spieler aus.", new ItemsCollection(nearbyPlayers));
|
||||
playerInteractionMenu.AddItem(playerSelect);
|
||||
@@ -68,17 +68,17 @@ export default function playerInteraction(globalData: GlobalData) {
|
||||
mp.events.callRemote("openTradeInventory", playerSelect.SelectedValue);
|
||||
playerInteractionMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.Interaction = false;
|
||||
globalData.InMenu = false;
|
||||
} else if (item.Text === "Schlie\u00dfen") {
|
||||
playerInteractionMenu.Visible = false;
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.Interaction = false;
|
||||
globalData.InMenu = false;
|
||||
}
|
||||
});
|
||||
|
||||
playerInteractionMenu.MenuClose.on(() => {
|
||||
mp.gui.chat.activate(true);
|
||||
globalData.Interaction = false;
|
||||
globalData.InMenu = false;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user