diff --git a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp index f5717a54..5211211e 100644 --- a/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp +++ b/src/nostalgia/modules/core/src/studio/tilesheeteditor/tilesheeteditor-imgui.cpp @@ -443,6 +443,16 @@ void TileSheetEditorImGui::drawPaletteMenu() noexcept { if (ig::ComboBox("Palette", files, m_selectedPaletteIdx)) { oxLogError(m_model.setPalette(files[m_selectedPaletteIdx])); } + if (ig::DragDropTarget const dragDropTarget; dragDropTarget) { + auto const [ref, err] = ig::getDragDropPayload("FileRef"); + if (!err) { + auto const oldVal = m_selectedPaletteIdx; + std::ignore = ox::findIdx(files.begin(), files.end(), ref.path).moveTo(m_selectedPaletteIdx); + if (oldVal != m_selectedPaletteIdx) { + oxLogError(m_model.setPalette(files[m_selectedPaletteIdx])); + } + } + } auto const pages = m_model.pal().pages.size(); if (pages > 1) { ig::IndentStackItem const indentStackItem{20};