forked from mirror/openmw-tes3mp
more clean up. The container GUI shows up now
This commit is contained in:
parent
a38db39e88
commit
78c8a22cd1
5 changed files with 52 additions and 52 deletions
|
@ -27,7 +27,7 @@ ContainerWindow::ContainerWindow(WindowManager& parWindowManager,MWWorld::Enviro
|
|||
mEnvironment(environment)
|
||||
{
|
||||
setText("_Main", "Name of Container");
|
||||
setVisible(false);
|
||||
center();
|
||||
|
||||
getWidget(containerWidget, "Items");
|
||||
getWidget(takeButton, "TakeButton");
|
||||
|
@ -35,17 +35,10 @@ ContainerWindow::ContainerWindow(WindowManager& parWindowManager,MWWorld::Enviro
|
|||
|
||||
setText("CloseButton","Close");
|
||||
setText("TakeButton","Take All");
|
||||
|
||||
//ctor
|
||||
}
|
||||
|
||||
ContainerWindow::~ContainerWindow()
|
||||
{
|
||||
//dtor
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ContainerWindow::setName(std::string contName)
|
||||
|
@ -108,49 +101,49 @@ void ContainerWindow::open(MWWorld::Ptr& container)
|
|||
std::string path = std::string("icons\\");
|
||||
|
||||
|
||||
path += iter.getInventoryIcon();
|
||||
// switch (iter.getType())
|
||||
// {
|
||||
//
|
||||
// case MWWorld::ContainerStore::Type_Potion:
|
||||
// path += iter->get<ESM::Potion>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Apparatus:
|
||||
// path += iter->get<ESM::Apparatus>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Armor:
|
||||
// path += iter->get<ESM::Armor>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Book:
|
||||
// path += iter->get<ESM::Book>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Clothing:
|
||||
// path += iter->get<ESM::Clothing>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Ingredient:
|
||||
// path += iter->get<ESM::Ingredient>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Light:
|
||||
// path += iter->get<ESM::Light>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Lockpick:
|
||||
// path += iter->get<ESM::Tool>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Miscellaneous:
|
||||
// path += iter->get<ESM::Miscellaneous>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Probe:
|
||||
// path += iter->get<ESM::Probe>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Repair:
|
||||
// path += iter->get<ESM::Repair>()->base->icon;
|
||||
// break;
|
||||
// case MWWorld::ContainerStore::Type_Weapon:
|
||||
// path += iter->get<ESM::Weapon>()->base->icon;
|
||||
// break;
|
||||
//
|
||||
//
|
||||
// }
|
||||
//path += iter.getInventoryIcon();
|
||||
switch (iter.getType())
|
||||
{
|
||||
|
||||
case MWWorld::ContainerStore::Type_Potion:
|
||||
path += iter->get<ESM::Potion>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Apparatus:
|
||||
path += iter->get<ESM::Apparatus>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Armor:
|
||||
path += iter->get<ESM::Armor>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Book:
|
||||
path += iter->get<ESM::Book>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Clothing:
|
||||
path += iter->get<ESM::Clothing>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Ingredient:
|
||||
path += iter->get<ESM::Ingredient>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Light:
|
||||
path += iter->get<ESM::Light>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Lockpick:
|
||||
path += iter->get<ESM::Tool>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Miscellaneous:
|
||||
path += iter->get<ESM::Miscellaneous>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Probe:
|
||||
path += iter->get<ESM::Probe>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Repair:
|
||||
path += iter->get<ESM::Repair>()->base->icon;
|
||||
break;
|
||||
case MWWorld::ContainerStore::Type_Weapon:
|
||||
path += iter->get<ESM::Weapon>()->base->icon;
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
count++;
|
||||
|
||||
if(count % 8 == 0)
|
||||
|
|
|
@ -7,6 +7,7 @@ namespace MWGui
|
|||
{
|
||||
GM_Game, // Game mode, only HUD
|
||||
GM_Inventory, // Inventory mode
|
||||
GM_Container,
|
||||
GM_MainMenu, // Main menu mode
|
||||
|
||||
GM_Console, // Console mode
|
||||
|
|
|
@ -181,6 +181,7 @@ void WindowManager::updateVisible()
|
|||
console->disable();
|
||||
mJournal->setVisible(false);
|
||||
dialogueWindow->setVisible(false);
|
||||
containerWindow->setVisible(false);
|
||||
|
||||
// Mouse is visible whenever we're not in game mode
|
||||
MyGUI::PointerManager::getInstance().setVisible(isGuiMode());
|
||||
|
@ -216,8 +217,12 @@ void WindowManager::updateVisible()
|
|||
// Show the windows we want
|
||||
map -> setVisible( (eff & GW_Map) != 0 );
|
||||
stats -> setVisible( (eff & GW_Stats) != 0 );
|
||||
|
||||
break;
|
||||
}
|
||||
case GM_Container:
|
||||
containerWindow->setVisible(true);
|
||||
break;
|
||||
case GM_Dialogue:
|
||||
dialogueWindow->open();
|
||||
break;
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace MWWorld
|
|||
|
||||
void ActionOpen::execute (Environment& environment)
|
||||
{
|
||||
environment.mWindowManager->setGuiMode(MWGui::GuiMode::GM_Container);
|
||||
environment.mWindowManager->getContainerWindow()->open(mContainer);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -483,7 +483,7 @@ std::string MWWorld::ContainerStoreIterator::getInventoryIcon()
|
|||
throw std::runtime_error ("invalid iterator");
|
||||
|
||||
|
||||
std::string s = ptr.getInventoryIcon();
|
||||
std::string s = "";//ptr.getInventoryIcon();
|
||||
|
||||
return s;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue