Buttons with highly variable behaviors. How would you do it?

In case it helps someone, in the end what I have done has been to implement the Command pattern. And to make it usable data-driven, I’ve created an object that contains a map of strings and concrete command classes. Each specific command defines the action to be performed and how to perform it. It must also parse a parameter string if I want to pass values to it.

1 Like