Merge
This commit is contained in:
@@ -56,7 +56,6 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
let categoryMenu = null;
|
||||
|
||||
let clotheMenus = [];
|
||||
let categorysMenus = [];
|
||||
|
||||
|
||||
|
||||
@@ -177,12 +176,12 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
mainMenu.Item
|
||||
|
||||
// Fill it
|
||||
let clotheSubMenu;
|
||||
for (const item of value) {
|
||||
if (item.ComponentId == key) {
|
||||
|
||||
var txData = getClothingName(key, item.ClotheId, gender);
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
|
||||
if (txData != undefined && txData.length > 0) {
|
||||
@@ -192,6 +191,8 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
categorysMenus.push(categoryMenu);
|
||||
|
||||
}
|
||||
=======
|
||||
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
|
||||
|
||||
for (const x of txData) {
|
||||
var itemDescription = (key === 11 ? mp.game.ui.getLabelText(x.undershirt[1].GXT) : " ");
|
||||
@@ -204,21 +205,20 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
|
||||
tempItem.SetRightLabel(`${item.Price > 0 ? `$${item.Price}` : "KOSTENLOS"}`);
|
||||
|
||||
clotheSubMenu.AddItem(tempItem);
|
||||
categoryMenu.AddItem(tempItem);
|
||||
|
||||
cloth.push(item);
|
||||
tx.push(x);
|
||||
}
|
||||
clotheMenus.push({
|
||||
menu: clotheSubMenu,
|
||||
type: type,
|
||||
slotIdx: Number(key),
|
||||
item: cloth,
|
||||
texture: tx
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
clotheMenus.push({
|
||||
menu: categoryMenu,
|
||||
type: type,
|
||||
slotIdx: Number(key),
|
||||
item: cloth,
|
||||
texture: tx
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
@@ -321,13 +321,12 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
|
||||
// Reset some variables
|
||||
clotheMenus = [];
|
||||
categorysMenus = [];
|
||||
currentMenuIdx = -1;
|
||||
menuTransition = false;
|
||||
lastClothing = null;
|
||||
|
||||
// Create a new main menu
|
||||
mainMenu = new UIMenu("", "SELECT A CATEGORY", new Point(0, 0), bannerSprite.library, bannerSprite.texture);
|
||||
mainMenu = new UIMenu("", "Wählen Sie eine Kategorie", new Point(0, 0), bannerSprite.library, bannerSprite.texture);
|
||||
mainMenu.Visible = true;
|
||||
|
||||
// Update clothingData
|
||||
@@ -386,22 +385,10 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
});
|
||||
}
|
||||
|
||||
for (const item of categorysMenus) {
|
||||
// Preview hovering item
|
||||
//item.menu.IndexChange.on(submenuItemChangeHandler);
|
||||
|
||||
// Reset preview when player backs out of category menu
|
||||
item.MenuClose.on(() => {
|
||||
resetPreview();
|
||||
|
||||
currentMenuIdx = -1;
|
||||
mainMenu.Visible = true;
|
||||
});
|
||||
}
|
||||
|
||||
// Main menu events
|
||||
mainMenu.ItemSelect.on((selectedItem, itemIndex) => {
|
||||
const nextMenu = categorysMenus[itemIndex];
|
||||
const nextMenu = clotheMenus[itemIndex];
|
||||
const slot = Number(nextMenu.slotIdx);
|
||||
|
||||
lastClothing = {
|
||||
@@ -415,10 +402,14 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
|
||||
currentMenuIdx = itemIndex;
|
||||
mainMenu.Visible = false;
|
||||
nextMenu.Visible = true;
|
||||
nextMenu.menu.Visible = true;
|
||||
menuTransition = true;
|
||||
|
||||
<<<<<<< HEAD
|
||||
// submenuItemChangeHandler(nextMenu.menu.CurrentSelection);
|
||||
=======
|
||||
submenuItemChangeHandler(nextMenu.menu.CurrentSelection);
|
||||
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
|
||||
});
|
||||
|
||||
mainMenu.MenuClose.on(() => {
|
||||
@@ -429,6 +420,7 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
lastClothing = null;
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
// Sub menu events
|
||||
categoryMenu.ItemSelect.on((selectedItem, itemIndex) => {
|
||||
const nextMenu = clotheMenus[itemIndex];
|
||||
@@ -455,6 +447,8 @@ export default function clotheShopList(globalData: IGlobalData) {
|
||||
currentMenuIdx = -1;
|
||||
mainMenu.Visible = true;
|
||||
});
|
||||
=======
|
||||
>>>>>>> f7423b24fc6037048d2eaf65ba94de30faa96e39
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user