[nostalgia] Add PaletteEditor
This commit is contained in:
@@ -17,7 +17,7 @@ TileSheetEditorImGui::TileSheetEditorImGui(Context *ctx, const ox::String &path)
|
||||
const auto lastSlash = std::find(m_itemPath.rbegin(), m_itemPath.rend(), '/').offset();
|
||||
m_itemName = m_itemPath.substr(lastSlash + 1);
|
||||
// init palette idx
|
||||
const auto palPath = model()->palPath();
|
||||
const auto &palPath = model()->palPath();
|
||||
auto sctx = applicationData<studio::StudioContext>(m_ctx);
|
||||
const auto &palList = sctx->project->fileList(core::FileExt_npal + 1);
|
||||
for (std::size_t i = 0; const auto &pal : palList) {
|
||||
@@ -32,11 +32,11 @@ TileSheetEditorImGui::TileSheetEditorImGui(Context *ctx, const ox::String &path)
|
||||
m_subsheetEditor.inputSubmitted.connect(this, &TileSheetEditorImGui::updateActiveSubsheet);
|
||||
}
|
||||
|
||||
ox::String TileSheetEditorImGui::itemName() const noexcept {
|
||||
const ox::String &TileSheetEditorImGui::itemName() const noexcept {
|
||||
return m_itemPath;
|
||||
}
|
||||
|
||||
ox::String TileSheetEditorImGui::itemDisplayName() const noexcept {
|
||||
const ox::String &TileSheetEditorImGui::itemDisplayName() const noexcept {
|
||||
return m_itemName;
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ ox::Error TileSheetEditorImGui::markUnsavedChanges(int) noexcept {
|
||||
|
||||
void TileSheetEditorImGui::SubSheetEditor::draw() noexcept {
|
||||
constexpr auto modalFlags = ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize;
|
||||
constexpr auto popupName = "Edit SubSheet";
|
||||
constexpr auto popupName = "Edit Subsheet";
|
||||
if (!m_show) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user