Undo / RedoArchives Forums/BlitzPlus Programming/Undo / Redo
| Anyone had any experience coding an Undo/Redo routine? |
| It's not like a single function orso.. You must know at forehand that you need undo/redo. Just create a copy of all your relevant variables/data and switch between that copy and your current crop o' vars/data.|
with types (I think):
Those are adviced..
with just variables it's less handy
would lead to:
Another way is to create small arrays of your variables
Naturally, if you'll go like this, know that vars and arrays suck if you'll use them like this. :)
My personal fav. would be the bank-method.
| An idea would be to, every 100ms or so, take all the variables, and add them to a new bank. And then you could have a few undos.|
To undo, go through all the strings or whatever in that bank and put them back. It would work.
| No, you create a new undo state every time something changes, not every 100 msecs. |