Translate editor notes on-the-fly

This is so they will be updated when switching language with CTRL+F8.

Most of the editor notes are simple text that don't use any string
formatting. For the ones that aren't, some (saving and loading, changing
map size) reference variables that wouldn't change without initiating a
new note anyway. For the others, i.e. the ones that _do_ reference
variables that could easily be changed (tileset name, speed) by
switching the current room, we cache their values and use the cached
values when drawing the note. Unfortunately, this requires adding a
couple of ugly attributes to editorclass, but it'll be fine.
This commit is contained in:
Misa authored and Misa Elizabeth Kai committed 2024-02-02 18:57:24 -08:00
1 parent 67f41a780c
commit ec3de52970
2 files changed
+75 -51

No files matched your search

+5 -1
View File
@@ -220,7 +220,11 @@ public:
int note_timer;
int old_note_timer;
std::string note;
const char* note;
const char* note_format_string;
int note_platv;
const char* note_tileset_name;
std::string keybuffer;
std::string filename;
std::string loaded_filepath;