1. 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).
     
  2. Make them on a layer under inventory layer.
     
  3. 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""
                        }
                    ]
                },
            ]
            ";
    
    Should I just put a layer value in there ? If so where, and what value ?

    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.
     
  4. Wulf

    Wulf Community Admin

    I'd recommend using Oxide's Rust CUI helper, not creating the JSON manually. See Oxide/RustCui.cs at develop · OxideMod/Oxide · GitHub.

    To fix your issue though, you'd need to set the parent to Hud.Under or Hud, else change the CursorEnabled to false.
     
  5. Thank you, ill look into that.
     
  6. The link is not working.
     
  7. The link is 1,5 years old! Like the thread! Read the forum rules how to handle old threads ;)