Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Asgard2 - WIP
#14
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:
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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)