Stage 9a: shared canvas input, edit helpers and tool requirements

- CanvasInput gathers mouse, arrow keys (as a step vector), zoom and modifier
  state once; arrow nudges are one change per tool instead of four.
- frames_change_push/edit_begin_push/document_change_push replace each
  editor's own grouped frame-change command; rect_snap replaces three copies
  of grid-snap code.
- tool::INFO carries whether a tool needs a frame or a spritesheet;
  tool_cursor_update sets the cursor and the "why not" hint for both canvases.
- localize_format for localized format strings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-10-03 18:08:57 -04:00
1 parent c6c8e3598b
commit 595658581f
6 files changed
+479 -916

No files matched your search

+12
View File
@@ -1,5 +1,8 @@
#pragma once
#include <format>
#include <string>
namespace anm2ed
{
#define SELECT_ENGLISH(symbol, english, spanish, russian, chinese, korean) english,
@@ -815,3 +818,12 @@ namespace anm2ed
}
extern anm2ed::Localizer localize;
namespace anm2ed
{
// A localized format string filled with arguments.
template <class... Args> std::string localize_format(StringType format, Args... args)
{
return std::vformat(localize.get(format), std::make_format_args(args...));
}
}