Open cfravel opened 1 year ago
One might use a full-screen invisible outer Entity to block mouse clicking into the 3d screen, but othewise there should be no harm in having a parent/outer UiEntity be at 0,0, and size 0,0, if its children are positioned absolutely,
One would think that if you have a zero-sized outer UiEntity, and its children have absolute positioning, that they would show up, and they do in this example scene for Uis 1, 2, and/or 3.
But for the Announcement UI, it does not appear if the outer UiEntity is pos 0,0 size 0,0
The announcement from the secondary button on Ui_2 has a fullscreen outer parent, and it appears. The announcement from the secondary button on Ui_3 has a 0 sized outer parent, and it doesn't appear, although the other UIs, which share that 0-sized outer parent, DO appear.
Background provided in a comment
Steps to reproduce:
Note that the difference between the effect of the 2nd button on Ui_3, compared to Ui_2 is that in the case of Ui_3, the invisible “wrapper/outer” entity for the Announcement UI is sized at zero width and height, whereas in Ui_2 case it is full screen and, at least in Preview, therefore blocks the mouse from 3D interactions. Fullscreen and hence blocking is controlled by an optional second boolean parameter to displayAnnouncement(), which differs between the calls from Ui_2 (blocking) and Ui_3 (non-blocking).
Note that mouse blocking of 3D interactions during the temporary might occur only in Preview.