1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-02 23:45:32 +00:00

Remove unnecessary WindowManager::messageBox arguments

This commit is contained in:
scrawl 2013-03-30 12:56:37 +01:00
parent 04673b2f14
commit e7af718b55
18 changed files with 41 additions and 41 deletions

View file

@ -115,7 +115,7 @@ namespace MWClass
if (needKey && hasKey)
{
MWBase::Environment::get().getWindowManager ()->messageBox (keyName + " #{sKeyUsed}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager ()->messageBox (keyName + " #{sKeyUsed}");
ptr.getCellRef().mLockLevel = 0;
// using a key disarms the trap
ptr.getCellRef().mTrap = "";

View file

@ -98,7 +98,7 @@ namespace MWClass
if (needKey && hasKey)
{
MWBase::Environment::get().getWindowManager ()->messageBox (keyName + " #{sKeyUsed}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager ()->messageBox (keyName + " #{sKeyUsed}");
ptr.getCellRef().mLockLevel = 0;
// using a key disarms the trap
ptr.getCellRef().mTrap = "";

View file

@ -77,40 +77,40 @@ namespace MWGui
if (result == MWMechanics::Alchemy::Result_NoName)
{
mWindowManager.messageBox("#{sNotifyMessage37}", std::vector<std::string>());
mWindowManager.messageBox("#{sNotifyMessage37}");
return;
}
// check if mortar & pestle is available (always needed)
if (result == MWMechanics::Alchemy::Result_NoMortarAndPestle)
{
mWindowManager.messageBox("#{sNotifyMessage45}", std::vector<std::string>());
mWindowManager.messageBox("#{sNotifyMessage45}");
return;
}
// make sure 2 or more ingredients were selected
if (result == MWMechanics::Alchemy::Result_LessThanTwoIngredients)
{
mWindowManager.messageBox("#{sNotifyMessage6a}", std::vector<std::string>());
mWindowManager.messageBox("#{sNotifyMessage6a}");
return;
}
if (result == MWMechanics::Alchemy::Result_NoEffects)
{
mWindowManager.messageBox("#{sNotifyMessage8}", std::vector<std::string>());
mWindowManager.messageBox("#{sNotifyMessage8}");
MWBase::Environment::get().getSoundManager()->playSound("potion fail", 1.f, 1.f);
return;
}
if (result == MWMechanics::Alchemy::Result_Success)
{
mWindowManager.messageBox("#{sPotionSuccess}", std::vector<std::string>());
mWindowManager.messageBox("#{sPotionSuccess}");
MWBase::Environment::get().getSoundManager()->playSound("potion success", 1.f, 1.f);
}
else if (result == MWMechanics::Alchemy::Result_RandomFailure)
{
// potion failed
mWindowManager.messageBox("#{sNotifyMessage8}", std::vector<std::string>());
mWindowManager.messageBox("#{sNotifyMessage8}");
MWBase::Environment::get().getSoundManager()->playSound("potion fail", 1.f, 1.f);
}

View file

@ -150,7 +150,7 @@ void ContainerBase::onSelectedItem(MyGUI::Widget* _sender)
{
// user notification "i don't buy this item"
MWBase::Environment::get().getWindowManager()->
messageBox("#{sBarterDialog4}", std::vector<std::string>());
messageBox("#{sBarterDialog4}");
return;
}
}
@ -294,7 +294,7 @@ void ContainerBase::onContainerClicked(MyGUI::Widget* _sender)
{
// user notification
MWBase::Environment::get().getWindowManager()->
messageBox("#{sContentsMessage2}", std::vector<std::string>());
messageBox("#{sContentsMessage2}");
return;
}
@ -318,7 +318,7 @@ void ContainerBase::onContainerClicked(MyGUI::Widget* _sender)
object.getRefData().setCount(origCount);
// user notification
MWBase::Environment::get().getWindowManager()->
messageBox("#{sContentsMessage3}", std::vector<std::string>());
messageBox("#{sContentsMessage3}");
return;
}

View file

@ -162,7 +162,7 @@ namespace MWGui
MWMechanics::NpcStats& pcStats = MWWorld::Class::get(player).getNpcStats (player);
if (mSpentAttributes.size() < 3)
MWBase::Environment::get().getWindowManager ()->messageBox("#{sNotifyMessage36}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager ()->messageBox("#{sNotifyMessage36}");
else
{
// increase attributes

View file

@ -291,7 +291,7 @@ namespace MWGui
if (item.getRefData ().getCount() == 0)
{
MWBase::Environment::get().getWindowManager ()->messageBox (
"#{sQuickMenu5} " + MWWorld::Class::get(item).getName(item), std::vector<std::string>());
"#{sQuickMenu5} " + MWWorld::Class::get(item).getName(item));
return;
}
@ -317,7 +317,7 @@ namespace MWGui
if (item.getRefData ().getCount() == 0)
{
MWBase::Environment::get().getWindowManager ()->messageBox (
"#{sQuickMenu5} " + MWWorld::Class::get(item).getName(item), std::vector<std::string>());
"#{sQuickMenu5} " + MWWorld::Class::get(item).getName(item));
return;
}

View file

@ -362,7 +362,7 @@ namespace MWGui
{
std::string msg = "This resolution is not supported in Fullscreen mode. Please select a resolution from the list.";
MWBase::Environment::get().getWindowManager()->
messageBox(msg, std::vector<std::string>());
messageBox(msg);
_sender->castType<MyGUI::Button>()->setCaption(off);
}
else
@ -593,7 +593,7 @@ namespace MWGui
static_cast<MyGUI::Button*>(_sender)->setCaptionWithReplacing("#{sNone}");
MWBase::Environment::get().getWindowManager ()->messageBox ("#{sControlsMenu3}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager ()->messageBox ("#{sControlsMenu3}");
MWBase::Environment::get().getWindowManager ()->disallowMouse();
MWBase::Environment::get().getInputManager ()->enableDetectingBindingMode (actionId);

View file

@ -310,25 +310,25 @@ namespace MWGui
{
if (mEffects.size() <= 0)
{
mWindowManager.messageBox ("#{sNotifyMessage30}", std::vector<std::string>());
mWindowManager.messageBox ("#{sNotifyMessage30}");
return;
}
if (mNameEdit->getCaption () == "")
{
mWindowManager.messageBox ("#{sNotifyMessage10}", std::vector<std::string>());
mWindowManager.messageBox ("#{sNotifyMessage10}");
return;
}
if (mMagickaCost->getCaption() == "0")
{
mWindowManager.messageBox ("#{sEnchantmentMenu8}", std::vector<std::string>());
mWindowManager.messageBox ("#{sEnchantmentMenu8}");
return;
}
if (boost::lexical_cast<int>(mPriceLabel->getCaption()) > mWindowManager.getInventoryWindow()->getPlayerGold())
{
mWindowManager.messageBox ("#{sNotifyMessage18}", std::vector<std::string>());
mWindowManager.messageBox ("#{sNotifyMessage18}");
return;
}
@ -517,7 +517,7 @@ namespace MWGui
{
if (mEffects.size() >= 8)
{
MWBase::Environment::get().getWindowManager()->messageBox("#{sNotifyMessage28}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager()->messageBox("#{sNotifyMessage28}");
return;
}
@ -528,7 +528,7 @@ namespace MWGui
{
if (it->mEffectID == effectId)
{
MWBase::Environment::get().getWindowManager()->messageBox ("#{sOnetypeEffectMessage}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager()->messageBox ("#{sOnetypeEffectMessage}");
return;
}
}

View file

@ -404,7 +404,7 @@ namespace MWGui
if (spell->mData.mFlags & ESM::Spell::F_Always
|| spell->mData.mType == ESM::Spell::ST_Power)
{
mWindowManager.messageBox("#{sDeleteSpellError}", std::vector<std::string>());
mWindowManager.messageBox("#{sDeleteSpellError}");
}
else
{

View file

@ -50,7 +50,7 @@ void TextInputDialog::onOkClicked(MyGUI::Widget* _sender)
{
if (mTextEdit->getCaption() == "")
{
mWindowManager.messageBox ("#{sNotifyMessage37}", std::vector<std::string>());
mWindowManager.messageBox ("#{sNotifyMessage37}");
MyGUI::InputManager::getInstance ().setKeyFocusWidget (mTextEdit);
}
else
@ -61,7 +61,7 @@ void TextInputDialog::onTextAccepted(MyGUI::Edit* _sender)
{
if (mTextEdit->getCaption() == "")
{
mWindowManager.messageBox ("#{sNotifyMessage37}", std::vector<std::string>());
mWindowManager.messageBox ("#{sNotifyMessage37}");
MyGUI::InputManager::getInstance ().setKeyFocusWidget (mTextEdit);
}
else

View file

@ -181,7 +181,7 @@ namespace MWGui
{
// user notification
MWBase::Environment::get().getWindowManager()->
messageBox("#{sBarterDialog11}", std::vector<std::string>());
messageBox("#{sBarterDialog11}");
return;
}
@ -190,7 +190,7 @@ namespace MWGui
{
// user notification
MWBase::Environment::get().getWindowManager()->
messageBox("#{sBarterDialog1}", std::vector<std::string>());
messageBox("#{sBarterDialog1}");
return;
}
@ -199,7 +199,7 @@ namespace MWGui
{
// user notification
MWBase::Environment::get().getWindowManager()->
messageBox("#{sBarterDialog2}", std::vector<std::string>());
messageBox("#{sBarterDialog2}");
return;
}
@ -209,7 +209,7 @@ namespace MWGui
if (mPtr.getTypeName() != typeid(ESM::NPC).name())
{
MWBase::Environment::get().getWindowManager()->
messageBox("#{sNotifyMessage9}", std::vector<std::string>());
messageBox("#{sNotifyMessage9}");
return;
}
@ -245,7 +245,7 @@ namespace MWGui
if(roll > x) //trade refused
{
MWBase::Environment::get().getWindowManager()->
messageBox("#{sNotifyMessage9}", std::vector<std::string>());
messageBox("#{sNotifyMessage9}");
int iBarterFailDisposition = gmst.find("iBarterFailDisposition")->getInt();
MWBase::Environment::get().getDialogueManager()->applyTemporaryDispositionChange(iBarterFailDisposition);

View file

@ -129,7 +129,7 @@ namespace MWGui
MWMechanics::NpcStats& npcStats = MWWorld::Class::get(mPtr).getNpcStats (mPtr);
if (npcStats.getSkill (skillId).getBase () <= pcStats.getSkill (skillId).getBase ())
{
mWindowManager.messageBox ("#{sServiceTrainingWords}", std::vector<std::string>());
mWindowManager.messageBox ("#{sServiceTrainingWords}");
return;
}

View file

@ -83,7 +83,7 @@ namespace MWGui
if (canRest == 2)
{
// resting underwater or mid-air not allowed
mWindowManager.messageBox ("#{sNotifyMessage1}", std::vector<std::string>());
mWindowManager.messageBox ("#{sNotifyMessage1}");
mWindowManager.popGuiMode ();
}

View file

@ -256,7 +256,7 @@ namespace MWMechanics
if(MWWorld::Class::get(iter->first).isEssential(iter->first))
MWBase::Environment::get().getWindowManager()->messageBox(
"#{sKilledEssential}", std::vector<std::string>());
"#{sKilledEssential}");
}
}

View file

@ -221,12 +221,12 @@ void MWMechanics::NpcStats::increaseSkill(int skillIndex, const ESM::Class &clas
message << boost::format(MWBase::Environment::get().getWindowManager ()->getGameSettingString ("sNotifyMessage39", ""))
% std::string("#{" + ESM::Skill::sSkillNameIds[skillIndex] + "}")
% static_cast<int> (base);
MWBase::Environment::get().getWindowManager ()->messageBox(message.str(), std::vector<std::string>());
MWBase::Environment::get().getWindowManager ()->messageBox(message.str());
if (mLevelProgress >= 10)
{
// levelup is possible now
MWBase::Environment::get().getWindowManager ()->messageBox ("#{sLevelUpMsg}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager ()->messageBox ("#{sLevelUpMsg}");
}
getSkill (skillIndex).setBase (base);

View file

@ -83,7 +83,7 @@ namespace MWScript
msgBox = boost::str(boost::format(msgBox) % count % itemName);
}
MWBase::Environment::get().getWindowManager()->messageBox(msgBox, std::vector<std::string>());
MWBase::Environment::get().getWindowManager()->messageBox(msgBox);
}
}
};
@ -179,7 +179,7 @@ namespace MWScript
}
if (numRemoved > 0)
MWBase::Environment::get().getWindowManager()->messageBox(msgBox, std::vector<std::string>());
MWBase::Environment::get().getWindowManager()->messageBox(msgBox);
}
}
};

View file

@ -62,7 +62,7 @@ namespace MWWorld
if((*itr).mPart == ESM::PRT_Head)
{
if(actor == MWBase::Environment::get().getWorld()->getPlayer().getPlayer() )
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage13}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage13}");
allow = false;
break;
@ -90,12 +90,12 @@ namespace MWWorld
if(actor == MWBase::Environment::get().getWorld()->getPlayer().getPlayer() )
{
if(it.getType() == MWWorld::ContainerStore::Type_Clothing){ // It's shoes
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage15}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage15}");
}
else // It's boots
{
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage14}", std::vector<std::string>());
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage14}");
}
}
break;

View file

@ -15,7 +15,7 @@ namespace MWWorld
{
if ( actor.getRefData().getHandle()=="player" && !(message.empty()))
{
MWBase::Environment::get().getWindowManager() ->messageBox(message, std::vector<std::string>());
MWBase::Environment::get().getWindowManager() ->messageBox(message);
}
}
}