Jump to content

Digest October-December

We talk about what was done and updated in the past month. We help keep abreast of events.

December November October

Servers monitoring and the Addons Editor

We present you two legends. All dreams come true.

Servers monitoring The Addons Editor

A statistics bot for Telegram

Convenient analytics right on your phone.

Read more

Game tooltips

Tooltips provide a way for 3rd party fansites and extensions to display detailed information on mouseover.

Read more

The Addons Updater

Let us to introduce the addons updating software and to share the details

Read more Download

Problem with Button Reaction


cristimirt

Recommended Posts

I have a WidgetPanel that contains other panels and a button. So far, everything is well, the button works as intended.

But when I add that WidgetPanel as a child to a state managed addon (InspectCharacter in this case), using widget:AddChild(child), the button stops working as intended. I can click it, but nothing will happen.

Any ideas why this happens and how I can fix it?

I'm adding the panel to InspectCharacter because the addon also enables DnD for InspectCharacter, and I want the Panel to move together with the InspectCharacter.

Link to comment
Share on other sites

The reaction goes to the corresponding addon.

So there is no way to catch it's button's reactions, unless you add your own main form as a child to that addon's widget.

Link to comment
Share on other sites

I see.. adding the mainForm as a child did the trick. Are there any kind of risks or drawbacks if I'm using this method?

Your addon is dependant of the existence and properties of it's parent and it's ancestors.

If someone unloads it, or hides, or does whatever he does... Your addon will disappear as well.

Also you can't make widgets outside of your main form's borders, so if it's inside a window that is small - you'll not be able to move something outside.

Link to comment
Share on other sites

I don't see why anyone would unload InspectCharacter, so I think I'll be fine here.

About the main form's borders, I did encounter this problem, and I enlarged the main form succesfully, retaining the original size of the MainPanel inside the InspectCharacter form :)

If those are the only possible problems, means I'm good to go :)

Link to comment
Share on other sites

Some people may think that unloading InspectCharacter will reduce the lag when they are autoinspecting many people at once.

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.

Guest
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.

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use