Today we can add and id="" attribute to a Manialink element and later retrieve it with
Code: Select all
Frame.GetFirstChild(Text)
- Id is unique
- Class can be used on several elements, and several classes can be used on a single element
Code: Select all
<quad id="myquad" class="button some-other-class yet-another-class" />
- Ideally ids and classes should have a stricter format. Eg (alphanum + .-_)
- Frame.GetById and Frame.GetByClass could be used to retrive a Control and an array of Controls respectively
- GetByClass should be recursive, with maybe the possibility to turn recursivity off with an optional parameter