[nostalgia,studio] Cleanup Studio
This commit is contained in:
@@ -140,7 +140,7 @@ void PaletteEditorImGui::draw(turbine::Context*) noexcept {
|
||||
|
||||
ox::Error PaletteEditorImGui::saveItem() noexcept {
|
||||
const auto sctx = applicationData<studio::StudioContext>(*m_ctx);
|
||||
return sctx->project->writeObj(m_itemPath, &m_pal);
|
||||
return sctx->project->writeObj(m_itemPath, m_pal);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,18 +14,8 @@ namespace nostalgia::core {
|
||||
class StudioModule: public studio::Module {
|
||||
ox::Vector<studio::EditorMaker> editors(turbine::Context *ctx) const noexcept final {
|
||||
return {
|
||||
{
|
||||
{FileExt_ng},
|
||||
[ctx](ox::CRStringView path) -> ox::Result<studio::BaseEditor*> {
|
||||
return ox::makeCatch<TileSheetEditorImGui>(ctx, ox::String(path));
|
||||
}
|
||||
},
|
||||
{
|
||||
{FileExt_npal},
|
||||
[ctx](ox::CRStringView path) -> ox::Result<studio::BaseEditor*> {
|
||||
return ox::makeCatch<PaletteEditorImGui>(ctx, ox::String(path));
|
||||
}
|
||||
}
|
||||
studio::editorMaker<TileSheetEditorImGui>(ctx, FileExt_ng),
|
||||
studio::editorMaker<PaletteEditorImGui>(ctx, FileExt_npal),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -773,7 +773,7 @@ void TileSheetEditorModel::ackUpdate() noexcept {
|
||||
|
||||
ox::Error TileSheetEditorModel::saveFile() noexcept {
|
||||
const auto sctx = applicationData<studio::StudioContext>(*m_ctx);
|
||||
return sctx->project->writeObj(m_path, &m_img);
|
||||
return sctx->project->writeObj(m_path, m_img);
|
||||
}
|
||||
|
||||
bool TileSheetEditorModel::pixelSelected(std::size_t idx) const noexcept {
|
||||
|
||||
Reference in New Issue
Block a user