[open] object api for returning child index of the desired parent
There are several object APIs related to Control.
* GetChild(*luaindex* _childIndex_)
** _Returns:_ *object* _childControl_
* IsChildOf(*object* _desiredParent_)
** _Returns:_ *bool* _isChild_
However, there is no way to get the childIndex of a specific child control associated with the parent control itself.
Therefore, I would be grateful if you could add the following as an object api for Control.
* GetChildIndexOf(*object* _desiredParent_)
** _Returns:_ *luaindex* _childIndex_
I want to insert a child control from the control pool into the flex container at the next index after the specific child control.
We have SetParent and InsertChildBefore, and I would appreciate having InsertChildNext as well.
* InsertChildNext *protected-attributes* (*object* _childControl_, *object* _previousChild_)
I know using InsertChildBefore twice would do the same thing, but I think it would be wasteful to have to do the layout calculation twice.
Can you please kindly consider my proposal?
Thank you.
- Calamath
Last edited by Calamath : 09/28/24 at 05:55 AM.
|