mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-10 15:45:37 +00:00
Use MyGUI::UString's new string_view support
This commit is contained in:
parent
08538dd137
commit
da9b0c5119
@ -27,7 +27,6 @@
|
|||||||
#include "../mwrender/vismask.hpp"
|
#include "../mwrender/vismask.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwmechanics/npcstats.hpp"
|
#include "../mwmechanics/npcstats.hpp"
|
||||||
|
|
||||||
@ -102,8 +101,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "classmodel.hpp"
|
#include "classmodel.hpp"
|
||||||
|
|
||||||
@ -92,8 +91,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "classmodel.hpp"
|
#include "classmodel.hpp"
|
||||||
|
|
||||||
@ -217,8 +216,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwmechanics/npcstats.hpp"
|
#include "../mwmechanics/npcstats.hpp"
|
||||||
|
|
||||||
@ -111,8 +110,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -154,8 +153,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include "../mwworld/worldmodel.hpp"
|
#include "../mwworld/worldmodel.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/animation.hpp"
|
#include "../mwrender/animation.hpp"
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
@ -249,7 +248,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name));
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name));
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
int lockLevel = ptr.getCellRef().getLockLevel();
|
int lockLevel = ptr.getCellRef().getLockLevel();
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "classmodel.hpp"
|
#include "classmodel.hpp"
|
||||||
|
|
||||||
@ -582,7 +581,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name));
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name));
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
if (MWBase::Environment::get().getWindowManager()->getFullHelp())
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
#include "../mwworld/worldmodel.hpp"
|
#include "../mwworld/worldmodel.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/animation.hpp"
|
#include "../mwrender/animation.hpp"
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
@ -267,7 +266,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name));
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name));
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
#include <components/sceneutil/positionattitudetransform.hpp>
|
#include <components/sceneutil/positionattitudetransform.hpp>
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -35,8 +34,7 @@ namespace MWClass
|
|||||||
MWGui::ToolTipInfo ESM4Impl::getToolTipInfo(std::string_view name, int count)
|
MWGui::ToolTipInfo ESM4Impl::getToolTipInfo(std::string_view name, int count)
|
||||||
{
|
{
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -107,8 +106,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -159,8 +158,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -104,8 +103,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "../mwworld/worldmodel.hpp"
|
#include "../mwworld/worldmodel.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -151,8 +150,8 @@ namespace MWClass
|
|||||||
countString = " (" + std::to_string(count) + ")";
|
countString = " (" + std::to_string(count) + ")";
|
||||||
|
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name))
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count)
|
||||||
+ MWGui::ToolTips::getCountString(count) + MWGui::ToolTips::getSoulString(ptr.getCellRef());
|
+ MWGui::ToolTips::getSoulString(ptr.getCellRef());
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -1089,7 +1088,7 @@ namespace MWClass
|
|||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
|
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption = MyGUI::TextIterator::toTagsString(MWGui::toUString(name));
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name));
|
||||||
if (fullHelp && !ref->mBase->mName.empty() && ptr.getRefData().getCustomData()
|
if (fullHelp && !ref->mBase->mName.empty() && ptr.getRefData().getCustomData()
|
||||||
&& ptr.getRefData().getCustomData()->asNpcCustomData().mNpcStats.isWerewolf())
|
&& ptr.getRefData().getCustomData()->asNpcCustomData().mNpcStats.isWerewolf())
|
||||||
{
|
{
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -95,8 +94,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -15,7 +15,6 @@
|
|||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -103,8 +102,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -13,7 +13,6 @@
|
|||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -105,8 +104,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
std::string text;
|
std::string text;
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "../mwmechanics/weapontype.hpp"
|
#include "../mwmechanics/weapontype.hpp"
|
||||||
|
|
||||||
#include "../mwgui/tooltips.hpp"
|
#include "../mwgui/tooltips.hpp"
|
||||||
#include "../mwgui/ustring.hpp"
|
|
||||||
|
|
||||||
#include "../mwrender/objects.hpp"
|
#include "../mwrender/objects.hpp"
|
||||||
#include "../mwrender/renderinginterface.hpp"
|
#include "../mwrender/renderinginterface.hpp"
|
||||||
@ -150,8 +149,7 @@ namespace MWClass
|
|||||||
|
|
||||||
MWGui::ToolTipInfo info;
|
MWGui::ToolTipInfo info;
|
||||||
std::string_view name = getName(ptr);
|
std::string_view name = getName(ptr);
|
||||||
info.caption
|
info.caption = MyGUI::TextIterator::toTagsString(MyGUI::UString(name)) + MWGui::ToolTips::getCountString(count);
|
||||||
= MyGUI::TextIterator::toTagsString(MWGui::toUString(name)) + MWGui::ToolTips::getCountString(count);
|
|
||||||
info.icon = ref->mBase->mIcon;
|
info.icon = ref->mBase->mIcon;
|
||||||
|
|
||||||
const MWWorld::ESMStore& store = *MWBase::Environment::get().getESMStore();
|
const MWWorld::ESMStore& store = *MWBase::Environment::get().getESMStore();
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include "itemview.hpp"
|
#include "itemview.hpp"
|
||||||
#include "itemwidget.hpp"
|
#include "itemwidget.hpp"
|
||||||
#include "sortfilteritemmodel.hpp"
|
#include "sortfilteritemmodel.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
#include "widgets.hpp"
|
#include "widgets.hpp"
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
@ -164,7 +163,7 @@ namespace MWGui
|
|||||||
auto const& wm = MWBase::Environment::get().getWindowManager();
|
auto const& wm = MWBase::Environment::get().getWindowManager();
|
||||||
std::string_view ingredient = wm->getGameSettingString("sIngredients", "Ingredients");
|
std::string_view ingredient = wm->getGameSettingString("sIngredients", "Ingredients");
|
||||||
|
|
||||||
if (mFilterType->getCaption() == toUString(ingredient))
|
if (mFilterType->getCaption() == ingredient)
|
||||||
mCurrentFilter = FilterType::ByName;
|
mCurrentFilter = FilterType::ByName;
|
||||||
else
|
else
|
||||||
mCurrentFilter = FilterType::ByEffect;
|
mCurrentFilter = FilterType::ByEffect;
|
||||||
@ -176,17 +175,17 @@ namespace MWGui
|
|||||||
void AlchemyWindow::switchFilterType(MyGUI::Widget* _sender)
|
void AlchemyWindow::switchFilterType(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
auto const& wm = MWBase::Environment::get().getWindowManager();
|
auto const& wm = MWBase::Environment::get().getWindowManager();
|
||||||
MyGUI::UString ingredient = toUString(wm->getGameSettingString("sIngredients", "Ingredients"));
|
std::string_view ingredient = wm->getGameSettingString("sIngredients", "Ingredients");
|
||||||
auto* button = _sender->castType<MyGUI::Button>();
|
auto* button = _sender->castType<MyGUI::Button>();
|
||||||
|
|
||||||
if (button->getCaption() == ingredient)
|
if (button->getCaption() == ingredient)
|
||||||
{
|
{
|
||||||
button->setCaption(toUString(wm->getGameSettingString("sMagicEffects", "Magic Effects")));
|
button->setCaption(MyGUI::UString(wm->getGameSettingString("sMagicEffects", "Magic Effects")));
|
||||||
mCurrentFilter = FilterType::ByEffect;
|
mCurrentFilter = FilterType::ByEffect;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
button->setCaption(ingredient);
|
button->setCaption(MyGUI::UString(ingredient));
|
||||||
mCurrentFilter = FilterType::ByName;
|
mCurrentFilter = FilterType::ByName;
|
||||||
}
|
}
|
||||||
mSortModel->setNameFilter({});
|
mSortModel->setNameFilter({});
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
#include "../mwworld/player.hpp"
|
#include "../mwworld/player.hpp"
|
||||||
|
|
||||||
#include "ustring.hpp"
|
|
||||||
#include "widgets.hpp"
|
#include "widgets.hpp"
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
@ -56,7 +55,8 @@ namespace MWGui
|
|||||||
|
|
||||||
MyGUI::Button* okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
okButton->setCaption(
|
||||||
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &BirthDialog::onOkClicked);
|
||||||
|
|
||||||
updateBirths();
|
updateBirths();
|
||||||
@ -70,10 +70,10 @@ namespace MWGui
|
|||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
||||||
else
|
else
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
||||||
}
|
}
|
||||||
|
|
||||||
void BirthDialog::onOpen()
|
void BirthDialog::onOpen()
|
||||||
@ -235,7 +235,7 @@ namespace MWGui
|
|||||||
{
|
{
|
||||||
MyGUI::TextBox* label
|
MyGUI::TextBox* label
|
||||||
= mSpellArea->createWidget<MyGUI::TextBox>("SandBrightText", coord, MyGUI::Align::Default, "Label");
|
= mSpellArea->createWidget<MyGUI::TextBox>("SandBrightText", coord, MyGUI::Align::Default, "Label");
|
||||||
label->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString(
|
label->setCaption(MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString(
|
||||||
categories[category].label, {})));
|
categories[category].label, {})));
|
||||||
mSpellItems.push_back(label);
|
mSpellItems.push_back(label);
|
||||||
coord.top += lineHeight;
|
coord.top += lineHeight;
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include <components/vfs/manager.hpp>
|
#include <components/vfs/manager.hpp>
|
||||||
|
|
||||||
#include "tooltips.hpp"
|
#include "tooltips.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -129,10 +128,10 @@ namespace MWGui
|
|||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
||||||
else
|
else
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
||||||
}
|
}
|
||||||
|
|
||||||
void PickClassDialog::onOpen()
|
void PickClassDialog::onOpen()
|
||||||
@ -546,10 +545,10 @@ namespace MWGui
|
|||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
||||||
else
|
else
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
||||||
}
|
}
|
||||||
|
|
||||||
// widget controls
|
// widget controls
|
||||||
@ -869,7 +868,7 @@ namespace MWGui
|
|||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &DescriptionDialog::onOkClicked);
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sInputMenu1", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sInputMenu1", {})));
|
||||||
|
|
||||||
// Make sure the edit box has focus
|
// Make sure the edit box has focus
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit);
|
||||||
|
@ -337,7 +337,7 @@ namespace MWGui
|
|||||||
void DialogueWindow::onTradeComplete()
|
void DialogueWindow::onTradeComplete()
|
||||||
{
|
{
|
||||||
MyGUI::UString message = MyGUI::LanguageManager::getInstance().replaceTags("#{sBarterDialog5}");
|
MyGUI::UString message = MyGUI::LanguageManager::getInstance().replaceTags("#{sBarterDialog5}");
|
||||||
addResponse({}, message.asUTF8());
|
addResponse({}, message);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DialogueWindow::exit()
|
bool DialogueWindow::exit()
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include "itemwidget.hpp"
|
#include "itemwidget.hpp"
|
||||||
|
|
||||||
#include "sortfilteritemmodel.hpp"
|
#include "sortfilteritemmodel.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
@ -95,7 +94,7 @@ namespace MWGui
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string_view name = item.getClass().getName(item);
|
std::string_view name = item.getClass().getName(item);
|
||||||
mName->setCaption(toUString(name));
|
mName->setCaption(MyGUI::UString(name));
|
||||||
mItemBox->setItem(item);
|
mItemBox->setItem(item);
|
||||||
mItemBox->setUserString("ToolTipType", "ItemPtr");
|
mItemBox->setUserString("ToolTipType", "ItemPtr");
|
||||||
mItemBox->setUserData(MWWorld::Ptr(item));
|
mItemBox->setUserData(MWWorld::Ptr(item));
|
||||||
@ -115,23 +114,26 @@ namespace MWGui
|
|||||||
switch (mEnchanting.getCastStyle())
|
switch (mEnchanting.getCastStyle())
|
||||||
{
|
{
|
||||||
case ESM::Enchantment::CastOnce:
|
case ESM::Enchantment::CastOnce:
|
||||||
mTypeButton->setCaption(toUString(
|
mTypeButton->setCaption(MyGUI::UString(
|
||||||
MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastOnce", "Cast Once")));
|
MWBase::Environment::get().getWindowManager()->getGameSettingString("sItemCastOnce", "Cast Once")));
|
||||||
setConstantEffect(false);
|
setConstantEffect(false);
|
||||||
break;
|
break;
|
||||||
case ESM::Enchantment::WhenStrikes:
|
case ESM::Enchantment::WhenStrikes:
|
||||||
mTypeButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString(
|
mTypeButton->setCaption(
|
||||||
"sItemCastWhenStrikes", "When Strikes")));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString(
|
||||||
|
"sItemCastWhenStrikes", "When Strikes")));
|
||||||
setConstantEffect(false);
|
setConstantEffect(false);
|
||||||
break;
|
break;
|
||||||
case ESM::Enchantment::WhenUsed:
|
case ESM::Enchantment::WhenUsed:
|
||||||
mTypeButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString(
|
mTypeButton->setCaption(
|
||||||
"sItemCastWhenUsed", "When Used")));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString(
|
||||||
|
"sItemCastWhenUsed", "When Used")));
|
||||||
setConstantEffect(false);
|
setConstantEffect(false);
|
||||||
break;
|
break;
|
||||||
case ESM::Enchantment::ConstantEffect:
|
case ESM::Enchantment::ConstantEffect:
|
||||||
mTypeButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString(
|
mTypeButton->setCaption(
|
||||||
"sItemCastConstant", "Cast Constant")));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString(
|
||||||
|
"sItemCastConstant", "Cast Constant")));
|
||||||
setConstantEffect(true);
|
setConstantEffect(true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
#include "itemmodel.hpp"
|
#include "itemmodel.hpp"
|
||||||
#include "itemwidget.hpp"
|
#include "itemwidget.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
@ -130,7 +129,7 @@ namespace MWGui
|
|||||||
|
|
||||||
std::stable_sort(mLines.begin(), mLines.end(),
|
std::stable_sort(mLines.begin(), mLines.end(),
|
||||||
[](const MWGui::ItemChargeView::Line& a, const MWGui::ItemChargeView::Line& b) {
|
[](const MWGui::ItemChargeView::Line& a, const MWGui::ItemChargeView::Line& b) {
|
||||||
return Misc::StringUtils::ciLess(a.mText->getCaption().asUTF8(), b.mText->getCaption().asUTF8());
|
return Misc::StringUtils::ciLess(a.mText->getCaption(), b.mText->getCaption());
|
||||||
});
|
});
|
||||||
|
|
||||||
layoutWidgets();
|
layoutWidgets();
|
||||||
@ -182,7 +181,7 @@ namespace MWGui
|
|||||||
void ItemChargeView::updateLine(const ItemChargeView::Line& line)
|
void ItemChargeView::updateLine(const ItemChargeView::Line& line)
|
||||||
{
|
{
|
||||||
std::string_view name = line.mItemPtr.getClass().getName(line.mItemPtr);
|
std::string_view name = line.mItemPtr.getClass().getName(line.mItemPtr);
|
||||||
line.mText->setCaption(toUString(name));
|
line.mText->setCaption(MyGUI::UString(name));
|
||||||
|
|
||||||
line.mCharge->setVisible(false);
|
line.mCharge->setVisible(false);
|
||||||
switch (mDisplayMode)
|
switch (mDisplayMode)
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include <MyGUI_Widget.h>
|
#include <MyGUI_Widget.h>
|
||||||
#include <MyGUI_Window.h>
|
#include <MyGUI_Window.h>
|
||||||
|
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
void Layout::initialise(std::string_view _layout)
|
void Layout::initialise(std::string_view _layout)
|
||||||
@ -52,16 +50,15 @@ namespace MWGui
|
|||||||
{
|
{
|
||||||
MyGUI::Widget* pt;
|
MyGUI::Widget* pt;
|
||||||
getWidget(pt, name);
|
getWidget(pt, name);
|
||||||
static_cast<MyGUI::TextBox*>(pt)->setCaption(toUString(caption));
|
static_cast<MyGUI::TextBox*>(pt)->setCaption(MyGUI::UString(caption));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Layout::setTitle(std::string_view title)
|
void Layout::setTitle(std::string_view title)
|
||||||
{
|
{
|
||||||
MyGUI::Window* window = static_cast<MyGUI::Window*>(mMainWidget);
|
MyGUI::Window* window = static_cast<MyGUI::Window*>(mMainWidget);
|
||||||
MyGUI::UString uTitle = toUString(title);
|
|
||||||
|
|
||||||
if (window->getCaption() != uTitle)
|
if (window->getCaption() != title)
|
||||||
window->setCaptionWithReplacing(uTitle);
|
window->setCaptionWithReplacing(MyGUI::UString(title));
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::Widget* Layout::getWidget(std::string_view _name)
|
MyGUI::Widget* Layout::getWidget(std::string_view _name)
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "../mwmechanics/npcstats.hpp"
|
#include "../mwmechanics/npcstats.hpp"
|
||||||
|
|
||||||
#include "class.hpp"
|
#include "class.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -176,7 +175,7 @@ namespace MWGui
|
|||||||
if (levelupdescription.empty())
|
if (levelupdescription.empty())
|
||||||
levelupdescription = Fallback::Map::getString("Level_Up_Default");
|
levelupdescription = Fallback::Map::getString("Level_Up_Default");
|
||||||
|
|
||||||
mLevelDescription->setCaption(toUString(levelupdescription));
|
mLevelDescription->setCaption(MyGUI::UString(levelupdescription));
|
||||||
|
|
||||||
unsigned int availableAttributes = 0;
|
unsigned int availableAttributes = 0;
|
||||||
for (const ESM::Attribute& attribute : MWBase::Environment::get().getESMStore()->get<ESM::Attribute>())
|
for (const ESM::Attribute& attribute : MWBase::Environment::get().getESMStore()->get<ESM::Attribute>())
|
||||||
|
@ -191,7 +191,7 @@ namespace MWGui
|
|||||||
// we may still want to show the label if the caller requested it
|
// we may still want to show the label if the caller requested it
|
||||||
if (mImportantLabel)
|
if (mImportantLabel)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox(mLoadingText->getCaption().asUTF8());
|
MWBase::Environment::get().getWindowManager()->messageBox(mLoadingText->getCaption());
|
||||||
mImportantLabel = false;
|
mImportantLabel = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -379,17 +379,17 @@ namespace MWGui
|
|||||||
|
|
||||||
MyGUI::Widget* InteractiveMessageBox::getDefaultKeyFocus()
|
MyGUI::Widget* InteractiveMessageBox::getDefaultKeyFocus()
|
||||||
{
|
{
|
||||||
std::vector<std::string> keywords{ "sOk", "sYes" };
|
|
||||||
if (mDefaultFocus >= 0 && mDefaultFocus < static_cast<int>(mButtons.size()))
|
if (mDefaultFocus >= 0 && mDefaultFocus < static_cast<int>(mButtons.size()))
|
||||||
return mButtons[mDefaultFocus];
|
return mButtons[mDefaultFocus];
|
||||||
|
auto& languageManager = MyGUI::LanguageManager::getInstance();
|
||||||
|
std::vector<MyGUI::UString> keywords{ languageManager.replaceTags("#{sOk}"),
|
||||||
|
languageManager.replaceTags("#{sYes}") };
|
||||||
|
|
||||||
for (MyGUI::Button* button : mButtons)
|
for (MyGUI::Button* button : mButtons)
|
||||||
{
|
{
|
||||||
for (const std::string& keyword : keywords)
|
for (const MyGUI::UString& keyword : keywords)
|
||||||
{
|
{
|
||||||
if (Misc::StringUtils::ciEqual(
|
if (Misc::StringUtils::ciEqual(keyword, button->getCaption()))
|
||||||
MyGUI::LanguageManager::getInstance().replaceTags("#{" + keyword + "}").asUTF8(),
|
|
||||||
button->getCaption().asUTF8()))
|
|
||||||
{
|
{
|
||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
#include "tooltips.hpp"
|
#include "tooltips.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -114,7 +113,8 @@ namespace MWGui
|
|||||||
|
|
||||||
MyGUI::Button* okButton;
|
MyGUI::Button* okButton;
|
||||||
getWidget(okButton, "OKButton");
|
getWidget(okButton, "OKButton");
|
||||||
okButton->setCaption(toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
okButton->setCaption(
|
||||||
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
||||||
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked);
|
okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &RaceDialog::onOkClicked);
|
||||||
|
|
||||||
updateRaces();
|
updateRaces();
|
||||||
@ -129,10 +129,10 @@ namespace MWGui
|
|||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
||||||
else
|
else
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
||||||
}
|
}
|
||||||
|
|
||||||
void RaceDialog::onOpen()
|
void RaceDialog::onOpen()
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
#include "tooltips.hpp"
|
#include "tooltips.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -272,7 +271,7 @@ namespace MWGui
|
|||||||
MyGUI::TextBox* groupWidget = mSkillView->createWidget<MyGUI::TextBox>("SandBrightText",
|
MyGUI::TextBox* groupWidget = mSkillView->createWidget<MyGUI::TextBox>("SandBrightText",
|
||||||
MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default);
|
MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height), MyGUI::Align::Default);
|
||||||
groupWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
|
groupWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
|
||||||
groupWidget->setCaption(toUString(label));
|
groupWidget->setCaption(MyGUI::UString(label));
|
||||||
mSkillWidgets.push_back(groupWidget);
|
mSkillWidgets.push_back(groupWidget);
|
||||||
|
|
||||||
const int lineHeight = Settings::gui().mFontSize + 2;
|
const int lineHeight = Settings::gui().mFontSize + 2;
|
||||||
@ -287,7 +286,7 @@ namespace MWGui
|
|||||||
MyGUI::TextBox* skillValueWidget;
|
MyGUI::TextBox* skillValueWidget;
|
||||||
|
|
||||||
skillNameWidget = mSkillView->createWidget<MyGUI::TextBox>("SandText", coord1, MyGUI::Align::Default);
|
skillNameWidget = mSkillView->createWidget<MyGUI::TextBox>("SandText", coord1, MyGUI::Align::Default);
|
||||||
skillNameWidget->setCaption(toUString(text));
|
skillNameWidget->setCaption(MyGUI::UString(text));
|
||||||
skillNameWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
|
skillNameWidget->eventMouseWheel += MyGUI::newDelegate(this, &ReviewDialog::onMouseWheel);
|
||||||
|
|
||||||
skillValueWidget = mSkillView->createWidget<MyGUI::TextBox>("SandTextRight", coord2, MyGUI::Align::Default);
|
skillValueWidget = mSkillView->createWidget<MyGUI::TextBox>("SandTextRight", coord2, MyGUI::Align::Default);
|
||||||
|
@ -35,7 +35,6 @@
|
|||||||
#include "../mwstate/character.hpp"
|
#include "../mwstate/character.hpp"
|
||||||
|
|
||||||
#include "confirmationdialog.hpp"
|
#include "confirmationdialog.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
@ -198,7 +197,7 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
title << " (#{sLevel} " << signature.mPlayerLevel << " "
|
title << " (#{sLevel} " << signature.mPlayerLevel << " "
|
||||||
<< MyGUI::TextIterator::toTagsString(toUString(className)) << ")";
|
<< MyGUI::TextIterator::toTagsString(MyGUI::UString(className)) << ")";
|
||||||
|
|
||||||
mCharacterSelection->addItem(MyGUI::LanguageManager::getInstance().replaceTags(title.str()));
|
mCharacterSelection->addItem(MyGUI::LanguageManager::getInstance().replaceTags(title.str()));
|
||||||
|
|
||||||
@ -302,7 +301,7 @@ namespace MWGui
|
|||||||
|
|
||||||
if (mSaving)
|
if (mSaving)
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getStateManager()->saveGame(mSaveNameEdit->getCaption().asUTF8(), mCurrentSlot);
|
MWBase::Environment::get().getStateManager()->saveGame(mSaveNameEdit->getCaption(), mCurrentSlot);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,6 @@
|
|||||||
#include "../mwbase/world.hpp"
|
#include "../mwbase/world.hpp"
|
||||||
|
|
||||||
#include "confirmationdialog.hpp"
|
#include "confirmationdialog.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -659,18 +658,17 @@ namespace MWGui
|
|||||||
|
|
||||||
void SettingsWindow::onButtonToggled(MyGUI::Widget* _sender)
|
void SettingsWindow::onButtonToggled(MyGUI::Widget* _sender)
|
||||||
{
|
{
|
||||||
MyGUI::UString on = toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOn", "On"));
|
std::string_view on = MWBase::Environment::get().getWindowManager()->getGameSettingString("sOn", "On");
|
||||||
bool newState;
|
bool newState;
|
||||||
if (_sender->castType<MyGUI::Button>()->getCaption() == on)
|
if (_sender->castType<MyGUI::Button>()->getCaption() == on)
|
||||||
{
|
{
|
||||||
MyGUI::UString off
|
_sender->castType<MyGUI::Button>()->setCaption(
|
||||||
= toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOff", "Off"));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOff", "Off")));
|
||||||
_sender->castType<MyGUI::Button>()->setCaption(off);
|
|
||||||
newState = false;
|
newState = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_sender->castType<MyGUI::Button>()->setCaption(on);
|
_sender->castType<MyGUI::Button>()->setCaption(MyGUI::UString(on));
|
||||||
newState = true;
|
newState = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include "../mwmechanics/npcstats.hpp"
|
#include "../mwmechanics/npcstats.hpp"
|
||||||
|
|
||||||
#include "tooltips.hpp"
|
#include "tooltips.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
@ -417,7 +416,7 @@ namespace MWGui
|
|||||||
MyGUI::TextBox* groupWidget = mSkillView->createWidget<MyGUI::TextBox>("SandBrightText",
|
MyGUI::TextBox* groupWidget = mSkillView->createWidget<MyGUI::TextBox>("SandBrightText",
|
||||||
MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height),
|
MyGUI::IntCoord(0, coord1.top, coord1.width + coord2.width, coord1.height),
|
||||||
MyGUI::Align::Left | MyGUI::Align::Top | MyGUI::Align::HStretch);
|
MyGUI::Align::Left | MyGUI::Align::Top | MyGUI::Align::HStretch);
|
||||||
groupWidget->setCaption(toUString(label));
|
groupWidget->setCaption(MyGUI::UString(label));
|
||||||
groupWidget->eventMouseWheel += MyGUI::newDelegate(this, &StatsWindow::onMouseWheel);
|
groupWidget->eventMouseWheel += MyGUI::newDelegate(this, &StatsWindow::onMouseWheel);
|
||||||
mSkillWidgets.push_back(groupWidget);
|
mSkillWidgets.push_back(groupWidget);
|
||||||
|
|
||||||
@ -433,7 +432,7 @@ namespace MWGui
|
|||||||
|
|
||||||
skillNameWidget = mSkillView->createWidget<MyGUI::TextBox>(
|
skillNameWidget = mSkillView->createWidget<MyGUI::TextBox>(
|
||||||
"SandText", coord1, MyGUI::Align::Left | MyGUI::Align::Top | MyGUI::Align::HStretch);
|
"SandText", coord1, MyGUI::Align::Left | MyGUI::Align::Top | MyGUI::Align::HStretch);
|
||||||
skillNameWidget->setCaption(toUString(text));
|
skillNameWidget->setCaption(MyGUI::UString(text));
|
||||||
skillNameWidget->eventMouseWheel += MyGUI::newDelegate(this, &StatsWindow::onMouseWheel);
|
skillNameWidget->eventMouseWheel += MyGUI::newDelegate(this, &StatsWindow::onMouseWheel);
|
||||||
|
|
||||||
skillValueWidget = mSkillView->createWidget<MyGUI::TextBox>(
|
skillValueWidget = mSkillView->createWidget<MyGUI::TextBox>(
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
#include <MyGUI_Button.h>
|
#include <MyGUI_Button.h>
|
||||||
#include <MyGUI_EditBox.h>
|
#include <MyGUI_EditBox.h>
|
||||||
|
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -35,10 +33,10 @@ namespace MWGui
|
|||||||
|
|
||||||
if (shown)
|
if (shown)
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sNext", {})));
|
||||||
else
|
else
|
||||||
okButton->setCaption(
|
okButton->setCaption(
|
||||||
toUString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
MyGUI::UString(MWBase::Environment::get().getWindowManager()->getGameSettingString("sOK", {})));
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextInputDialog::setTextLabel(std::string_view label)
|
void TextInputDialog::setTextLabel(std::string_view label)
|
||||||
|
@ -953,8 +953,7 @@ namespace MWGui
|
|||||||
widget->setUserString("Caption_MagicEffectSchool",
|
widget->setUserString("Caption_MagicEffectSchool",
|
||||||
"#{sSchool}: "
|
"#{sSchool}: "
|
||||||
+ MyGUI::TextIterator::toTagsString(
|
+ MyGUI::TextIterator::toTagsString(
|
||||||
store->get<ESM::Skill>().find(effect->mData.mSchool)->mSchool->mName)
|
store->get<ESM::Skill>().find(effect->mData.mSchool)->mSchool->mName));
|
||||||
.asUTF8());
|
|
||||||
widget->setUserString("ImageTexture_MagicEffectImage", icon);
|
widget->setUserString("ImageTexture_MagicEffectImage", icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
#ifndef MWGUI_USTRING_H
|
|
||||||
#define MWGUI_USTRING_H
|
|
||||||
|
|
||||||
#include <MyGUI_UString.h>
|
|
||||||
|
|
||||||
namespace MWGui
|
|
||||||
{
|
|
||||||
// FIXME: Remove once we get a version of MyGUI that supports string_view
|
|
||||||
inline MyGUI::UString toUString(std::string_view string)
|
|
||||||
{
|
|
||||||
return { string.data(), string.size() };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
@ -20,8 +20,6 @@
|
|||||||
|
|
||||||
#include "../mwworld/esmstore.hpp"
|
#include "../mwworld/esmstore.hpp"
|
||||||
|
|
||||||
#include "ustring.hpp"
|
|
||||||
|
|
||||||
namespace MWGui::Widgets
|
namespace MWGui::Widgets
|
||||||
{
|
{
|
||||||
/* MWSkill */
|
/* MWSkill */
|
||||||
@ -135,8 +133,7 @@ namespace MWGui::Widgets
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MyGUI::UString name = toUString(attribute->mName);
|
mAttributeNameWidget->setCaption(MyGUI::UString(attribute->mName));
|
||||||
mAttributeNameWidget->setCaption(name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mAttributeValueWidget)
|
if (mAttributeValueWidget)
|
||||||
@ -497,13 +494,13 @@ namespace MWGui::Widgets
|
|||||||
{
|
{
|
||||||
std::stringstream out;
|
std::stringstream out;
|
||||||
out << mValue << "/" << mMax;
|
out << mValue << "/" << mMax;
|
||||||
mBarTextWidget->setCaption(out.str().c_str());
|
mBarTextWidget->setCaption(out.str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void MWDynamicStat::setTitle(std::string_view text)
|
void MWDynamicStat::setTitle(std::string_view text)
|
||||||
{
|
{
|
||||||
if (mTextWidget)
|
if (mTextWidget)
|
||||||
mTextWidget->setCaption(toUString(text));
|
mTextWidget->setCaption(MyGUI::UString(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
MWDynamicStat::~MWDynamicStat() {}
|
MWDynamicStat::~MWDynamicStat() {}
|
||||||
|
@ -117,7 +117,6 @@
|
|||||||
#include "tradewindow.hpp"
|
#include "tradewindow.hpp"
|
||||||
#include "trainingwindow.hpp"
|
#include "trainingwindow.hpp"
|
||||||
#include "travelwindow.hpp"
|
#include "travelwindow.hpp"
|
||||||
#include "ustring.hpp"
|
|
||||||
#include "videowidget.hpp"
|
#include "videowidget.hpp"
|
||||||
#include "waitdialog.hpp"
|
#include "waitdialog.hpp"
|
||||||
|
|
||||||
@ -788,8 +787,8 @@ namespace MWGui
|
|||||||
{
|
{
|
||||||
if (getMode() == GM_Dialogue && showInDialogueMode != MWGui::ShowInDialogueMode_Never)
|
if (getMode() == GM_Dialogue && showInDialogueMode != MWGui::ShowInDialogueMode_Never)
|
||||||
{
|
{
|
||||||
MyGUI::UString text = MyGUI::LanguageManager::getInstance().replaceTags(toUString(message));
|
MyGUI::UString text = MyGUI::LanguageManager::getInstance().replaceTags(MyGUI::UString(message));
|
||||||
mDialogueWindow->addMessageBox(text.asUTF8());
|
mDialogueWindow->addMessageBox(text);
|
||||||
}
|
}
|
||||||
else if (showInDialogueMode != MWGui::ShowInDialogueMode_Only)
|
else if (showInDialogueMode != MWGui::ShowInDialogueMode_Only)
|
||||||
{
|
{
|
||||||
@ -1089,7 +1088,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void WindowManager::onRetrieveTag(const MyGUI::UString& _tag, MyGUI::UString& _result)
|
void WindowManager::onRetrieveTag(const MyGUI::UString& _tag, MyGUI::UString& _result)
|
||||||
{
|
{
|
||||||
std::string_view tag = _tag.asUTF8();
|
std::string_view tag = _tag;
|
||||||
|
|
||||||
std::string_view MyGuiPrefix = "setting=";
|
std::string_view MyGuiPrefix = "setting=";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user