mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Use YAML files to translate MyGUI's localization tags
This commit is contained in:
parent
dfea7a6d01
commit
ccbb5e03fb
37 changed files with 396 additions and 125 deletions
|
@ -1,9 +1,28 @@
|
|||
#include "box.hpp"
|
||||
|
||||
#include <MyGUI_EditText.h>
|
||||
#include <MyGUI_LanguageManager.h>
|
||||
|
||||
namespace Gui
|
||||
{
|
||||
// TODO: Since 3.4.2 MyGUI is supposed to automatically translate tags
|
||||
// If the 3.4.2 become a required minimum version, the ComboBox class may be removed.
|
||||
void ComboBox::setPropertyOverride(const std::string& _key, const std::string& _value)
|
||||
{
|
||||
#if MYGUI_VERSION >= MYGUI_DEFINE_VERSION(3,4,2)
|
||||
MyGUI::ComboBox::setPropertyOverride (_key, _value);
|
||||
#else
|
||||
if (_key == "AddItem")
|
||||
{
|
||||
const std::string value = MyGUI::LanguageManager::getInstance().replaceTags(_value);
|
||||
MyGUI::ComboBox::setPropertyOverride (_key, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
MyGUI::ComboBox::setPropertyOverride (_key, _value);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void AutoSizedWidget::notifySizeChange (MyGUI::Widget* w)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue