Jump to content

What's the real purpose of Screen#addWidget?


supernovus

Recommended Posts

Good evening!

First, I'll state concrete questions to ponder them more easily:

  1. What's the purpose of Screen#addWidget and the overall Screen#children thing?
  2. Should Screen automatically forward keyboard and mouse events to its children (defined in IGuiEventListener)?

Now, let's dive deeper. From what I'm observing, for instance, KeyboardListener calls INestedGuiEventHandler methods of the actual Screen, but never touches its children. I find this a bit confusing, as addWidget with the type of IGuiEventListener explicitly implies that the Screen will listen to the keyboard/mouse events and forward them to its children, which were registered via Screen#addWidget.

If I need to provide any more details or pieces of code — just let me know.

Thanks in advance!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.