Thread Tools Display Modes
Prev Previous Post   Next Post Next
03/22/19, 06:55 AM   #1
Supportic
Join Date: Mar 2019
Posts: 24
GUI: treat fragment as overlay and lose focus onClose

Hey I've been following this tutorial https://wiki.esoui.com/SimpleNotebookTutorial/part6 and prepared the following code:

Lua Code:
  1. local UAN = UniqueAddonName
  2. local window = BoxWindow -- name of the XML TopLevelControl element
  3. local SM = SCENE_MANAGER
  4.  
  5. function UAN.ToogleBox()
  6.   -- just toggles the window
  7.   window:SetHidden(not window:IsHidden())
  8.   -- UI work
  9.   local fragment = ZO_SimpleSceneFragment:New(window)
  10.   local scene = ZO_Scene:New(UAN.name, SM)
  11.   scene:AddFragment(fragment)
  12.   SM:Toggle(UAN.name)
  13. end

The ToogleBox() function is bound to a key and can be closed via a $(parent)BtnClose Button inside the box or via a keybind.

Currently when I toggle the box, everything from the UI will hide except my box and my mouse. Pressing
the key or closing the box via the BtnClose button will hide my mouse and get my UI back.

Goal:
Toggle the box so that the box is acting like a overlay to my current base UI. (without a mouse icon)
By enabling the "mouse icon drag mode" (I don't know the name of this mode ) I should be able to close the box via the button or the keybind. After closing it, the mouse should disappear and my base UI should be brought to the top again.

I hope this is kind of understandable.
Thanks in advance.
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » GUI: treat fragment as overlay and lose focus onClose


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off