Fixing bug in inventory
This commit is contained in:
parent
0cc384028f
commit
f61a12f874
@ -181,7 +181,7 @@ namespace ZL {
|
||||
|
||||
auto btn = uiManager.findButton(btnName);
|
||||
if (btn) {
|
||||
auto tex = renderer.textureManager.LoadFromPng(items[i].icon, zipFile_, true);
|
||||
auto tex = renderer.textureManager.LoadFromPng(items[i].icon, CONST_ZIP_FILE, true);
|
||||
btn->texNormal = btn->texHover = btn->texPressed = tex;
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ namespace ZL {
|
||||
const std::string prevBtnName = "item" + std::to_string(inventorySelectedIndex_ + 1) + "Button";
|
||||
auto prevBtn = uiManager.findButton(prevBtnName);
|
||||
if (prevBtn) {
|
||||
auto tex = renderer.textureManager.LoadFromPng(items[inventorySelectedIndex_].icon, zipFile_, true);
|
||||
auto tex = renderer.textureManager.LoadFromPng(items[inventorySelectedIndex_].icon, CONST_ZIP_FILE, true);
|
||||
prevBtn->texNormal = prevBtn->texHover = prevBtn->texPressed = tex;
|
||||
}
|
||||
}
|
||||
@ -224,7 +224,7 @@ namespace ZL {
|
||||
auto btn = uiManager.findButton(btnName);
|
||||
if (btn) {
|
||||
const std::string& selPath = item.selectedIcon.empty() ? item.icon : item.selectedIcon;
|
||||
auto tex = renderer.textureManager.LoadFromPng(selPath, zipFile_, true);
|
||||
auto tex = renderer.textureManager.LoadFromPng(selPath, CONST_ZIP_FILE, true);
|
||||
btn->texNormal = btn->texHover = btn->texPressed = tex;
|
||||
}
|
||||
|
||||
@ -232,7 +232,7 @@ namespace ZL {
|
||||
auto img = uiManager.findStaticImage("selectedItemPic");
|
||||
if (img) {
|
||||
const std::string& path = item.selectedIcon.empty() ? item.icon : item.selectedIcon;
|
||||
img->texture = renderer.textureManager.LoadFromPng(path, zipFile_, true);
|
||||
img->texture = renderer.textureManager.LoadFromPng(path, CONST_ZIP_FILE, true);
|
||||
}
|
||||
|
||||
uiManager.setText("selectedText", item.name);
|
||||
@ -779,7 +779,7 @@ namespace ZL {
|
||||
inc ? texBubbleInLB_ : texBubbleOutLB_,
|
||||
inc ? texBubbleInRT_ : texBubbleOutRT_,
|
||||
inc ? texBubbleInRB_ : texBubbleOutRB_,
|
||||
renderer, "resources/fonts/DroidSans.ttf", 20, zipFile_);
|
||||
renderer, "resources/fonts/DroidSans.ttf", 20, CONST_ZIP_FILE);
|
||||
if (!nodeName.empty()) {
|
||||
auto n = uiManager.findNode(nodeName);
|
||||
phoneChatVisibleBubbles_.push_back({ nodeName, n ? n->height : 60.0f });
|
||||
@ -806,7 +806,7 @@ namespace ZL {
|
||||
incoming ? texBubbleInLB_ : texBubbleOutLB_,
|
||||
incoming ? texBubbleInRT_ : texBubbleOutRT_,
|
||||
incoming ? texBubbleInRB_ : texBubbleOutRB_,
|
||||
renderer, "resources/fonts/DroidSans.ttf", 20, zipFile_);
|
||||
renderer, "resources/fonts/DroidSans.ttf", 20, CONST_ZIP_FILE);
|
||||
|
||||
if (nodeName.empty()) return;
|
||||
|
||||
|
||||
@ -112,7 +112,7 @@ namespace ZL {
|
||||
|
||||
GameState state = GameState::Gameplay;
|
||||
Inventory* inventory = nullptr;
|
||||
std::string zipFile_;
|
||||
//std::string zipFile_;
|
||||
int inventorySelectedIndex_ = -1;
|
||||
|
||||
enum class UniIntTutorialState { Step10, Step11, DarklandsActive, DarklandsStep13, DarklandsFull };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user