Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop

This commit is contained in:
kookroach
2021-04-04 20:24:55 +02:00
5 changed files with 58 additions and 7 deletions

View File

@@ -20,7 +20,7 @@ export default function licenses(globalData: IGlobalData): void {
mp.events.add("CEF:LicenseLoaded", () => {
licenseBrowser.execute(`add_licenses('${JSON.stringify(globalInfo)}');`);
licenseBrowser.execute(`add_licensesholder('${JSON.stringify(globalName)}');`);
licenseTimer = setInterval(DestroyLicenses, 7000);
licenseTimer = setInterval(DestroyLicenses, 15000);
});

View File

@@ -181,6 +181,18 @@ export default function clotheShopList(globalData: IGlobalData) {
var txData = getClothingName(key, item.ClotheId, gender);
<<<<<<< HEAD
if (txData != undefined && txData.length > 0) {
categoryMenu.AddItem(new UIMenuItem(mp.game.ui.getLabelText(txData[0].data[0].GXT), ""));
clotheSubMenu = new UIMenu(" ", mp.game.ui.getLabelText(txData[0].data[0].GXT), new Point(0, 0), bannerSprite.library, bannerSprite.texture);
clotheSubMenu.Visible = false;
categorysMenus.push(categoryMenu);
}
=======
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
for (const x of txData) {
var itemDescription = (key === 11 ? mp.game.ui.getLabelText(x.undershirt[1].GXT) : " ");
@@ -393,7 +405,11 @@ export default function clotheShopList(globalData: IGlobalData) {
nextMenu.menu.Visible = true;
menuTransition = true;
<<<<<<< HEAD
// submenuItemChangeHandler(nextMenu.menu.CurrentSelection);
=======
submenuItemChangeHandler(nextMenu.menu.CurrentSelection);
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
});
mainMenu.MenuClose.on(() => {
@@ -404,6 +420,35 @@ export default function clotheShopList(globalData: IGlobalData) {
lastClothing = null;
});
<<<<<<< HEAD
// Sub menu events
categoryMenu.ItemSelect.on((selectedItem, itemIndex) => {
const nextMenu = clotheMenus[itemIndex];
const slot = Number(nextMenu.slotIdx);
lastClothing = {
type: nextMenu.type,
slotIdx: slot,
drawable: (nextMenu.type === "props" ? localPlayer.getPropIndex(slot) : localPlayer.getDrawableVariation(slot)),
texture: (nextMenu.type === "props" ? localPlayer.getPropTextureIndex(slot) : localPlayer.getTextureVariation(slot)),
undershirt: [localPlayer.getDrawableVariation(8), localPlayer.getTextureVariation(8)],
torso: localPlayer.getDrawableVariation(3)
};
currentMenuIdx = itemIndex;
categoryMenu.Visible = false;
nextMenu.menu.Visible = true;
menuTransition = true;
submenuItemChangeHandler(nextMenu.menu.CurrentSelection);
});
categoryMenu.MenuClose.on(() => {
currentMenuIdx = -1;
mainMenu.Visible = true;
});
=======
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
}