void InventoryWindow::onFrame() { if (!mMainWidget->getVisible()) return; updateEncumbranceBar(); }
void CompanionWindow::open(MWWorld::Ptr npc) { openContainer(npc); setTitle(MWWorld::Class::get(npc).getName(npc)); drawItems(); updateEncumbranceBar(); }
void CompanionWindow::onItemSelected(int index) { if (mDragAndDrop->mIsOnDragAndDrop) { mDragAndDrop->drop(mModel, mItemView); updateEncumbranceBar(); return; } const ItemStack& item = mSortModel->getItem(index); MWWorld::Ptr object = item.mBase; int count = item.mCount; bool shift = MyGUI::InputManager::getInstance().isShiftPressed(); if (MyGUI::InputManager::getInstance().isControlPressed()) count = 1; mSelectedItem = mSortModel->mapToSource(index); if (count > 1 && !shift) { CountDialog* dialog = MWBase::Environment::get().getWindowManager()->getCountDialog(); dialog->open(object.getClass().getName(object), "#{sTake}", count); dialog->eventOkClicked.clear(); dialog->eventOkClicked += MyGUI::newDelegate(this, &CompanionWindow::dragItem); } else dragItem (NULL, count); }
void CompanionWindow::onBackgroundSelected() { if (mDragAndDrop->mIsOnDragAndDrop) { mDragAndDrop->drop(mModel, mItemView); updateEncumbranceBar(); } }
void CompanionWindow::notifyItemDragged(MWWorld::Ptr item, int count) { if (mPtr.getTypeName() == typeid(ESM::NPC).name()) { MWMechanics::NpcStats& stats = MWWorld::Class::get(mPtr).getNpcStats(mPtr); stats.modifyProfit(MWWorld::Class::get(item).getValue(item) * count); } updateEncumbranceBar(); }
void InventoryWindow::open() { updateEncumbranceBar(); mTrading = false; mBoughtItems.clear(); onWindowResize(static_cast<MyGUI::Window*>(mMainWidget)); }
void InventoryWindow::open() { mPtr = MWBase::Environment::get().getWorld()->getPlayerPtr(); updateEncumbranceBar(); mItemView->update(); notifyContentChanged(); adjustPanes(); }
void CompanionWindow::open(const MWWorld::Ptr& npc) { mPtr = npc; updateEncumbranceBar(); mModel = new CompanionItemModel(npc); mSortModel = new SortFilterItemModel(mModel); mItemView->setModel(mSortModel); setTitle(npc.getClass().getName(npc)); }
void InventoryWindow::open() { mPtr = MWMechanics::getPlayer(); updateEncumbranceBar(); mItemView->update(); notifyContentChanged(); adjustPanes(); }
void CompanionWindow::onFrame() { updateEncumbranceBar(); }