Jump to content
Korean Random

How to add floating panel/button in hangar / Как добавить плавающую панель/кнопку в ангар


Recommended Posts

// ENG - for English speaking community

Hi everyone,

I’m currently working on a mod that requires adding a couple of buttons to the Hangar. I’ve spent quite a bit of time trying to get this working, but haven’t had any luck so far.

I was able to add elements to the GUI, but they appear at the top level - meaning my objects are displayed above all panels, including Hangar, Battle, Shop, Exit, and Login. What I’d like to achieve is for these elements to belong specifically to the Hangar panel, so that they disappear automatically when switching to the Shop or other sections.

Could someone please share a simple example or explain how to properly attach elements to the Hangar panel? Any help or guidance would be greatly appreciated.

As an additional question - does anyone know how to make the mod initialize only once, specifically when the Hangar UI is fully loaded?

Right now, I’m using a delay-based approach to give the game enough time to log in and load the Hangar. However, if the login process or my machine is slow, some data might not be fully loaded yet, which can cause issues.

Any suggestions on a more reliable way to trigger the mod after the Hangar UI is ready would be greatly appreciated.

Thank you in advance!

 

// RU - для англоязычного сообщества (Я использовал переводчик)

Всем привет,

Сейчас я работаю над модом, который требует добавления пары кнопок в Ангар. Я потратил немало времени, пытаясь это реализовать, но пока безуспешно.

Мне удалось добавить элементы в графический интерфейс, но они отображаются на самом верху, то есть мои объекты отображаются поверх всех панелей, включая Ангар, Бой, Магазин, Выход и Вход. Я хотел бы, чтобы эти элементы относились именно к панели Ангара, чтобы они автоматически исчезали при переходе в Магазин или другие разделы.

Не мог бы кто-нибудь поделиться простым примером или объяснить, как правильно добавлять элементы на панель Ангара? Буду очень благодарен за любую помощь или рекомендации.

И ещё один вопрос: кто-нибудь знает, как сделать так, чтобы мод инициализировался только один раз, а именно при полной загрузке интерфейса Ангара?

Сейчас я использую подход с задержкой, чтобы дать игре достаточно времени для входа в систему и загрузки Ангара. Однако, если процесс входа в систему или мой компьютер медленный, некоторые данные могут быть загружены не полностью, что может вызвать проблемы.

Буду очень признателен за любые предложения по более надёжному способу запуска мода после того, как интерфейс ангара будет готов.

Заранее спасибо!

Link to comment
Short link
Share on other sites

ENG:
Thanks for the reply. I’m not familiar with most of the code in this Git repository. Is there any logic or API that lets me obtain the Hangar component (or a Hangar-specific section) so I can add my panel/buttons there - something like what GUI.addRoot does but scoped to the Hangar?
I tried reading the code and comments but didn’t get much. I’d like to start small: for example, how to add a PNG image to the Hangar (not the global GUI), then build up from there to understand the underlying logic.

 

RU:
Спасибо за ответ. Я не знаком с большей частью кода в этом Git-репозитории. Есть ли какая-либо логика или API, позволяющие получить компонент Hangar (или раздел, относящийся к Hangar), чтобы добавить туда свою панель/кнопки - что-то вроде GUI.addRoot, но с областью действия в пределах Hangar?
Я пробовал читать код и комментарии, но мало что понял. Хотелось бы начать с малого: например, как добавить PNG-изображение в Hangar (не в глобальный графический интерфейс), а затем развивать эту тему, чтобы понять логику.

Link to comment
Short link
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...