diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-30 21:19:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-30 21:19:30 +0300 |
commit | 5b6848e817bea37e286f197f8702ab29f1de3bc8 (patch) | |
tree | 2f38f5ac1c38fc1e7766d4d09535f7badecd05ea /src/gui/windows | |
parent | bd429077f8985c5ee45a53009d02e2f495b4ad90 (diff) | |
download | plus-5b6848e817bea37e286f197f8702ab29f1de3bc8.tar.gz plus-5b6848e817bea37e286f197f8702ab29f1de3bc8.tar.bz2 plus-5b6848e817bea37e286f197f8702ab29f1de3bc8.tar.xz plus-5b6848e817bea37e286f197f8702ab29f1de3bc8.zip |
Add item container max columns limit.
Also fix some issues with adding items to npc item container.
Diffstat (limited to 'src/gui/windows')
-rw-r--r-- | src/gui/windows/npcdialog.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp index e94904a08..de74037f8 100644 --- a/src/gui/windows/npcdialog.cpp +++ b/src/gui/windows/npcdialog.cpp @@ -123,7 +123,8 @@ NpcDialog::NpcDialog(const BeingId npcId) : // TRANSLATORS: npc dialog button mResetButton(new Button(this, _("Reset"), "reset", this)), mInventory(new Inventory(InventoryType::NPC, 1)), - mItemContainer(new ItemContainer(this, mInventory, ShowEmptyRows_true)), + mItemContainer(new ItemContainer(this, mInventory, + 10000, ShowEmptyRows_true)), mItemScrollArea(new ScrollArea(this, mItemContainer, getOptionBool("showitemsbackground"), "npc_listbackground.xml")), mInputState(NPC_INPUT_NONE), @@ -374,7 +375,7 @@ void NpcDialog::action(const ActionEvent &event) } std::string str; - const int sz = mInventory->getNumberOfSlotsUsed(); + const int sz = mInventory->getSize(); if (sz == 0) { str = "0,0"; @@ -421,7 +422,7 @@ void NpcDialog::action(const ActionEvent &event) } std::string str; - const int sz = mInventory->getNumberOfSlotsUsed(); + const int sz = mInventory->getSize(); if (sz == 0) { str = "-1"; @@ -441,7 +442,6 @@ void NpcDialog::action(const ActionEvent &event) { str.append(";"); item = mInventory->getItem(f); - logger->log("tag=%d", item->getTag()); if (item) str.append(strprintf("%d", item->getTag())); else |