Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Undo/Redo Style

Like any windows program, the software I'm trying to make is going to have the undo/redo feature.

Implementing that feature isn't that bad. But there's many things on my form : TreeViews where you can add/remove nodes, Richtext boxes, and eventually some custom controls. That means there's a wide range of possible actions that can be done in any order (edit text, delete a node, move custom controls, edit text again, edit custom control, etc).

Should I have a global class that memorizes all the actions I've done so I can undo them in the order I did them? Or should I have separate "memories" for the various controls (you can undo text modifications to a specific box without undoing the "delete node" that the user did in between).

As an user, what would you find most convenient?
 
Probably a choice. A standard "undo" in chronological order, with some kind of an Action History dialog that lists these memorized items, with the option to select one and undo it. Similar to later PhotoShop functionality.
 
Photoshop has a separate history for each of the windows it edits. Although that's a MDI. Visual studio has a separate history for each of it's tabs/documents, too. But VS' treeview (Solution Explorer) doesn't allow undoes. I guess that if the user clicks "yes" at "This blabla will be deleted permanently..." he probably won't need to undo it.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top