Closed mitra-projects closed 3 years ago
the problem is the same reported by this user in 2011 https://www.ogre3d.org/addonforums/17/t-14270.html
I solved changing all the setcaption instructions in MyGUI_Listbox.cpp and MyGUI_Combobox.cpp with setCaptionWithReplacing; Is there a reason because the original code doesn't use setCaptionWithReplacing?
Should be safe to do so, but at the time of load, not every time in runtime: MyGUIEngine/src/MyGUI_ComboBox.cpp line 463, add replaceTags there, like this
else if (_key == "AddItem")
addItem(LanguageManager::getInstance().replaceTags(_value));
And same for the MyGUIEngine/src/MyGUI_ListBox.cpp line 983
Please test this changes on the LayoutEditor, just run it and see if Widget properties on the right panel look good. If there are no issues I'll accept PR with changes you mentioned.
This is slightly incomplete solution, but I can't come up with something right now, so this changes are OK for now. Complete solution should affect all text properties, that come from layout file.
thanks; just to be sure I understood; I have to use the replacetags in the additem at place of use setcaptionwithreplacing change, or I have to keep both the changes?
You need to change only two places I mentioned and keep other places intact.
Done, it seems to work; i tested the layout editor with one of demo layout and it shows the tags correctly; i tested also the replacement in my application and it is done in the correct way.
Good, waiting for PR.
PR created
Thank you. Merged.
I created a combobox of this type
`
but it seems the tags replacement with the language file text doesn't work, at place of normal text in execution appears the tag text without the first 5 chars ("le1}", "le2}", "le3}", etc) . For all the other widgets the replacement works. My version is the 3.4.0 .