mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 09:06:43 +00:00
Use MyGUI::utility in favor of boost lexical_cast
This commit is contained in:
parent
eecea4131f
commit
728b842e72
30 changed files with 103 additions and 155 deletions
|
@ -4,8 +4,6 @@
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <components/esm/records.hpp>
|
#include <components/esm/records.hpp>
|
||||||
#include <components/misc/resourcehelpers.hpp>
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
|
|
||||||
|
@ -234,7 +232,7 @@ namespace MWGui
|
||||||
for (std::vector<std::string>::const_iterator it = categories[category].spells.begin(); it != end; ++it)
|
for (std::vector<std::string>::const_iterator it = categories[category].spells.begin(); it != end; ++it)
|
||||||
{
|
{
|
||||||
const std::string &spellId = *it;
|
const std::string &spellId = *it;
|
||||||
spellWidget = mSpellArea->createWidget<Widgets::MWSpell>("MW_StatName", coord, MyGUI::Align::Default, std::string("Spell") + boost::lexical_cast<std::string>(i));
|
spellWidget = mSpellArea->createWidget<Widgets::MWSpell>("MW_StatName", coord, MyGUI::Align::Default, std::string("Spell") + MyGUI::utility::toString(i));
|
||||||
spellWidget->setSpellId(spellId);
|
spellWidget->setSpellId(spellId);
|
||||||
|
|
||||||
mSpellItems.push_back(spellWidget);
|
mSpellItems.push_back(spellWidget);
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include <MyGUI_TextBox.h>
|
#include <MyGUI_TextBox.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <components/esm/loadbook.hpp>
|
#include <components/esm/loadbook.hpp>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
|
@ -142,8 +140,8 @@ namespace MWGui
|
||||||
|
|
||||||
void BookWindow::updatePages()
|
void BookWindow::updatePages()
|
||||||
{
|
{
|
||||||
mLeftPageNumber->setCaption( boost::lexical_cast<std::string>(mCurrentPage*2 + 1) );
|
mLeftPageNumber->setCaption( MyGUI::utility::toString(mCurrentPage*2 + 1) );
|
||||||
mRightPageNumber->setCaption( boost::lexical_cast<std::string>(mCurrentPage*2 + 2) );
|
mRightPageNumber->setCaption( MyGUI::utility::toString(mCurrentPage*2 + 2) );
|
||||||
|
|
||||||
//If it is the last page, hide the button "Next Page"
|
//If it is the last page, hide the button "Next Page"
|
||||||
if ( (mCurrentPage+1)*2 == mPages.size()
|
if ( (mCurrentPage+1)*2 == mPages.size()
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "charactercreation.hpp"
|
#include "charactercreation.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
#include "../mwbase/soundmanager.hpp"
|
||||||
#include "../mwbase/mechanicsmanager.hpp"
|
#include "../mwbase/mechanicsmanager.hpp"
|
||||||
|
@ -34,11 +32,11 @@ namespace
|
||||||
Step sGenerateClassSteps(int number) {
|
Step sGenerateClassSteps(int number) {
|
||||||
number++;
|
number++;
|
||||||
const MWWorld::Fallback* fallback=MWBase::Environment::get().getWorld()->getFallback();
|
const MWWorld::Fallback* fallback=MWBase::Environment::get().getWorld()->getFallback();
|
||||||
Step step = {fallback->getFallbackString("Question_"+boost::lexical_cast<std::string>(number)+"_Question"),
|
Step step = {fallback->getFallbackString("Question_"+MyGUI::utility::toString(number)+"_Question"),
|
||||||
{fallback->getFallbackString("Question_"+boost::lexical_cast<std::string>(number)+"_AnswerOne"),
|
{fallback->getFallbackString("Question_"+MyGUI::utility::toString(number)+"_AnswerOne"),
|
||||||
fallback->getFallbackString("Question_"+boost::lexical_cast<std::string>(number)+"_AnswerTwo"),
|
fallback->getFallbackString("Question_"+MyGUI::utility::toString(number)+"_AnswerTwo"),
|
||||||
fallback->getFallbackString("Question_"+boost::lexical_cast<std::string>(number)+"_AnswerThree")},
|
fallback->getFallbackString("Question_"+MyGUI::utility::toString(number)+"_AnswerThree")},
|
||||||
"vo\\misc\\chargen qa"+boost::lexical_cast<std::string>(number)+".wav"
|
"vo\\misc\\chargen qa"+MyGUI::utility::toString(number)+".wav"
|
||||||
};
|
};
|
||||||
return step;
|
return step;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "companionwindow.hpp"
|
#include "companionwindow.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_InputManager.h>
|
#include <MyGUI_InputManager.h>
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
|
@ -122,7 +120,7 @@ void CompanionWindow::updateEncumbranceBar()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MWMechanics::NpcStats& stats = mPtr.getClass().getNpcStats(mPtr);
|
MWMechanics::NpcStats& stats = mPtr.getClass().getNpcStats(mPtr);
|
||||||
mProfitLabel->setCaptionWithReplacing("#{sProfitValue} " + boost::lexical_cast<std::string>(stats.getProfit()));
|
mProfitLabel->setCaptionWithReplacing("#{sProfitValue} " + MyGUI::utility::toString(stats.getProfit()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "container.hpp"
|
#include "container.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_InputManager.h>
|
#include <MyGUI_InputManager.h>
|
||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include "dialogue.hpp"
|
#include "dialogue.hpp"
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_LanguageManager.h>
|
#include <MyGUI_LanguageManager.h>
|
||||||
#include <MyGUI_Window.h>
|
#include <MyGUI_Window.h>
|
||||||
|
@ -100,7 +99,7 @@ namespace MWGui
|
||||||
mBribe100Button->setEnabled (playerGold >= 100);
|
mBribe100Button->setEnabled (playerGold >= 100);
|
||||||
mBribe1000Button->setEnabled (playerGold >= 1000);
|
mBribe1000Button->setEnabled (playerGold >= 1000);
|
||||||
|
|
||||||
mGoldLabel->setCaptionWithReplacing("#{sGold}: " + boost::lexical_cast<std::string>(playerGold));
|
mGoldLabel->setCaptionWithReplacing("#{sGold}: " + MyGUI::utility::toString(playerGold));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PersuasionDialog::exit()
|
void PersuasionDialog::exit()
|
||||||
|
@ -630,7 +629,7 @@ namespace MWGui
|
||||||
dispositionVisible = true;
|
dispositionVisible = true;
|
||||||
mDispositionBar->setProgressRange(100);
|
mDispositionBar->setProgressRange(100);
|
||||||
mDispositionBar->setProgressPosition(MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr));
|
mDispositionBar->setProgressPosition(MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr));
|
||||||
mDispositionText->setCaption(boost::lexical_cast<std::string>(MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr))+std::string("/100"));
|
mDispositionText->setCaption(MyGUI::utility::toString(MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr))+std::string("/100"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool dispositionWasVisible = mDispositionBar->getVisible();
|
bool dispositionWasVisible = mDispositionBar->getVisible();
|
||||||
|
@ -672,7 +671,7 @@ namespace MWGui
|
||||||
+ MWBase::Environment::get().getDialogueManager()->getTemporaryDispositionChange()));
|
+ MWBase::Environment::get().getDialogueManager()->getTemporaryDispositionChange()));
|
||||||
mDispositionBar->setProgressRange(100);
|
mDispositionBar->setProgressRange(100);
|
||||||
mDispositionBar->setProgressPosition(disp);
|
mDispositionBar->setProgressPosition(disp);
|
||||||
mDispositionText->setCaption(boost::lexical_cast<std::string>(disp)+std::string("/100"));
|
mDispositionText->setCaption(MyGUI::utility::toString(disp)+std::string("/100"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,15 +105,15 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
std::stringstream enchantCost;
|
std::stringstream enchantCost;
|
||||||
enchantCost << std::setprecision(1) << std::fixed << mEnchanting.getEnchantPoints();
|
enchantCost << std::setprecision(1) << std::fixed << mEnchanting.getEnchantPoints();
|
||||||
mEnchantmentPoints->setCaption(enchantCost.str() + " / " + boost::lexical_cast<std::string>(mEnchanting.getMaxEnchantValue()));
|
mEnchantmentPoints->setCaption(enchantCost.str() + " / " + MyGUI::utility::toString(mEnchanting.getMaxEnchantValue()));
|
||||||
|
|
||||||
mCharge->setCaption(boost::lexical_cast<std::string>(mEnchanting.getGemCharge()));
|
mCharge->setCaption(MyGUI::utility::toString(mEnchanting.getGemCharge()));
|
||||||
|
|
||||||
std::stringstream castCost;
|
std::stringstream castCost;
|
||||||
castCost << mEnchanting.getEffectiveCastCost();
|
castCost << mEnchanting.getEffectiveCastCost();
|
||||||
mCastCost->setCaption(castCost.str());
|
mCastCost->setCaption(castCost.str());
|
||||||
|
|
||||||
mPrice->setCaption(boost::lexical_cast<std::string>(mEnchanting.getEnchantPrice()));
|
mPrice->setCaption(MyGUI::utility::toString(mEnchanting.getEnchantPrice()));
|
||||||
|
|
||||||
switch(mEnchanting.getCastStyle())
|
switch(mEnchanting.getCastStyle())
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
#include <boost/algorithm/string/replace.hpp>
|
#include <boost/algorithm/string/replace.hpp>
|
||||||
#include <boost/algorithm/string/predicate.hpp>
|
#include <boost/algorithm/string/predicate.hpp>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <components/interpreter/defines.hpp>
|
#include <components/interpreter/defines.hpp>
|
||||||
#include <components/misc/resourcehelpers.hpp>
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
|
@ -284,8 +283,8 @@ namespace MWGui
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::string src = attr.at("src");
|
std::string src = attr.at("src");
|
||||||
int width = boost::lexical_cast<int>(attr.at("width"));
|
int width = MyGUI::utility::parseInt(attr.at("width"));
|
||||||
int height = boost::lexical_cast<int>(attr.at("height"));
|
int height = MyGUI::utility::parseInt(attr.at("height"));
|
||||||
|
|
||||||
ImageElement elem(paper, pag, mBlockStyle,
|
ImageElement elem(paper, pag, mBlockStyle,
|
||||||
src, width, height);
|
src, width, height);
|
||||||
|
@ -397,7 +396,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
MyGUI::EditBox* box = parent->createWidget<MyGUI::EditBox>("NormalText",
|
MyGUI::EditBox* box = parent->createWidget<MyGUI::EditBox>("NormalText",
|
||||||
MyGUI::IntCoord(0, pag.getCurrentTop(), pag.getPageWidth(), 0), MyGUI::Align::Left | MyGUI::Align::Top,
|
MyGUI::IntCoord(0, pag.getCurrentTop(), pag.getPageWidth(), 0), MyGUI::Align::Left | MyGUI::Align::Top,
|
||||||
parent->getName() + boost::lexical_cast<std::string>(parent->getChildCount()));
|
parent->getName() + MyGUI::utility::toString(parent->getChildCount()));
|
||||||
box->setProperty("Static", "true");
|
box->setProperty("Static", "true");
|
||||||
box->setProperty("MultiLine", "true");
|
box->setProperty("MultiLine", "true");
|
||||||
box->setProperty("WordWrap", "true");
|
box->setProperty("WordWrap", "true");
|
||||||
|
@ -465,7 +464,7 @@ namespace MWGui
|
||||||
|
|
||||||
mImageBox = parent->createWidget<MyGUI::ImageBox> ("ImageBox",
|
mImageBox = parent->createWidget<MyGUI::ImageBox> ("ImageBox",
|
||||||
MyGUI::IntCoord(left, pag.getCurrentTop(), width, mImageHeight), MyGUI::Align::Left | MyGUI::Align::Top,
|
MyGUI::IntCoord(left, pag.getCurrentTop(), width, mImageHeight), MyGUI::Align::Left | MyGUI::Align::Top,
|
||||||
parent->getName() + boost::lexical_cast<std::string>(parent->getChildCount()));
|
parent->getName() + MyGUI::utility::toString(parent->getChildCount()));
|
||||||
|
|
||||||
std::string image = Misc::ResourceHelpers::correctBookartPath(src, width, mImageHeight);
|
std::string image = Misc::ResourceHelpers::correctBookartPath(src, width, mImageHeight);
|
||||||
mImageBox->setImageTexture(image);
|
mImageBox->setImageTexture(image);
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "hud.hpp"
|
#include "hud.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <OgreMath.h>
|
#include <OgreMath.h>
|
||||||
|
|
||||||
#include <MyGUI_RenderManager.h>
|
#include <MyGUI_RenderManager.h>
|
||||||
|
@ -214,17 +212,17 @@ namespace MWGui
|
||||||
void HUD::setFPS(float fps)
|
void HUD::setFPS(float fps)
|
||||||
{
|
{
|
||||||
if (mFpsCounter)
|
if (mFpsCounter)
|
||||||
mFpsCounter->setCaption(boost::lexical_cast<std::string>((int)fps));
|
mFpsCounter->setCaption(MyGUI::utility::toString((int)fps));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HUD::setTriangleCount(unsigned int count)
|
void HUD::setTriangleCount(unsigned int count)
|
||||||
{
|
{
|
||||||
mTriangleCounter->setCaption(boost::lexical_cast<std::string>(count));
|
mTriangleCounter->setCaption(MyGUI::utility::toString(count));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HUD::setBatchCount(unsigned int count)
|
void HUD::setBatchCount(unsigned int count)
|
||||||
{
|
{
|
||||||
mBatchCounter->setCaption(boost::lexical_cast<std::string>(count));
|
mBatchCounter->setCaption(MyGUI::utility::toString(count));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HUD::setValue(const std::string& id, const MWMechanics::DynamicStat<float>& value)
|
void HUD::setValue(const std::string& id, const MWMechanics::DynamicStat<float>& value)
|
||||||
|
@ -233,7 +231,7 @@ namespace MWGui
|
||||||
int modified = static_cast<int>(value.getModified());
|
int modified = static_cast<int>(value.getModified());
|
||||||
|
|
||||||
MyGUI::Widget* w;
|
MyGUI::Widget* w;
|
||||||
std::string valStr = boost::lexical_cast<std::string>(current) + "/" + boost::lexical_cast<std::string>(modified);
|
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
|
||||||
if (id == "HBar")
|
if (id == "HBar")
|
||||||
{
|
{
|
||||||
mHealth->setProgressRange(modified);
|
mHealth->setProgressRange(modified);
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
#include <MyGUI_InputManager.h>
|
#include <MyGUI_InputManager.h>
|
||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/soundmanager.hpp"
|
#include "../mwbase/soundmanager.hpp"
|
||||||
|
@ -542,9 +540,9 @@ namespace MWGui
|
||||||
if (mPreviewResize || mPreviewDirty)
|
if (mPreviewResize || mPreviewDirty)
|
||||||
{
|
{
|
||||||
mArmorRating->setCaptionWithReplacing ("#{sArmor}: "
|
mArmorRating->setCaptionWithReplacing ("#{sArmor}: "
|
||||||
+ boost::lexical_cast<std::string>(static_cast<int>(mPtr.getClass().getArmorRating(mPtr))));
|
+ MyGUI::utility::toString(static_cast<int>(mPtr.getClass().getArmorRating(mPtr))));
|
||||||
if (mArmorRating->getTextSize().width > mArmorRating->getSize().width)
|
if (mArmorRating->getTextSize().width > mArmorRating->getSize().width)
|
||||||
mArmorRating->setCaptionWithReplacing (boost::lexical_cast<std::string>(static_cast<int>(mPtr.getClass().getArmorRating(mPtr))));
|
mArmorRating->setCaptionWithReplacing (MyGUI::utility::toString(static_cast<int>(mPtr.getClass().getArmorRating(mPtr))));
|
||||||
}
|
}
|
||||||
if (mPreviewResize)
|
if (mPreviewResize)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_FactoryManager.h>
|
#include <MyGUI_FactoryManager.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
#include <MyGUI_TextBox.h>
|
#include <MyGUI_TextBox.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <components/misc/resourcehelpers.hpp>
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
|
|
||||||
#include "../mwworld/class.hpp"
|
#include "../mwworld/class.hpp"
|
||||||
|
@ -17,9 +15,9 @@ namespace
|
||||||
if (count == 1)
|
if (count == 1)
|
||||||
return "";
|
return "";
|
||||||
if (count > 9999)
|
if (count > 9999)
|
||||||
return boost::lexical_cast<std::string>(int(count/1000.f)) + "k";
|
return MyGUI::utility::toString(int(count/1000.f)) + "k";
|
||||||
else
|
else
|
||||||
return boost::lexical_cast<std::string>(count);
|
return MyGUI::utility::toString(count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <components/widgets/imagebutton.hpp>
|
#include <components/widgets/imagebutton.hpp>
|
||||||
#include <components/widgets/list.hpp>
|
#include <components/widgets/list.hpp>
|
||||||
|
@ -74,7 +73,7 @@ namespace
|
||||||
void setText (char const * name, value_type const & value)
|
void setText (char const * name, value_type const & value)
|
||||||
{
|
{
|
||||||
getWidget <MyGUI::TextBox> (name) ->
|
getWidget <MyGUI::TextBox> (name) ->
|
||||||
setCaption (boost::lexical_cast <std::string> (value));
|
setCaption (MyGUI::utility::toString (value));
|
||||||
}
|
}
|
||||||
|
|
||||||
void setVisible (char const * name, bool visible)
|
void setVisible (char const * name, bool visible)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "mapwindow.hpp"
|
#include "mapwindow.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <OgreSceneNode.h>
|
#include <OgreSceneNode.h>
|
||||||
#include <OgreVector2.h>
|
#include <OgreVector2.h>
|
||||||
|
|
||||||
|
@ -235,8 +233,8 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
for (int my=0; my<3; ++my)
|
for (int my=0; my<3; ++my)
|
||||||
{
|
{
|
||||||
std::string image = mPrefix+"_"+ boost::lexical_cast<std::string>(mCurX + (mx-1)) + "_"
|
std::string image = mPrefix+"_"+ MyGUI::utility::toString(mCurX + (mx-1)) + "_"
|
||||||
+ boost::lexical_cast<std::string>(mCurY + (-1*(my-1)));
|
+ MyGUI::utility::toString(mCurY + (-1*(my-1)));
|
||||||
MyGUI::ImageBox* fog = mFogWidgets[my + 3*mx];
|
MyGUI::ImageBox* fog = mFogWidgets[my + 3*mx];
|
||||||
fog->setImageTexture(mFogOfWar ?
|
fog->setImageTexture(mFogOfWar ?
|
||||||
((MyGUI::RenderManager::getInstance().getTexture(image+"_fog") != 0) ? image+"_fog"
|
((MyGUI::RenderManager::getInstance().getTexture(image+"_fog") != 0) ? image+"_fog"
|
||||||
|
@ -362,8 +360,8 @@ namespace MWGui
|
||||||
for (int my=0; my<3; ++my)
|
for (int my=0; my<3; ++my)
|
||||||
{
|
{
|
||||||
// map
|
// map
|
||||||
std::string image = mPrefix+"_"+ boost::lexical_cast<std::string>(x + (mx-1)) + "_"
|
std::string image = mPrefix+"_"+ MyGUI::utility::toString(x + (mx-1)) + "_"
|
||||||
+ boost::lexical_cast<std::string>(y + (-1*(my-1)));
|
+ MyGUI::utility::toString(y + (-1*(my-1)));
|
||||||
|
|
||||||
MyGUI::ImageBox* box = mMapWidgets[my + 3*mx];
|
MyGUI::ImageBox* box = mMapWidgets[my + 3*mx];
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include <components/esm/loadgmst.hpp>
|
#include <components/esm/loadgmst.hpp>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
#include <MyGUI_ScrollView.h>
|
#include <MyGUI_ScrollView.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
@ -71,7 +69,7 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor)
|
||||||
|
|
||||||
|
|
||||||
std::string name = iter->getClass().getName(*iter)
|
std::string name = iter->getClass().getName(*iter)
|
||||||
+ " - " + boost::lexical_cast<std::string>(price)
|
+ " - " + MyGUI::utility::toString(price)
|
||||||
+ MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
+ MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>()
|
||||||
.find("sgp")->getString();
|
.find("sgp")->getString();
|
||||||
|
|
||||||
|
@ -87,7 +85,7 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor)
|
||||||
|
|
||||||
currentY += 18;
|
currentY += 18;
|
||||||
|
|
||||||
button->setUserString("Price", boost::lexical_cast<std::string>(price));
|
button->setUserString("Price", MyGUI::utility::toString(price));
|
||||||
button->setUserData(*iter);
|
button->setUserData(*iter);
|
||||||
button->setCaptionWithReplacing(name);
|
button->setCaptionWithReplacing(name);
|
||||||
button->setSize(button->getTextSize().width,18);
|
button->setSize(button->getTextSize().width,18);
|
||||||
|
@ -102,7 +100,7 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor)
|
||||||
mList->setVisibleVScroll(true);
|
mList->setVisibleVScroll(true);
|
||||||
|
|
||||||
mGoldLabel->setCaptionWithReplacing("#{sGold}: "
|
mGoldLabel->setCaptionWithReplacing("#{sGold}: "
|
||||||
+ boost::lexical_cast<std::string>(playerGold));
|
+ MyGUI::utility::toString(playerGold));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MerchantRepair::onMouseWheel(MyGUI::Widget* _sender, int _rel)
|
void MerchantRepair::onMouseWheel(MyGUI::Widget* _sender, int _rel)
|
||||||
|
@ -127,7 +125,7 @@ void MerchantRepair::onRepairButtonClick(MyGUI::Widget *sender)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
|
|
||||||
int price = boost::lexical_cast<int>(sender->getUserString("Price"));
|
int price = MyGUI::utility::parseInt(sender->getUserString("Price"));
|
||||||
if (price > player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId))
|
if (price > player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "quickkeysmenu.hpp"
|
#include "quickkeysmenu.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_EditBox.h>
|
#include <MyGUI_EditBox.h>
|
||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
@ -57,7 +55,7 @@ namespace MWGui
|
||||||
for (int i = 0; i < 10; ++i)
|
for (int i = 0; i < 10; ++i)
|
||||||
{
|
{
|
||||||
ItemWidget* button;
|
ItemWidget* button;
|
||||||
getWidget(button, "QuickKey" + boost::lexical_cast<std::string>(i+1));
|
getWidget(button, "QuickKey" + MyGUI::utility::toString(i+1));
|
||||||
|
|
||||||
button->eventMouseButtonClick += MyGUI::newDelegate(this, &QuickKeysMenu::onQuickKeyButtonClicked);
|
button->eventMouseButtonClick += MyGUI::newDelegate(this, &QuickKeysMenu::onQuickKeyButtonClicked);
|
||||||
|
|
||||||
|
@ -100,7 +98,7 @@ namespace MWGui
|
||||||
|
|
||||||
MyGUI::TextBox* textBox = key->createWidgetReal<MyGUI::TextBox>("SandText", MyGUI::FloatCoord(0,0,1,1), MyGUI::Align::Default);
|
MyGUI::TextBox* textBox = key->createWidgetReal<MyGUI::TextBox>("SandText", MyGUI::FloatCoord(0,0,1,1), MyGUI::Align::Default);
|
||||||
textBox->setTextAlign (MyGUI::Align::Center);
|
textBox->setTextAlign (MyGUI::Align::Center);
|
||||||
textBox->setCaption (boost::lexical_cast<std::string>(index+1));
|
textBox->setCaption (MyGUI::utility::toString(index+1));
|
||||||
textBox->setNeedMouseFocus (false);
|
textBox->setNeedMouseFocus (false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
#include <MyGUI_RenderManager.h>
|
#include <MyGUI_RenderManager.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
|
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
@ -402,7 +401,7 @@ namespace MWGui
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
skillWidget = mSkillList->createWidget<Widgets::MWSkill>("MW_StatNameValue", coord1, MyGUI::Align::Default,
|
skillWidget = mSkillList->createWidget<Widgets::MWSkill>("MW_StatNameValue", coord1, MyGUI::Align::Default,
|
||||||
std::string("Skill") + boost::lexical_cast<std::string>(i));
|
std::string("Skill") + MyGUI::utility::toString(i));
|
||||||
skillWidget->setSkillNumber(skillId);
|
skillWidget->setSkillNumber(skillId);
|
||||||
skillWidget->setSkillValue(Widgets::MWSkill::SkillValue(race->mData.mBonus[i].mBonus));
|
skillWidget->setSkillValue(Widgets::MWSkill::SkillValue(race->mData.mBonus[i].mBonus));
|
||||||
ToolTips::createSkillToolTip(skillWidget, skillId);
|
ToolTips::createSkillToolTip(skillWidget, skillId);
|
||||||
|
@ -436,7 +435,7 @@ namespace MWGui
|
||||||
for (int i = 0; it != end; ++it)
|
for (int i = 0; it != end; ++it)
|
||||||
{
|
{
|
||||||
const std::string &spellpower = *it;
|
const std::string &spellpower = *it;
|
||||||
Widgets::MWSpellPtr spellPowerWidget = mSpellPowerList->createWidget<Widgets::MWSpell>("MW_StatName", coord, MyGUI::Align::Default, std::string("SpellPower") + boost::lexical_cast<std::string>(i));
|
Widgets::MWSpellPtr spellPowerWidget = mSpellPowerList->createWidget<Widgets::MWSpell>("MW_StatName", coord, MyGUI::Align::Default, std::string("SpellPower") + MyGUI::utility::toString(i));
|
||||||
spellPowerWidget->setSpellId(spellpower);
|
spellPowerWidget->setSpellId(spellpower);
|
||||||
spellPowerWidget->setUserString("ToolTipType", "Spell");
|
spellPowerWidget->setUserString("ToolTipType", "Spell");
|
||||||
spellPowerWidget->setUserString("Spell", spellpower);
|
spellPowerWidget->setUserString("Spell", spellpower);
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#include "recharge.hpp"
|
#include "recharge.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <boost/format.hpp>
|
#include <boost/format.hpp>
|
||||||
|
|
||||||
#include <MyGUI_ScrollView.h>
|
#include <MyGUI_ScrollView.h>
|
||||||
|
@ -66,7 +65,7 @@ void Recharge::updateView()
|
||||||
std::string soul = gem.getCellRef().getSoul();
|
std::string soul = gem.getCellRef().getSoul();
|
||||||
const ESM::Creature *creature = MWBase::Environment::get().getWorld()->getStore().get<ESM::Creature>().find(soul);
|
const ESM::Creature *creature = MWBase::Environment::get().getWorld()->getStore().get<ESM::Creature>().find(soul);
|
||||||
|
|
||||||
mChargeLabel->setCaptionWithReplacing("#{sCharges} " + boost::lexical_cast<std::string>(creature->mData.mSoul));
|
mChargeLabel->setCaptionWithReplacing("#{sCharges} " + MyGUI::utility::toString(creature->mData.mSoul));
|
||||||
|
|
||||||
bool toolBoxVisible = (gem.getRefData().getCount() != 0);
|
bool toolBoxVisible = (gem.getRefData().getCount() != 0);
|
||||||
mGemBox->setVisible(toolBoxVisible);
|
mGemBox->setVisible(toolBoxVisible);
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_ScrollView.h>
|
#include <MyGUI_ScrollView.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
|
@ -68,7 +66,7 @@ void Repair::updateRepairView()
|
||||||
std::stringstream qualityStr;
|
std::stringstream qualityStr;
|
||||||
qualityStr << std::setprecision(3) << quality;
|
qualityStr << std::setprecision(3) << quality;
|
||||||
|
|
||||||
mUsesLabel->setCaptionWithReplacing("#{sUses} " + boost::lexical_cast<std::string>(uses));
|
mUsesLabel->setCaptionWithReplacing("#{sUses} " + MyGUI::utility::toString(uses));
|
||||||
mQualityLabel->setCaptionWithReplacing("#{sQuality} " + qualityStr.str());
|
mQualityLabel->setCaptionWithReplacing("#{sQuality} " + qualityStr.str());
|
||||||
|
|
||||||
bool toolBoxVisible = (mRepair.getTool().getRefData().getCount() != 0);
|
bool toolBoxVisible = (mRepair.getTool().getRefData().getCount() != 0);
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
@ -77,7 +75,7 @@ namespace MWGui
|
||||||
Widgets::MWAttributePtr attribute;
|
Widgets::MWAttributePtr attribute;
|
||||||
for (int idx = 0; idx < ESM::Attribute::Length; ++idx)
|
for (int idx = 0; idx < ESM::Attribute::Length; ++idx)
|
||||||
{
|
{
|
||||||
getWidget(attribute, std::string("Attribute") + boost::lexical_cast<std::string>(idx));
|
getWidget(attribute, std::string("Attribute") + MyGUI::utility::toString(idx));
|
||||||
mAttributeWidgets.insert(std::make_pair(static_cast<int>(ESM::Attribute::sAttributeIds[idx]), attribute));
|
mAttributeWidgets.insert(std::make_pair(static_cast<int>(ESM::Attribute::sAttributeIds[idx]), attribute));
|
||||||
attribute->setAttributeId(ESM::Attribute::sAttributeIds[idx]);
|
attribute->setAttributeId(ESM::Attribute::sAttributeIds[idx]);
|
||||||
attribute->setAttributeValue(Widgets::MWAttribute::AttributeValue());
|
attribute->setAttributeValue(Widgets::MWAttribute::AttributeValue());
|
||||||
|
@ -149,21 +147,21 @@ namespace MWGui
|
||||||
void ReviewDialog::setHealth(const MWMechanics::DynamicStat<float>& value)
|
void ReviewDialog::setHealth(const MWMechanics::DynamicStat<float>& value)
|
||||||
{
|
{
|
||||||
mHealth->setValue(value.getCurrent(), value.getModified());
|
mHealth->setValue(value.getCurrent(), value.getModified());
|
||||||
std::string valStr = boost::lexical_cast<std::string>(value.getCurrent()) + "/" + boost::lexical_cast<std::string>(value.getModified());
|
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
||||||
mHealth->setUserString("Caption_HealthDescription", "#{sHealthDesc}\n" + valStr);
|
mHealth->setUserString("Caption_HealthDescription", "#{sHealthDesc}\n" + valStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReviewDialog::setMagicka(const MWMechanics::DynamicStat<float>& value)
|
void ReviewDialog::setMagicka(const MWMechanics::DynamicStat<float>& value)
|
||||||
{
|
{
|
||||||
mMagicka->setValue(value.getCurrent(), value.getModified());
|
mMagicka->setValue(value.getCurrent(), value.getModified());
|
||||||
std::string valStr = boost::lexical_cast<std::string>(value.getCurrent()) + "/" + boost::lexical_cast<std::string>(value.getModified());
|
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
||||||
mMagicka->setUserString("Caption_HealthDescription", "#{sIntDesc}\n" + valStr);
|
mMagicka->setUserString("Caption_HealthDescription", "#{sIntDesc}\n" + valStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReviewDialog::setFatigue(const MWMechanics::DynamicStat<float>& value)
|
void ReviewDialog::setFatigue(const MWMechanics::DynamicStat<float>& value)
|
||||||
{
|
{
|
||||||
mFatigue->setValue(value.getCurrent(), value.getModified());
|
mFatigue->setValue(value.getCurrent(), value.getModified());
|
||||||
std::string valStr = boost::lexical_cast<std::string>(value.getCurrent()) + "/" + boost::lexical_cast<std::string>(value.getModified());
|
std::string valStr = MyGUI::utility::toString(value.getCurrent()) + "/" + MyGUI::utility::toString(value.getModified());
|
||||||
mFatigue->setUserString("Caption_HealthDescription", "#{sFatDesc}\n" + valStr);
|
mFatigue->setUserString("Caption_HealthDescription", "#{sFatDesc}\n" + valStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +181,7 @@ namespace MWGui
|
||||||
if (widget)
|
if (widget)
|
||||||
{
|
{
|
||||||
float modified = value.getModified(), base = value.getBase();
|
float modified = value.getModified(), base = value.getBase();
|
||||||
std::string text = boost::lexical_cast<std::string>(std::floor(modified));
|
std::string text = MyGUI::utility::toString(std::floor(modified));
|
||||||
std::string state = "normal";
|
std::string state = "normal";
|
||||||
if (modified > base)
|
if (modified > base)
|
||||||
state = "increased";
|
state = "increased";
|
||||||
|
@ -303,7 +301,7 @@ namespace MWGui
|
||||||
state = "increased";
|
state = "increased";
|
||||||
else if (modified < base)
|
else if (modified < base)
|
||||||
state = "decreased";
|
state = "decreased";
|
||||||
MyGUI::TextBox* widget = addValueItem(MWBase::Environment::get().getWindowManager()->getGameSettingString(skillNameId, skillNameId), boost::lexical_cast<std::string>(static_cast<int>(modified)), state, coord1, coord2);
|
MyGUI::TextBox* widget = addValueItem(MWBase::Environment::get().getWindowManager()->getGameSettingString(skillNameId, skillNameId), MyGUI::utility::toString(static_cast<int>(modified)), state, coord1, coord2);
|
||||||
|
|
||||||
for (int i=0; i<2; ++i)
|
for (int i=0; i<2; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
#include <MyGUI_ScrollView.h>
|
#include <MyGUI_ScrollView.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
#include <boost/math/common_factor_rt.hpp>
|
#include <boost/math/common_factor_rt.hpp>
|
||||||
|
|
||||||
|
@ -54,8 +53,8 @@ namespace
|
||||||
assert (split.size() >= 2);
|
assert (split.size() >= 2);
|
||||||
boost::trim(split[0]);
|
boost::trim(split[0]);
|
||||||
boost::trim(split[1]);
|
boost::trim(split[1]);
|
||||||
x = boost::lexical_cast<int> (split[0]);
|
x = MyGUI::utility::parseInt (split[0]);
|
||||||
y = boost::lexical_cast<int> (split[1]);
|
y = MyGUI::utility::parseInt (split[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sortResolutions (std::pair<int, int> left, std::pair<int, int> right)
|
bool sortResolutions (std::pair<int, int> left, std::pair<int, int> right)
|
||||||
|
@ -73,7 +72,7 @@ namespace
|
||||||
// special case: 8 : 5 is usually referred to as 16:10
|
// special case: 8 : 5 is usually referred to as 16:10
|
||||||
if (xaspect == 8 && yaspect == 5)
|
if (xaspect == 8 && yaspect == 5)
|
||||||
return "16 : 10";
|
return "16 : 10";
|
||||||
return boost::lexical_cast<std::string>(xaspect) + " : " + boost::lexical_cast<std::string>(yaspect);
|
return MyGUI::utility::toString(xaspect) + " : " + MyGUI::utility::toString(yaspect);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string hlslGlsl ()
|
std::string hlslGlsl ()
|
||||||
|
@ -111,9 +110,9 @@ namespace
|
||||||
min = 0.f;
|
min = 0.f;
|
||||||
max = 1.f;
|
max = 1.f;
|
||||||
if (!widget->getUserString(settingMin).empty())
|
if (!widget->getUserString(settingMin).empty())
|
||||||
min = boost::lexical_cast<float>(widget->getUserString(settingMin));
|
min = MyGUI::utility::parseFloat(widget->getUserString(settingMin));
|
||||||
if (!widget->getUserString(settingMax).empty())
|
if (!widget->getUserString(settingMax).empty())
|
||||||
max = boost::lexical_cast<float>(widget->getUserString(settingMax));
|
max = MyGUI::utility::parseFloat(widget->getUserString(settingMax));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,7 +229,7 @@ namespace MWGui
|
||||||
for (std::vector < std::pair<int, int> >::const_iterator it=resolutions.begin();
|
for (std::vector < std::pair<int, int> >::const_iterator it=resolutions.begin();
|
||||||
it!=resolutions.end(); ++it)
|
it!=resolutions.end(); ++it)
|
||||||
{
|
{
|
||||||
std::string str = boost::lexical_cast<std::string>(it->first) + " x " + boost::lexical_cast<std::string>(it->second)
|
std::string str = MyGUI::utility::toString(it->first) + " x " + MyGUI::utility::toString(it->second)
|
||||||
+ " (" + getAspect(it->first,it->second) + ")";
|
+ " (" + getAspect(it->first,it->second) + ")";
|
||||||
|
|
||||||
if (mResolutionList->findItemIndexWith(str) == MyGUI::ITEM_NONE)
|
if (mResolutionList->findItemIndexWith(str) == MyGUI::ITEM_NONE)
|
||||||
|
@ -239,7 +238,7 @@ namespace MWGui
|
||||||
|
|
||||||
std::string tf = Settings::Manager::getString("texture filtering", "General");
|
std::string tf = Settings::Manager::getString("texture filtering", "General");
|
||||||
mTextureFilteringButton->setCaption(textureFilteringToStr(tf));
|
mTextureFilteringButton->setCaption(textureFilteringToStr(tf));
|
||||||
mAnisotropyLabel->setCaption("Anisotropy (" + boost::lexical_cast<std::string>(Settings::Manager::getInt("anisotropy", "General")) + ")");
|
mAnisotropyLabel->setCaption("Anisotropy (" + MyGUI::utility::toString(Settings::Manager::getInt("anisotropy", "General")) + ")");
|
||||||
|
|
||||||
mShadowsTextureSize->setCaption (Settings::Manager::getString ("texture size", "Shadows"));
|
mShadowsTextureSize->setCaption (Settings::Manager::getString ("texture size", "Shadows"));
|
||||||
|
|
||||||
|
@ -255,11 +254,11 @@ namespace MWGui
|
||||||
|
|
||||||
MyGUI::TextBox* fovText;
|
MyGUI::TextBox* fovText;
|
||||||
getWidget(fovText, "FovText");
|
getWidget(fovText, "FovText");
|
||||||
fovText->setCaption("Field of View (" + boost::lexical_cast<std::string>(int(Settings::Manager::getInt("field of view", "General"))) + ")");
|
fovText->setCaption("Field of View (" + MyGUI::utility::toString(int(Settings::Manager::getInt("field of view", "General"))) + ")");
|
||||||
|
|
||||||
MyGUI::TextBox* diffText;
|
MyGUI::TextBox* diffText;
|
||||||
getWidget(diffText, "DifficultyText");
|
getWidget(diffText, "DifficultyText");
|
||||||
diffText->setCaptionWithReplacing("#{sDifficulty} (" + boost::lexical_cast<std::string>(int(Settings::Manager::getInt("difficulty", "Game"))) + ")");
|
diffText->setCaptionWithReplacing("#{sDifficulty} (" + MyGUI::utility::toString(int(Settings::Manager::getInt("difficulty", "Game"))) + ")");
|
||||||
|
|
||||||
mWindowBorderButton->setEnabled(!Settings::Manager::getBool("fullscreen", "Video"));
|
mWindowBorderButton->setEnabled(!Settings::Manager::getBool("fullscreen", "Video"));
|
||||||
}
|
}
|
||||||
|
@ -431,13 +430,13 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
MyGUI::TextBox* fovText;
|
MyGUI::TextBox* fovText;
|
||||||
getWidget(fovText, "FovText");
|
getWidget(fovText, "FovText");
|
||||||
fovText->setCaption("Field of View (" + boost::lexical_cast<std::string>(int(value)) + ")");
|
fovText->setCaption("Field of View (" + MyGUI::utility::toString(int(value)) + ")");
|
||||||
}
|
}
|
||||||
if (scroller == mDifficultySlider)
|
if (scroller == mDifficultySlider)
|
||||||
{
|
{
|
||||||
MyGUI::TextBox* diffText;
|
MyGUI::TextBox* diffText;
|
||||||
getWidget(diffText, "DifficultyText");
|
getWidget(diffText, "DifficultyText");
|
||||||
diffText->setCaptionWithReplacing("#{sDifficulty} (" + boost::lexical_cast<std::string>(int(value)) + ")");
|
diffText->setCaptionWithReplacing("#{sDifficulty} (" + MyGUI::utility::toString(int(value)) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -445,7 +444,7 @@ namespace MWGui
|
||||||
Settings::Manager::setInt(getSettingName(scroller), getSettingCategory(scroller), pos);
|
Settings::Manager::setInt(getSettingName(scroller), getSettingCategory(scroller), pos);
|
||||||
if (scroller == mAnisotropySlider)
|
if (scroller == mAnisotropySlider)
|
||||||
{
|
{
|
||||||
mAnisotropyLabel->setCaption("Anisotropy (" + boost::lexical_cast<std::string>(pos) + ")");
|
mAnisotropyLabel->setCaption("Anisotropy (" + MyGUI::utility::toString(pos) + ")");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
apply();
|
apply();
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "spellbuyingwindow.hpp"
|
#include "spellbuyingwindow.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
#include <MyGUI_ScrollView.h>
|
#include <MyGUI_ScrollView.h>
|
||||||
|
@ -69,7 +67,7 @@ namespace MWGui
|
||||||
mCurrentY += sLineHeight;
|
mCurrentY += sLineHeight;
|
||||||
|
|
||||||
toAdd->setUserData(price);
|
toAdd->setUserData(price);
|
||||||
toAdd->setCaptionWithReplacing(spell->mName+" - "+boost::lexical_cast<std::string>(price)+"#{sgp}");
|
toAdd->setCaptionWithReplacing(spell->mName+" - "+MyGUI::utility::toString(price)+"#{sgp}");
|
||||||
toAdd->setSize(toAdd->getTextSize().width,sLineHeight);
|
toAdd->setSize(toAdd->getTextSize().width,sLineHeight);
|
||||||
toAdd->eventMouseWheel += MyGUI::newDelegate(this, &SpellBuyingWindow::onMouseWheel);
|
toAdd->eventMouseWheel += MyGUI::newDelegate(this, &SpellBuyingWindow::onMouseWheel);
|
||||||
toAdd->setUserString("ToolTipType", "Spell");
|
toAdd->setUserString("ToolTipType", "Spell");
|
||||||
|
@ -170,7 +168,7 @@ namespace MWGui
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
||||||
|
|
||||||
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + boost::lexical_cast<std::string>(playerGold));
|
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + MyGUI::utility::toString(playerGold));
|
||||||
mPlayerGold->setCoord(8,
|
mPlayerGold->setCoord(8,
|
||||||
mPlayerGold->getTop(),
|
mPlayerGold->getTop(),
|
||||||
mPlayerGold->getTextSize().width,
|
mPlayerGold->getTextSize().width,
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "spellcreationdialog.hpp"
|
#include "spellcreationdialog.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
|
@ -269,7 +267,7 @@ namespace MWGui
|
||||||
|
|
||||||
void EditEffectDialog::onMagnitudeMinChanged (MyGUI::ScrollBar* sender, size_t pos)
|
void EditEffectDialog::onMagnitudeMinChanged (MyGUI::ScrollBar* sender, size_t pos)
|
||||||
{
|
{
|
||||||
mMagnitudeMinValue->setCaption(boost::lexical_cast<std::string>(pos+1));
|
mMagnitudeMinValue->setCaption(MyGUI::utility::toString(pos+1));
|
||||||
mEffect.mMagnMin = pos+1;
|
mEffect.mMagnMin = pos+1;
|
||||||
|
|
||||||
// trigger the check again (see below)
|
// trigger the check again (see below)
|
||||||
|
@ -289,21 +287,21 @@ namespace MWGui
|
||||||
|
|
||||||
mEffect.mMagnMax = pos+1;
|
mEffect.mMagnMax = pos+1;
|
||||||
|
|
||||||
mMagnitudeMaxValue->setCaption("- " + boost::lexical_cast<std::string>(pos+1));
|
mMagnitudeMaxValue->setCaption("- " + MyGUI::utility::toString(pos+1));
|
||||||
|
|
||||||
eventEffectModified(mEffect);
|
eventEffectModified(mEffect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditEffectDialog::onDurationChanged (MyGUI::ScrollBar* sender, size_t pos)
|
void EditEffectDialog::onDurationChanged (MyGUI::ScrollBar* sender, size_t pos)
|
||||||
{
|
{
|
||||||
mDurationValue->setCaption(boost::lexical_cast<std::string>(pos+1));
|
mDurationValue->setCaption(MyGUI::utility::toString(pos+1));
|
||||||
mEffect.mDuration = pos+1;
|
mEffect.mDuration = pos+1;
|
||||||
eventEffectModified(mEffect);
|
eventEffectModified(mEffect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditEffectDialog::onAreaChanged (MyGUI::ScrollBar* sender, size_t pos)
|
void EditEffectDialog::onAreaChanged (MyGUI::ScrollBar* sender, size_t pos)
|
||||||
{
|
{
|
||||||
mAreaValue->setCaption(boost::lexical_cast<std::string>(pos));
|
mAreaValue->setCaption(MyGUI::utility::toString(pos));
|
||||||
mEffect.mArea = pos;
|
mEffect.mArea = pos;
|
||||||
eventEffectModified(mEffect);
|
eventEffectModified(mEffect);
|
||||||
}
|
}
|
||||||
|
@ -365,7 +363,7 @@ namespace MWGui
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
||||||
|
|
||||||
if (boost::lexical_cast<int>(mPriceLabel->getCaption()) > playerGold)
|
if (MyGUI::utility::parseInt(mPriceLabel->getCaption()) > playerGold)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage18}");
|
MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage18}");
|
||||||
return;
|
return;
|
||||||
|
@ -373,7 +371,7 @@ namespace MWGui
|
||||||
|
|
||||||
mSpell.mName = mNameEdit->getCaption();
|
mSpell.mName = mNameEdit->getCaption();
|
||||||
|
|
||||||
int price = boost::lexical_cast<int>(mPriceLabel->getCaption());
|
int price = MyGUI::utility::parseInt(mPriceLabel->getCaption());
|
||||||
|
|
||||||
player.getClass().getContainerStore(player).remove(MWWorld::ContainerStore::sGoldId, price, player);
|
player.getClass().getContainerStore(player).remove(MWWorld::ContainerStore::sGoldId, price, player);
|
||||||
|
|
||||||
|
@ -451,17 +449,17 @@ namespace MWGui
|
||||||
mSpell.mData.mType = ESM::Spell::ST_Spell;
|
mSpell.mData.mType = ESM::Spell::ST_Spell;
|
||||||
mSpell.mData.mFlags = 0;
|
mSpell.mData.mFlags = 0;
|
||||||
|
|
||||||
mMagickaCost->setCaption(boost::lexical_cast<std::string>(int(y)));
|
mMagickaCost->setCaption(MyGUI::utility::toString(int(y)));
|
||||||
|
|
||||||
float fSpellMakingValueMult =
|
float fSpellMakingValueMult =
|
||||||
store.get<ESM::GameSetting>().find("fSpellMakingValueMult")->getFloat();
|
store.get<ESM::GameSetting>().find("fSpellMakingValueMult")->getFloat();
|
||||||
|
|
||||||
int price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr,int(y) * fSpellMakingValueMult,true);
|
int price = MWBase::Environment::get().getMechanicsManager()->getBarterOffer(mPtr,int(y) * fSpellMakingValueMult,true);
|
||||||
|
|
||||||
mPriceLabel->setCaption(boost::lexical_cast<std::string>(int(price)));
|
mPriceLabel->setCaption(MyGUI::utility::toString(int(price)));
|
||||||
|
|
||||||
float chance = MWMechanics::getSpellSuccessChance(&mSpell, MWBase::Environment::get().getWorld()->getPlayerPtr());
|
float chance = MWMechanics::getSpellSuccessChance(&mSpell, MWBase::Environment::get().getWorld()->getPlayerPtr());
|
||||||
mSuccessChance->setCaption(boost::lexical_cast<std::string>(int(chance)));
|
mSuccessChance->setCaption(MyGUI::utility::toString(int(chance)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
|
|
||||||
#include <components/esm/loadmgef.hpp>
|
#include <components/esm/loadmgef.hpp>
|
||||||
|
@ -117,7 +115,7 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
else if ( displayType != ESM::MagicEffect::MDT_None )
|
else if ( displayType != ESM::MagicEffect::MDT_None )
|
||||||
{
|
{
|
||||||
sourcesDescription += ": " + boost::lexical_cast<std::string>(effectIt->mMagnitude);
|
sourcesDescription += ": " + MyGUI::utility::toString(effectIt->mMagnitude);
|
||||||
|
|
||||||
if ( displayType == ESM::MagicEffect::MDT_Percentage )
|
if ( displayType == ESM::MagicEffect::MDT_Percentage )
|
||||||
sourcesDescription += MWBase::Environment::get().getWindowManager()->getGameSettingString("spercent", "");
|
sourcesDescription += MWBase::Environment::get().getWindowManager()->getGameSettingString("spercent", "");
|
||||||
|
|
|
@ -6,8 +6,6 @@
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include "../mwbase/environment.hpp"
|
#include "../mwbase/environment.hpp"
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
@ -151,7 +149,7 @@ namespace MWGui
|
||||||
|
|
||||||
// health, magicka, fatigue tooltip
|
// health, magicka, fatigue tooltip
|
||||||
MyGUI::Widget* w;
|
MyGUI::Widget* w;
|
||||||
std::string valStr = boost::lexical_cast<std::string>(current) + "/" + boost::lexical_cast<std::string>(modified);
|
std::string valStr = MyGUI::utility::toString(current) + "/" + MyGUI::utility::toString(modified);
|
||||||
if (id == "HBar")
|
if (id == "HBar")
|
||||||
{
|
{
|
||||||
getWidget(w, "Health");
|
getWidget(w, "Health");
|
||||||
|
@ -196,7 +194,7 @@ namespace MWGui
|
||||||
if (widget)
|
if (widget)
|
||||||
{
|
{
|
||||||
int modified = value.getModified(), base = value.getBase();
|
int modified = value.getModified(), base = value.getBase();
|
||||||
std::string text = boost::lexical_cast<std::string>(modified);
|
std::string text = MyGUI::utility::toString(modified);
|
||||||
std::string state = "normal";
|
std::string state = "normal";
|
||||||
if (modified > base)
|
if (modified > base)
|
||||||
state = "increased";
|
state = "increased";
|
||||||
|
@ -245,10 +243,10 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
int max = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("iLevelUpTotal")->getInt();
|
int max = MWBase::Environment::get().getWorld()->getStore().get<ESM::GameSetting>().find("iLevelUpTotal")->getInt();
|
||||||
getWidget(levelWidget, i==0 ? "Level_str" : "LevelText");
|
getWidget(levelWidget, i==0 ? "Level_str" : "LevelText");
|
||||||
levelWidget->setUserString("RangePosition_LevelProgress", boost::lexical_cast<std::string>(PCstats.getLevelProgress()));
|
levelWidget->setUserString("RangePosition_LevelProgress", MyGUI::utility::toString(PCstats.getLevelProgress()));
|
||||||
levelWidget->setUserString("Range_LevelProgress", boost::lexical_cast<std::string>(max));
|
levelWidget->setUserString("Range_LevelProgress", MyGUI::utility::toString(max));
|
||||||
levelWidget->setUserString("Caption_LevelProgressText", boost::lexical_cast<std::string>(PCstats.getLevelProgress()) + "/"
|
levelWidget->setUserString("Caption_LevelProgressText", MyGUI::utility::toString(PCstats.getLevelProgress()) + "/"
|
||||||
+ boost::lexical_cast<std::string>(max));
|
+ MyGUI::utility::toString(max));
|
||||||
}
|
}
|
||||||
|
|
||||||
setFactions(PCstats.getFactionRanks());
|
setFactions(PCstats.getFactionRanks());
|
||||||
|
@ -403,7 +401,7 @@ namespace MWGui
|
||||||
else if (modified < base)
|
else if (modified < base)
|
||||||
state = "decreased";
|
state = "decreased";
|
||||||
MyGUI::TextBox* widget = addValueItem(MWBase::Environment::get().getWindowManager()->getGameSettingString(skillNameId, skillNameId),
|
MyGUI::TextBox* widget = addValueItem(MWBase::Environment::get().getWindowManager()->getGameSettingString(skillNameId, skillNameId),
|
||||||
boost::lexical_cast<std::string>(static_cast<int>(modified)), state, coord1, coord2);
|
MyGUI::utility::toString(static_cast<int>(modified)), state, coord1, coord2);
|
||||||
|
|
||||||
for (int i=0; i<2; ++i)
|
for (int i=0; i<2; ++i)
|
||||||
{
|
{
|
||||||
|
@ -421,9 +419,9 @@ namespace MWGui
|
||||||
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Visible_SkillProgressVBox", "true");
|
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Visible_SkillProgressVBox", "true");
|
||||||
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("UserData^Hidden_SkillProgressVBox", "false");
|
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("UserData^Hidden_SkillProgressVBox", "false");
|
||||||
|
|
||||||
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Caption_SkillProgressText", boost::lexical_cast<std::string>(progressPercent)+"/100");
|
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Caption_SkillProgressText", MyGUI::utility::toString(progressPercent)+"/100");
|
||||||
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Range_SkillProgress", "100");
|
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Range_SkillProgress", "100");
|
||||||
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("RangePosition_SkillProgress", boost::lexical_cast<std::string>(progressPercent));
|
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("RangePosition_SkillProgress", MyGUI::utility::toString(progressPercent));
|
||||||
} else {
|
} else {
|
||||||
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Visible_SkillMaxed", "true");
|
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("Visible_SkillMaxed", "true");
|
||||||
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("UserData^Hidden_SkillMaxed", "false");
|
mSkillWidgets[mSkillWidgets.size()-1-i]->setUserString("UserData^Hidden_SkillMaxed", "false");
|
||||||
|
@ -534,8 +532,8 @@ namespace MWGui
|
||||||
const ESM::Attribute* attr1 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[0]);
|
const ESM::Attribute* attr1 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[0]);
|
||||||
const ESM::Attribute* attr2 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[1]);
|
const ESM::Attribute* attr2 = store.get<ESM::Attribute>().find(faction->mData.mAttribute[1]);
|
||||||
|
|
||||||
text += "\n#{fontcolourhtml=normal}#{" + attr1->mName + "}: " + boost::lexical_cast<std::string>(rankData.mAttribute1)
|
text += "\n#{fontcolourhtml=normal}#{" + attr1->mName + "}: " + MyGUI::utility::toString(rankData.mAttribute1)
|
||||||
+ ", #{" + attr2->mName + "}: " + boost::lexical_cast<std::string>(rankData.mAttribute2);
|
+ ", #{" + attr2->mName + "}: " + MyGUI::utility::toString(rankData.mAttribute2);
|
||||||
|
|
||||||
text += "\n\n#{fontcolourhtml=header}#{sFavoriteSkills}";
|
text += "\n\n#{fontcolourhtml=header}#{sFavoriteSkills}";
|
||||||
text += "\n#{fontcolourhtml=normal}";
|
text += "\n#{fontcolourhtml=normal}";
|
||||||
|
@ -556,9 +554,9 @@ namespace MWGui
|
||||||
text += "\n";
|
text += "\n";
|
||||||
|
|
||||||
if (rankData.mSkill1 > 0)
|
if (rankData.mSkill1 > 0)
|
||||||
text += "\n#{sNeedOneSkill} " + boost::lexical_cast<std::string>(rankData.mSkill1);
|
text += "\n#{sNeedOneSkill} " + MyGUI::utility::toString(rankData.mSkill1);
|
||||||
if (rankData.mSkill2 > 0)
|
if (rankData.mSkill2 > 0)
|
||||||
text += "\n#{sNeedTwoSkills} " + boost::lexical_cast<std::string>(rankData.mSkill2);
|
text += "\n#{sNeedTwoSkills} " + MyGUI::utility::toString(rankData.mSkill2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +585,7 @@ namespace MWGui
|
||||||
addSeparator(coord1, coord2);
|
addSeparator(coord1, coord2);
|
||||||
|
|
||||||
addValueItem(MWBase::Environment::get().getWindowManager()->getGameSettingString("sReputation", "Reputation"),
|
addValueItem(MWBase::Environment::get().getWindowManager()->getGameSettingString("sReputation", "Reputation"),
|
||||||
boost::lexical_cast<std::string>(static_cast<int>(mReputation)), "normal", coord1, coord2);
|
MyGUI::utility::toString(static_cast<int>(mReputation)), "normal", coord1, coord2);
|
||||||
|
|
||||||
for (int i=0; i<2; ++i)
|
for (int i=0; i<2; ++i)
|
||||||
{
|
{
|
||||||
|
@ -597,7 +595,7 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
|
|
||||||
addValueItem(MWBase::Environment::get().getWindowManager()->getGameSettingString("sBounty", "Bounty"),
|
addValueItem(MWBase::Environment::get().getWindowManager()->getGameSettingString("sBounty", "Bounty"),
|
||||||
boost::lexical_cast<std::string>(static_cast<int>(mBounty)), "normal", coord1, coord2);
|
MyGUI::utility::toString(static_cast<int>(mBounty)), "normal", coord1, coord2);
|
||||||
|
|
||||||
for (int i=0; i<2; ++i)
|
for (int i=0; i<2; ++i)
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,8 +7,6 @@
|
||||||
#include <MyGUI_InputManager.h>
|
#include <MyGUI_InputManager.h>
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <components/misc/resourcehelpers.hpp>
|
#include <components/misc/resourcehelpers.hpp>
|
||||||
|
|
||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
@ -556,7 +554,7 @@ namespace MWGui
|
||||||
if (value == 1)
|
if (value == 1)
|
||||||
return "";
|
return "";
|
||||||
else
|
else
|
||||||
return " (" + boost::lexical_cast<std::string>(value) + ")";
|
return " (" + MyGUI::utility::toString(value) + ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ToolTips::getCellRefString(const MWWorld::CellRef& cellref)
|
std::string ToolTips::getCellRefString(const MWWorld::CellRef& cellref)
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "trainingwindow.hpp"
|
#include "trainingwindow.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
|
||||||
#include "../mwbase/windowmanager.hpp"
|
#include "../mwbase/windowmanager.hpp"
|
||||||
|
@ -67,7 +65,7 @@ namespace MWGui
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld()->getPlayerPtr();
|
||||||
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
||||||
|
|
||||||
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + boost::lexical_cast<std::string>(playerGold));
|
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + MyGUI::utility::toString(playerGold));
|
||||||
|
|
||||||
MWMechanics::NpcStats& npcStats = actor.getClass().getNpcStats (actor);
|
MWMechanics::NpcStats& npcStats = actor.getClass().getNpcStats (actor);
|
||||||
|
|
||||||
|
@ -102,7 +100,7 @@ namespace MWGui
|
||||||
button->setUserData(skills[i].first);
|
button->setUserData(skills[i].first);
|
||||||
button->eventMouseButtonClick += MyGUI::newDelegate(this, &TrainingWindow::onTrainingSelected);
|
button->eventMouseButtonClick += MyGUI::newDelegate(this, &TrainingWindow::onTrainingSelected);
|
||||||
|
|
||||||
button->setCaptionWithReplacing("#{" + ESM::Skill::sSkillNameIds[skills[i].first] + "} - " + boost::lexical_cast<std::string>(price));
|
button->setCaptionWithReplacing("#{" + ESM::Skill::sSkillNameIds[skills[i].first] + "} - " + MyGUI::utility::toString(price));
|
||||||
|
|
||||||
button->setSize(button->getTextSize ().width+12, button->getSize().height);
|
button->setSize(button->getTextSize ().width+12, button->getSize().height);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "travelwindow.hpp"
|
#include "travelwindow.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
#include <MyGUI_ScrollView.h>
|
#include <MyGUI_ScrollView.h>
|
||||||
#include <MyGUI_Gui.h>
|
#include <MyGUI_Gui.h>
|
||||||
|
@ -91,7 +89,7 @@ namespace MWGui
|
||||||
oss << price;
|
oss << price;
|
||||||
toAdd->setUserString("price",oss.str());
|
toAdd->setUserString("price",oss.str());
|
||||||
|
|
||||||
toAdd->setCaptionWithReplacing("#{sCell=" + name + "} - " + boost::lexical_cast<std::string>(price)+"#{sgp}");
|
toAdd->setCaptionWithReplacing("#{sCell=" + name + "} - " + MyGUI::utility::toString(price)+"#{sgp}");
|
||||||
toAdd->setSize(toAdd->getTextSize().width,sLineHeight);
|
toAdd->setSize(toAdd->getTextSize().width,sLineHeight);
|
||||||
toAdd->eventMouseWheel += MyGUI::newDelegate(this, &TravelWindow::onMouseWheel);
|
toAdd->eventMouseWheel += MyGUI::newDelegate(this, &TravelWindow::onMouseWheel);
|
||||||
toAdd->setUserString("Destination", name);
|
toAdd->setUserString("Destination", name);
|
||||||
|
@ -196,7 +194,7 @@ namespace MWGui
|
||||||
MWWorld::Ptr player = MWBase::Environment::get().getWorld ()->getPlayerPtr();
|
MWWorld::Ptr player = MWBase::Environment::get().getWorld ()->getPlayerPtr();
|
||||||
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId);
|
||||||
|
|
||||||
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + boost::lexical_cast<std::string>(playerGold));
|
mPlayerGold->setCaptionWithReplacing("#{sGold}: " + MyGUI::utility::toString(playerGold));
|
||||||
mPlayerGold->setCoord(8,
|
mPlayerGold->setCoord(8,
|
||||||
mPlayerGold->getTop(),
|
mPlayerGold->getTop(),
|
||||||
mPlayerGold->getTextSize().width,
|
mPlayerGold->getTextSize().width,
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
#include "waitdialog.hpp"
|
#include "waitdialog.hpp"
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_ProgressBar.h>
|
#include <MyGUI_ProgressBar.h>
|
||||||
|
|
||||||
#include <components/widgets/box.hpp>
|
#include <components/widgets/box.hpp>
|
||||||
|
@ -40,7 +38,7 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
mProgressBar->setProgressRange (total);
|
mProgressBar->setProgressRange (total);
|
||||||
mProgressBar->setProgressPosition (cur);
|
mProgressBar->setProgressPosition (cur);
|
||||||
mProgressText->setCaption(boost::lexical_cast<std::string>(cur) + "/" + boost::lexical_cast<std::string>(total));
|
mProgressText->setCaption(MyGUI::utility::toString(cur) + "/" + MyGUI::utility::toString(total));
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------------------------------------
|
||||||
|
@ -106,9 +104,9 @@ namespace MWGui
|
||||||
if (hour == 0) hour = 12;
|
if (hour == 0) hour = 12;
|
||||||
|
|
||||||
std::string dateTimeText =
|
std::string dateTimeText =
|
||||||
boost::lexical_cast<std::string>(MWBase::Environment::get().getWorld ()->getDay ()) + " "
|
MyGUI::utility::toString(MWBase::Environment::get().getWorld ()->getDay ()) + " "
|
||||||
+ month + " (#{sDay} " + boost::lexical_cast<std::string>(MWBase::Environment::get().getWorld ()->getTimeStamp ().getDay())
|
+ month + " (#{sDay} " + MyGUI::utility::toString(MWBase::Environment::get().getWorld ()->getTimeStamp ().getDay())
|
||||||
+ ") " + boost::lexical_cast<std::string>(hour) + " " + (pm ? "#{sSaveMenuHelp05}" : "#{sSaveMenuHelp04}");
|
+ ") " + MyGUI::utility::toString(hour) + " " + (pm ? "#{sSaveMenuHelp05}" : "#{sSaveMenuHelp04}");
|
||||||
|
|
||||||
mDateTimeText->setCaptionWithReplacing (dateTimeText);
|
mDateTimeText->setCaptionWithReplacing (dateTimeText);
|
||||||
}
|
}
|
||||||
|
@ -174,7 +172,7 @@ namespace MWGui
|
||||||
|
|
||||||
void WaitDialog::onHourSliderChangedPosition(MyGUI::ScrollBar* sender, size_t position)
|
void WaitDialog::onHourSliderChangedPosition(MyGUI::ScrollBar* sender, size_t position)
|
||||||
{
|
{
|
||||||
mHourText->setCaptionWithReplacing (boost::lexical_cast<std::string>(position+1) + " #{sRestMenu2}");
|
mHourText->setCaptionWithReplacing (MyGUI::utility::toString(position+1) + " #{sRestMenu2}");
|
||||||
mManualHours = position+1;
|
mManualHours = position+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
#include <boost/lexical_cast.hpp>
|
|
||||||
|
|
||||||
#include <MyGUI_ProgressBar.h>
|
#include <MyGUI_ProgressBar.h>
|
||||||
#include <MyGUI_ImageBox.h>
|
#include <MyGUI_ImageBox.h>
|
||||||
#include <MyGUI_ControllerManager.h>
|
#include <MyGUI_ControllerManager.h>
|
||||||
|
@ -74,7 +72,7 @@ namespace MWGui
|
||||||
if (mSkillValueWidget)
|
if (mSkillValueWidget)
|
||||||
{
|
{
|
||||||
SkillValue::Type modified = mValue.getModified(), base = mValue.getBase();
|
SkillValue::Type modified = mValue.getModified(), base = mValue.getBase();
|
||||||
mSkillValueWidget->setCaption(boost::lexical_cast<std::string>(modified));
|
mSkillValueWidget->setCaption(MyGUI::utility::toString(modified));
|
||||||
if (modified > base)
|
if (modified > base)
|
||||||
mSkillValueWidget->_setWidgetState("increased");
|
mSkillValueWidget->_setWidgetState("increased");
|
||||||
else if (modified < base)
|
else if (modified < base)
|
||||||
|
@ -170,7 +168,7 @@ namespace MWGui
|
||||||
if (mAttributeValueWidget)
|
if (mAttributeValueWidget)
|
||||||
{
|
{
|
||||||
int modified = mValue.getModified(), base = mValue.getBase();
|
int modified = mValue.getModified(), base = mValue.getBase();
|
||||||
mAttributeValueWidget->setCaption(boost::lexical_cast<std::string>(modified));
|
mAttributeValueWidget->setCaption(MyGUI::utility::toString(modified));
|
||||||
if (modified > base)
|
if (modified > base)
|
||||||
mAttributeValueWidget->_setWidgetState("increased");
|
mAttributeValueWidget->_setWidgetState("increased");
|
||||||
else if (modified < base)
|
else if (modified < base)
|
||||||
|
@ -432,9 +430,9 @@ namespace MWGui
|
||||||
spellLine += formatter.str();
|
spellLine += formatter.str();
|
||||||
}
|
}
|
||||||
else if ( displayType != ESM::MagicEffect::MDT_None ) {
|
else if ( displayType != ESM::MagicEffect::MDT_None ) {
|
||||||
spellLine += " " + boost::lexical_cast<std::string>(mEffectParams.mMagnMin);
|
spellLine += " " + MyGUI::utility::toString(mEffectParams.mMagnMin);
|
||||||
if (mEffectParams.mMagnMin != mEffectParams.mMagnMax)
|
if (mEffectParams.mMagnMin != mEffectParams.mMagnMax)
|
||||||
spellLine += to + boost::lexical_cast<std::string>(mEffectParams.mMagnMax);
|
spellLine += to + MyGUI::utility::toString(mEffectParams.mMagnMax);
|
||||||
|
|
||||||
if ( displayType == ESM::MagicEffect::MDT_Percentage )
|
if ( displayType == ESM::MagicEffect::MDT_Percentage )
|
||||||
spellLine += pct;
|
spellLine += pct;
|
||||||
|
@ -452,12 +450,12 @@ namespace MWGui
|
||||||
{
|
{
|
||||||
if (mEffectParams.mDuration > 0 && !(magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration))
|
if (mEffectParams.mDuration > 0 && !(magicEffect->mData.mFlags & ESM::MagicEffect::NoDuration))
|
||||||
{
|
{
|
||||||
spellLine += " " + MWBase::Environment::get().getWindowManager()->getGameSettingString("sfor", "") + " " + boost::lexical_cast<std::string>(mEffectParams.mDuration) + ((mEffectParams.mDuration == 1) ? sec : secs);
|
spellLine += " " + MWBase::Environment::get().getWindowManager()->getGameSettingString("sfor", "") + " " + MyGUI::utility::toString(mEffectParams.mDuration) + ((mEffectParams.mDuration == 1) ? sec : secs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mEffectParams.mArea > 0)
|
if (mEffectParams.mArea > 0)
|
||||||
{
|
{
|
||||||
spellLine += " #{sin} " + boost::lexical_cast<std::string>(mEffectParams.mArea) + " #{sfootarea}";
|
spellLine += " #{sin} " + MyGUI::utility::toString(mEffectParams.mArea) + " #{sfootarea}";
|
||||||
}
|
}
|
||||||
|
|
||||||
// potions have no target
|
// potions have no target
|
||||||
|
|
Loading…
Reference in a new issue