[nostalgia] Add PaletteEditor

This commit is contained in:
2022-04-02 16:38:38 -05:00
parent 99987ee423
commit 71e0f181ea
14 changed files with 251 additions and 334 deletions
+3 -3
View File
@@ -110,8 +110,8 @@ ox::Error Project::writeObj(const ox::String &path, auto *obj) const noexcept {
// replace garbage last character with new line
typeOut.back().value = '\n';
// write to FS
static constexpr auto descPath = "/.nostalgia/type_descriptors/";
const auto typePath = ox::sfmt("{}{}", descPath, type->typeName);
static constexpr auto descPath = "/.nostalgia/type_descriptors";
const auto typePath = ox::sfmt("{}/{}", descPath, type->typeName);
oxReturnError(mkdir(descPath));
oxReturnError(writeBuff(typePath, typeOut));
fileUpdated.emit(path);
@@ -136,7 +136,7 @@ ox::Error Project::subscribe(ProjectEvent e, ox::SignalHandler *tgt, Functor &&s
case ProjectEvent::FileRecognized:
{
oxRequire(files, listFiles());
for (auto f : files) {
for (const auto &f : files) {
slot(f);
}
connect(this, &Project::fileRecognized, tgt, slot);