Hello,
Before I start I'd like to put you guys in context.
I'm making my own editor based on RMXP that reads .rxdata. I'm recreating the maps tree and everything is going fine.
Up to now it works like a charm. It displays all the maps and their child maps in the right order.
I'm now working on the drag and drop function which works fine too... Until I drag an older map into a newer map.
Why? Because the maps "order" property doesn't change when I drag and drop them. It doesn't change when I create/delete maps either.
Each maps have an RPG::MapInfo data associated to them which contains information on the tree expansion flag, the tree display order and other things used internally.
My problem is, I have absolutely no clue on how I can successfully update the maps order property, mainly because there is no internal hierarchy in the data itself. It's just data with parent id property place in whatever order they were when the object was created. I cam display them in the right order, but I don't know who I would "recalculate" the order.
Any idea on how I can do that?
Thank you very much
- Dargor
Before I start I'd like to put you guys in context.
I'm making my own editor based on RMXP that reads .rxdata. I'm recreating the maps tree and everything is going fine.
Up to now it works like a charm. It displays all the maps and their child maps in the right order.
I'm now working on the drag and drop function which works fine too... Until I drag an older map into a newer map.
Why? Because the maps "order" property doesn't change when I drag and drop them. It doesn't change when I create/delete maps either.
Each maps have an RPG::MapInfo data associated to them which contains information on the tree expansion flag, the tree display order and other things used internally.
My problem is, I have absolutely no clue on how I can successfully update the maps order property, mainly because there is no internal hierarchy in the data itself. It's just data with parent id property place in whatever order they were when the object was created. I cam display them in the right order, but I don't know who I would "recalculate" the order.
Any idea on how I can do that?
Thank you very much
- Dargor