Been refactoring the Complex UI Entities to use the ComplexUIEntity base class that I wrote, which will remove a lot of redundant code. Even with as strong of an advocate of refactoring as I am, I still find myself wishing I had taken the time to do certain refactorings earlier from time to time.
One thing about refactoring is that you need to be willing to add and subtract supporting code. I found that the ButtonManager class–an old construct I used to try to make the task of adding and removing and using buttons on the fly–just wasn’t useful anymore. The things it did just weren’t necessary now, and it got in the way of widespread adoption of the ComplexUIEntity base class. So I refactored the code that relied on it–and interestingly, the resultant code was actually simpler.