Custom spell with copy-pasted name always sorts to top of spell list
If you create a custom spell and paste in text (e.g. you just created "Calm Hum+Creat, Area, Target" and are now creating a new variant, paste that name in, and change the last word to "Touch"), the newly created spell appears at the very top of the spell list, as if it is "[invisible character of some sort]Calm Hum+Creat, Area, Touch".
#3 Updated by Andrei Kortunov 8 months ago
Ok, I found the issue:
mSpell.mName = mNameEdit->getCaption();
getCaption() returns text with formatting tags.
We should get only text instead:
mSpell.mName = mNameEdit->getOnlyText();
Also we should review other windows - any widget using EditBox can be affected by this bug (especially enchatment and alchemy widgets).
- File screenshot079.jpg View added
- File screenshot080.jpg View added
- File screenshot081.jpg View added
I was going to open another bug about something similar, but maybe it's exactly the same fix (you tell me):
If you copy text from one context in the game and paste it into another (e.g. from a note you created in a map, into a savegame name) it carries styled-text info with it, and "infects" the new context with the style. It doesn't even close the styling, so that when the styled name is used again later, e.g. in 'The most recent Save Game is "[savegame name here]". Would you like to load it?', the 'Would you like to load it?' parts picks up the styling from the savegame name, too. The styling is also carried over from one savegame to another if you pick one as if to overwrite it then change the name (e.g. by adding "2" at the end, or whatever). This mis-coloring of savegame names survives game app restarts. See attached screens.