GameMaker ds_stack bring element to top?

S

Shadowblitz16

Guest
hello I have been doing a z2 editor based around widgets however I need a way to have a data structure that I can add elements to and bring them to the top and read from them when I click on a widget

currently I am doing a ds_stack but I'm not sure how to bring a element in the stack to the top.
does anybody know how to do this or if I am using the wrong data structure?
 

NightFrost

Member
Stacks can't do that as they operate on last in first out principle. You want a ds_list, it can delete and insert at variable position.
 
Top