Compare commits

..

1 Commits

Author SHA1 Message Date
1622e6a89b [nostalgia/studio] Set version to d2025.06.0
All checks were successful
Build / build (push) Successful in 1m20s
2025-06-21 08:39:01 -05:00
7 changed files with 19 additions and 17 deletions

View File

@@ -5,15 +5,17 @@
* Fix file deletion to close file even if not active
* Fix file copy to work when creating a copy with the name of a previously
deleted file
* Fix crash that could occur after switching projects
* Fix copy/cut/paste enablement when there is no selection
* Make file picker popup accept on double click of a file
* TileSheetEditor: Fix copy/cut/paste enablement when there is no selection
* TileSheetEditor: Fix manual redo of draw actions, fix drawing to pixel 0, 0
as first action
* TileSheetEditor: Fix draw command to work on same pixel after switching
subsheets
* PaletteEditor: Add RGB key shortcuts for focusing color channels
* PaletteEditor: Add color preview to color editor
* PaletteEditor: Make RGB key shortcuts work when color channel inputs are
focused
# d2025.05.2
* TileSheetEditor: Fix manual redo of draw actions, fix drawing to pixel 0, 0 as first action (cce5f52f96511694afd98f0b9b6b1f19c06ecd20)
* TileSheetEditor: Fix draw command to work on same pixel after switching subsheets (514cb978351ee4b0a5335c22a506a6d9f608f0a7)
# d2025.05.1

View File

@@ -13,7 +13,7 @@ AddSubSheetCommand::AddSubSheetCommand(
auto &parent = getSubSheet(m_img, m_parentIdx);
if (!parent.subsheets.empty()) {
auto idx = m_parentIdx;
idx.emplace_back(static_cast<uint32_t>(parent.subsheets.size()));
idx.emplace_back(parent.subsheets.size());
m_addedSheets.push_back(idx);
} else {
auto idx = m_parentIdx;

View File

@@ -194,7 +194,6 @@ void TileSheetEditorImGui::keyStateChanged(turbine::Key const key, bool const do
void TileSheetEditorImGui::draw(studio::Context&) noexcept {
setCopyEnabled(m_model.hasSelection());
setCutEnabled(m_model.hasSelection());
setPasteEnabled(m_model.hasSelection());
if (ig::mainWinHasFocus() && m_tool == TileSheetTool::Select) {
if (ImGui::IsKeyDown(ImGuiKey_ModCtrl) && !m_palPathFocused) {
if (ImGui::IsKeyPressed(ImGuiKey_A)) {
@@ -279,7 +278,7 @@ void TileSheetEditorImGui::draw(studio::Context&) noexcept {
auto insertOnIdx = m_model.activeSubSheetIdx();
auto const &parent = m_model.activeSubSheet();
m_model.addSubsheet(insertOnIdx);
insertOnIdx.emplace_back(static_cast<uint32_t>(parent.subsheets.size() - 1));
insertOnIdx.emplace_back(parent.subsheets.size() - 1);
setActiveSubsheet(insertOnIdx);
}
ImGui::SameLine();

View File

@@ -80,9 +80,9 @@ void NewMenu::addItemMaker(ox::UPtr<ItemMaker> &&im) noexcept {
});
}
void NewMenu::installItemTemplate(ox::UPtr<ItemTemplate> &&tmplt) noexcept {
void NewMenu::installItemTemplate(ox::UPtr<ItemTemplate> &tmplt) noexcept {
for (auto const&im : m_types) {
if (im->installTemplate(std::move(tmplt))) {
if (im->installTemplate(tmplt)) {
break;
}
}

View File

@@ -72,7 +72,7 @@ class NewMenu final: public Popup {
void addItemMaker(ox::UPtr<ItemMaker> &&im) noexcept;
void installItemTemplate(ox::UPtr<ItemTemplate> &&tmplt) noexcept;
void installItemTemplate(ox::UPtr<ItemTemplate> &tmplt) noexcept;
private:
void drawNewItemType(Context const&sctx) noexcept;

View File

@@ -438,7 +438,7 @@ void StudioUI::loadModule(Module const &mod) noexcept {
}
auto tmplts = mod.itemTemplates(m_sctx);
for (auto &t : tmplts) {
m_newMenu.installItemTemplate(std::move(t));
m_newMenu.installItemTemplate(t);
}
}
@@ -649,9 +649,6 @@ ox::Error StudioUI::openProjectPath(ox::StringParam path) noexcept {
ox::make_unique_catch<Project>(keelCtx(m_tctx), std::move(path), m_projectDataDir)
.moveTo(m_project));
m_sctx.project = m_project.get();
m_activeEditor = nullptr;
m_activeEditorOnLastDraw = nullptr;
m_activeEditorUpdatePending = nullptr;
turbine::setWindowTitle(
m_tctx, ox::sfmt("{} - {}", keelCtx(m_tctx).appName, m_project->projectPath()));
m_deleteConfirmation.deleteFile.connect(m_sctx.project, &Project::deleteItem);

View File

@@ -109,7 +109,7 @@ class ItemMaker {
return m_typeDisplayName;
}
bool installTemplate(ox::UPtr<ItemTemplate> &&tmpl) {
bool installTemplate(ox::UPtr<ItemTemplate> &tmpl) {
if (typeName() == tmpl->typeName() &&
typeVersion() <= tmpl->typeVersion()) {
m_templates.emplace_back(std::move(tmpl));
@@ -120,6 +120,10 @@ class ItemMaker {
return false;
}
bool installTemplate(ox::UPtr<ItemTemplate> &&tmpl) {
return installTemplate(tmpl);
}
constexpr ox::Vector<ox::UPtr<ItemTemplate>> const&itemTemplates() const noexcept {
return m_templates;
}