Original Post
So here is the idea. We have game objects described in XML, such as: Obviously simplified, but what we do is load this from XML into a Property object. Then the calling code gets this object and can tweak the values easily to make a unique button. Once done, the Property object is passed to a templated function: createObject
<GameObject>
<width>100</width>
<height>50</height>
<texturepath>button.png</texturepath>
</GameObject>