edited August 2 in ORK Support
Hi i have been messing with my UI a bit and have some questions. (ORK 2.33.0)

1) First of all, is there a way to disable the ability to select "disabled" buttons? They do appear different but they can still be selected when using a controller.

2) When using a circle UI as choice mode, I can not set the distance between elements. I tried setting the Spacing under choice settings but it does not affect the list in any way. The goal is to spread the elements out over the height of the box. (so choice 7 is at the end of the content box basically). How do i acchieve this?
image

3) When trying to make a tabbed inventory (per category, ex: 'Armor','Consumables' etc) i see the tabs, and can select them. However tabs without items are disabled, i would like to be able to select them and just show an "No items" message. How do i achieve this?
image

Thanks in advance!
Post edited by HarryHamster on
  • 1) No, currently not.
    Disabled buttons can still be selected, e.g. based on where they're displayed, they could show descriptions, tooltips or other information by being selected.

    2) Circle mode can either distribute them automatically within the available radius, or place them with defined angles between them (e.g. one every 15 degrees).

    3) Hm, I don't think there's currently an option for that.
    I'll look into it, though being able to click on them will display them just as regular tabs as well.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Okay thanks for your reply!

    If the third thing you mentioned is an option in the future, it could also fix the first thing. As then there would be no "disabled" buttons anymore but just empty content for an element. I just want to be sure to display things like "weapons" even when there are no weapons available.

    You said you would look into it, is this in ork 2 or in the future in ork3?


    About the circle mode:
    I dont think my question about the circle mode expressed what i wanted to achieve well. I know the circle mode can be set in those modes, however what i want is that the spacing between the elements are larger. So they do not appear on top of eachother like in the first picture. I tried using the line spacing setting but it does not affect it. What option lets me put a bigger margin between choices?
  • 2) The spacing between the individual buttons in circle mode is only impacted by their placement on the circle, i.e. what I mentioned above.
    All the spacing options (line spacing, padding, etc.) are for within the button.

    3) Both :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited August 7
    Decided to continue this thread as i sprinkle in some more UI work while working on some other aspects. Also excited for next release then!

    Is there an option to use images over raw images in the UI?

    Why? Because i want to use sliced images (the one with borders) in my UI, but raw images dont support those. (i mean the green lines in the sprite editor that allow u to set up parts that dont scale)

    In this case i want to use an image for the healthbars, so its not just a plain old rectangle. However doing this means some angles that are set as border in the sprite editor, are also scaling, which is not the effect i want.

    Example: note how the angles on the sides are not the same.
    image
    image

    If there isnt an option to use images and set the mode to sliced?, is there another way to achieve this effect with raw images?

    Thanks in advance!
    Post edited by HarryHamster on
  • No, because the legacy GUI doesn't support sprites. ORK 2's setup needs to work in both legacy and new UI, so there's no support for sprites. You can use them as part of UI prefabs you're using, though.

    ORK 2 is older than the Unity UI, so there are some limitations in that regard to make it compatible with both.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • What do you mean with UI prefabs? The ones that serve as template for a button for example?

    Or am i missing something? Is there a way to use a prefab for a bar value?
  • Yeah, the prefabs for the box, buttons, etc.

    E.g. if you use a GUI box for a HUD, you can do a lot of the styling setup directly on the GUI box's prefabs (the GUI box can override the default prefabs). You can even add custom functionality and add content there instead of using HUD elements.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I know gui boxes can get custom prefabs, however i dont entirely understand how this can help customize the bar for example. Ill add some more info below and I hope you can guide me in the correct direction then.

    So lets say i want to display an overview of my party members, i use a hud that looks something like this
    image

    This is placed in a gui box specifically for this HUD.

    When i add a prefab for this hud to the gui box, how can i overwrite for example just the bar (the image)? I understand the gui box can take care of styling for example the content box etc for like a panel background. But how can it customize elements that are children of the content box?

    Or am i thinking of it in the wrong way?
  • Well, that's not possible, because those things are created at runtime when creating an instance of the HUD. What you can do is add a custom bar to display a status value (i.e. involving scripting) to the GUI box's prefab.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I have taken a look at this but when i try this ORK seems te remove elements from my prefab (scripts, children, etc), so i dont really get how to do this?
  • Hm, ORK doesn't really remove things from the prefabs - it only adds it's own UI stuff (text, images, etc.).
    What's the setup on the prefab like?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • You are right it does not get removed, i assumed it used the prefab i gave it but it doesnt. Though the problem then becomes that the prefab isnt used for the elements in the hud. You can find some more info below.

    The combatant hud being displayed is this
    image

    I have a combatant component in my menu screen as below
    image
    The gui box referenced there has a content box prefab and that works great, also adds script etc. However the choice button (since in the hierarchy every instance of the HUD shows up as a choice) doesnt seem to use the prefab.
    image

    You can see the hierarchy in the inspector here.
    image
    The clone is the prefab of the content box, and it has the required script, however the choice does not use the defined prefab. I also tried adding the prefab to the gui box that contains the HUD (though i dont think this is necesarry since as far as i know the hud doesnt use a gui box in this case)

  • Enable Show As Button to use button prefabs, otherwise ORK generates blank choices without using a prefab here. This is a special case because you usually don't want a button around your HUD :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.