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