29-08-2009, 01:58 PM
Hey Vans, long time no see. ^^ xD Who else is still around that I might know?
Anyway, please stay on topic in this thread as I really want to make some progress. *g* Feel free to open a related talk thread though, I'll be a regular visitor to it. =)
One new idea I had about this problem: Would manually issuing an update command to write the record back to the internal record keeper alright? Something like this:
This would require every widget to know where it's original record is and it requires an additional, manual writeback command but right now that's the only way I see to avoid messing with the array that holds the originals. What do you think?
EDIT: This is what I have so far...
![[Image: nw0jyw.png]](http://i29.tinypic.com/nw0jyw.png)
Code to make this widget work is only this:
Only the base widget (the semi-transparent part) is draggable, the frame and button just know that the base widget is their parent and move along accordingly if it is dragged. There's no additionale code required for this widget to work, after these lines it is displayed and can be dragged, redraws itself automatically and you could attach event handlers if you wanted to. pretty neat, eh?
Greetz, Atlantis
Anyway, please stay on topic in this thread as I really want to make some progress. *g* Feel free to open a related talk thread though, I'll be a regular visitor to it. =)
One new idea I had about this problem: Would manually issuing an update command to write the record back to the internal record keeper alright? Something like this:
Code:
my_widget = UI("charinfo")
my_widget.draggable = true
UI_update(my_widget)
This would require every widget to know where it's original record is and it requires an additional, manual writeback command but right now that's the only way I see to avoid messing with the array that holds the originals. What do you think?
EDIT: This is what I have so far...
![[Image: nw0jyw.png]](http://i29.tinypic.com/nw0jyw.png)
Code to make this widget work is only this:
Code:
Call A2_createWidget("charinfo", "", A2_WidgetType.Menu, 0, 0, 64, 256, "charinfo1.bmp")
Call A2_setWidgetDraggable("charinfo", True)
Call A2_setWidgetOpacity("charinfo", 128)
Call A2_createWidget("charinfo_d", "charinfo", A2_WidgetType.Menu, 0, 0, 64, 256, "charinfo2.bmp")
Call A2_createWidget("btn_inventory", "charinfo", Menu, 100, 10, 24, 24, "swordicon.bmp")
Greetz, Atlantis