Originally Posted by Aicam
Lua Code:
local fragment = ZO_FadeSceneFragment:New( yourControl ) SCENE_MANAGER:GetScene('hud'):AddFragment( fragment ) SCENE_MANAGER:GetScene('hudui'):AddFragment( fragment )
This adds yourControl to the HUD and the UI engine does all the work showing and hiding it when its appropriate. The downsite is you can't remove this show/hide behaviour without a reload of the UI, unless you want to hack into the scene by removing the fragment by force and toggling the scene twice.
Imo triggering an reload when changing something like this is acceptable.
|
Any possibility to have some control about this?
Currently it hides the UI if you use siege weapons, I would like to remove that behavior.
edit: well I just found it. This does the job
Code:
SCENE_MANAGER.scenes.siegeBar:RegisterCallback( 'StateChange', function( oldState, newState )
if( newState == 'showing' ) then
myControl:SetHidden( false )
end
end )