W
W
Way2018-11-13 14:10:16
Java
Way, 2018-11-13 14:10:16

How to implement "children" for ui components?

Good afternoon, I'm making my own widget system and ran into a problem in implementing "children" for widgets. For example, there is a Component class (bases for widgets) and it has a List list and everything would be fine, but they are only initialized, only the "first children", and already there are no children. Regarding "initialized":

public void draw(int mX, int mY, long delta) {
    for (Component child : childs) {
         child.draw(mX, mY, delta)
    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question