29-08-2009, 09:55 PM
You could do a dictionary object to store all your variables. It might be a little bit slower, but would work out well, especially if users of your engine wanted to easily add different variables to a widget.
Psuedo:
So, for your draggable you'd have to initialize the dictionary with a "draggable" key.
Just an idea.. if you want me to expand more, just ask.
Psuedo:
Code:
SetWidgetValue("widgetname", "key", value)
value = GetWidgetValue("widgetname", "key")
So, for your draggable you'd have to initialize the dictionary with a "draggable" key.
Code:
SetWidgetValue("widgetname", "draggable", true)
if GetWidgetValue("widgetname", "draggable") = true then
'drag it
end if
Just an idea.. if you want me to expand more, just ask.