mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Escape more strings: formspecs, item descriptions, infotexts...
Also, change the escape character to the more standard \x1b Thus, it can be used in the future for translation or colored text, for example.
This commit is contained in:
@@ -3731,7 +3731,7 @@ void Game::handlePointingAtNode(GameRunData *runData,
|
||||
NodeMetadata *meta = map.getNodeMetadata(nodepos);
|
||||
|
||||
if (meta) {
|
||||
infotext = utf8_to_wide(meta->getString("infotext"));
|
||||
infotext = unescape_enriched(utf8_to_wide(meta->getString("infotext")));
|
||||
} else {
|
||||
MapNode n = map.getNodeNoEx(nodepos);
|
||||
|
||||
@@ -3807,13 +3807,15 @@ void Game::handlePointingAtObject(GameRunData *runData,
|
||||
const v3f &player_position,
|
||||
bool show_debug)
|
||||
{
|
||||
infotext = utf8_to_wide(runData->selected_object->infoText());
|
||||
infotext = unescape_enriched(
|
||||
utf8_to_wide(runData->selected_object->infoText()));
|
||||
|
||||
if (show_debug) {
|
||||
if (infotext != L"") {
|
||||
infotext += L"\n";
|
||||
}
|
||||
infotext += utf8_to_wide(runData->selected_object->debugInfoText());
|
||||
infotext += unescape_enriched(utf8_to_wide(
|
||||
runData->selected_object->debugInfoText()));
|
||||
}
|
||||
|
||||
if (input->getLeftState()) {
|
||||
|
Reference in New Issue
Block a user