Перейти к содержанию

Дайджесты за январь-февраль

Обновления гайдов и аддонов

Январь Февраль

Мониторинг серверов и редактор аддонов

Представляем вам две легенды. То, о чем можно было только мечтать, стало реальностью.

Мониторинг серверов Редактор аддонов

Подсказки из игры на вашем сайте

Теперь вы можете отображать сведения о внутриигровых элементах простым наведением курсора мыши.

Подробнее

Апдейтер аддонов

Представляем вам программу для автообновления аддонов и делимся подробностями.

Подробнее Скачать

Problem with Button Reaction


cristimirt

Рекомендуемые сообщения

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.

Ссылка на комментарий
Поделиться на другие сайты

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.

Ссылка на комментарий
Поделиться на другие сайты

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?

Ссылка на комментарий
Поделиться на другие сайты

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.

Ссылка на комментарий
Поделиться на другие сайты

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 :)

Ссылка на комментарий
Поделиться на другие сайты

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

Ссылка на комментарий
Поделиться на другие сайты

Гость
Ответить в этой теме...

×   Вставлено с форматированием.   Восстановить форматирование

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

×
×
  • Создать...

Важная информация

Пользуясь сайтом, вы принимаете Условия использования