How to put a control on the Guild Home page
I want to put a control on the Guild Home screen. But I can't find a suitable event to respond to, comparable to EVENT_CRAFTING_STATION_INTERACT for crafting stations, or EVENT_OPEN_GUILD_BANK for the guild bank. Have I just overlooked it, or do I need a different approach?
|
In most cases you shouldn't actually add elements in response to an event, but instead create a scenefragment and assign it to a scene.
For example the guild home menu is a scene. The buttons on top (home, roster, history, etc) are one fragment which is added to the guild home scene. A fragment is basically just a wrapper around a control and can be added to any number of scenes. When a scene shows up, it will automatically make all its fragments visible. The scene you are looking for is called GUILD_HOME_SCENE. For most cases you can just create a ZO_SimpleSceneFragment. Lua Code:
Of course you need to set your anchors as required. If you reuse a fragment on different scenes and want to position it relative to different elements, you can listen to a scene's "StateChange" callback: Lua Code:
Otherwise you could just set them once when you first create the fragment. |
Thank you for the very helpful reply.
|
Despite your help, I'm not yet up to speed. I'm having trouble positioning my control relative to
GUILD_HOME_SCENE. It is quite clearly being positioned relative to the main window. I suspect that is because my container control is an instance of TopLevelControl, which I'm sure isn't right, but it is the only thing the tutorials suggest, and I can't find any indication of what else it could be. Code:
<GuiXml> |
Perhaps try to change the relative anchor point of your control:
Code:
relativeTo="ZO_GuildHome" Code:
relativeTo="ZO_GuildSharedInfo" and extract, then look into the folders "esoui/ingame/guild"). Inside the keyboard subfolder you'll find the file guildhome_keyboard.xml and .lua including some control names where you could anchor to or set the parent of your control by the help of lua commands: Lua Code:
|
I'm trying to follow this advice:
Quote:
|
Quote:
|
All times are GMT -6. The time now is 05:44 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI