1. Hi,

    I'm working on a full rebalance mod to Rust, and I've run into the need to display HUD elements on different layers. After fumbling all day with CUI and ImageLibrary, I've finally put together something that looks decent, but I need to be able to display it over the Inventory to allow people to see the Cold, Heat and Radiation protection percentages change as they equip clothing.

    Any idea what I should be doing? I'm currently creating and adding various CuiElement to a single ElementContainer - should I be parenting all this to a panel? If so, how do I kill a panel? I can't refer to it by name, since it doesn't have such a parameter.

    Thanks in advance!


    Screenshot_148.png Screenshot_151.png
     
  2. Looks all nice and lined up on your screen :O

    Shame it'll be all different for different peoples UI scales and resolutions. I'd play around with both to see if your UI gets in the way of the chat box there ;)

    Like in the plugin @redBDGR linked, you need to set the parent of your container to "Overlay", right now it looks like it's set to "Under".
     
  3. Unfortunately it seems your plugin falls victim to the same thing.



    I'll be adding modifiers to the UI, and user settings where they will be able to pick their resolution.

    Also, thank you! I was not aware of that nuance.
    [DOUBLEPOST=1502415074][/DOUBLEPOST]
    Hm, is it possible to see a list of such parents? It'd be fucking sick if I could parent UI to the inventory for certain things.
     

    Attached Files:

  4. Not sure honestly, I'm only aware of the 2 native parents, "Overlay" and "Under".

    Modifiers for the UI? You can't get such things unless you get the player to declare them. Not sure how you'd be able to do that in a reliable fashion either...
    [DOUBLEPOST=1502415673][/DOUBLEPOST]Also, it seems like the "perf" overlays would interfere with that UI. I don't think us plugin devs can execute a command to disable that for the player now either. Which sucks.
     
  5. Perf interfering with that is not much of a concern. Some things have to be sacrificed for beauty :p

    I'll have a /settings box where people can simply choose their resolution out of a list of most common ones. Then we do the math and multiply the modifiers by a particular value.

    Also, thank you! Your help is much appreciated.
     

    Attached Files:

  6. Fancy, do let me know how that goes.
    [DOUBLEPOST=1502419375][/DOUBLEPOST]It is however mostly the UI scale that messes plugin-based UI's up though.
     
  7. Wulf

    Wulf Community Admin

    As long as they don't run in windowed-mode and using a non-standard size. :p
     
  8. Oh, well. It's a mod - there's only so much polish I can apply before the ends stop justifying the sheer amount of work put into the means.