Just wanted to know if theres a way to add an overlay element that doesnt intercept mouse clicks (so that even when its in front of the inventory you can still grab / drop items).
Solved Gui : Element not blocking mouse clicks ?
Discussion in 'Rust Development' started by Yatta, Jul 17, 2016.
-
Make them on a layer under inventory layer.
-
This could be a solution but ideally Id like my element to be an overlay and not hidden behind the inventory.
Still Im not sure how to change the layer. My widget is based on something I grabbed from another script and modified, but I know there are other ways to create UI.
Here's my UI element definition :
Code:public string ui_infoPop = @"[ { ""name"": ""infoPop"", ""parent"": ""Overlay"", ""components"": [ { ""type"":""UnityEngine.UI.Image"", ""color"":""0.1 0.1 0.1 0.5"" }, { ""type"":""RectTransform"", ""anchormin"": ""0.3 0.12"", ""anchormax"": ""0.7 0.15"" } ] }, { ""parent"": ""infoPop"", ""components"": [ { ""type"":""UnityEngine.UI.Text"", ""text"":""{info}"", ""fontSize"":13, ""align"": ""MiddleCenter"" }, { ""type"":""RectTransform"", ""anchormin"": ""0 0"", ""anchormax"": ""1 1"" } ] }, ] ";
Now that I think of it, I could maybe have a "on mouse over" temporarily change the layer to give room to the inventory. Not sure how to plug that in either though. -
Wulf Community Admin
To fix your issue though, you'd need to set the parent to Hud.Under or Hud, else change the CursorEnabled to false. -
Thank you, ill look into that.
-
-