Commit Graph

2 Commits (5d8c5510d8f04138eb88434d39c70c28d58c98d1)

Author SHA1 Message Date
Noah 5d8c5510d8 Draw Lines Visualizing Doodad Links in Edit Mode
* If the current edit tool is Actor or Link, use the new drawtool.Stroke
  object to draw visual lines connecting every pair of linked actors in
  the level. The lines are hidden during normal editing and gameplay and
  only appear when you're possibly manipulating your actors and links.
2019-07-03 16:51:23 -07:00
Noah c8620f871e Drawing Strokes and Undo/Redo Functionality
* Add new pkg/drawtool with utilities to abstract away drawing actions
  into Strokes and track undo/redo History for them.
* The freehand Pencil tool in EditorMode has been refactored to create a
  Stroke of Shape=Freehand and queue up its world pixels there instead
  of directly modifying the level chunker in real time. When the mouse
  button is released, the freehand Stroke is committed to the level
  chunker and added to the UndoHistory.
* UndoHistory is (temporarily) stored with the level.Level so it can
  survive trips to PlayScene and back, but is not stored as JSON on
  disk.
* Ctrl-Z and Ctrl-Y in EditorMode for undo and redo, respectively.
2019-07-03 16:25:23 -07:00