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