Posts by yahwho

A new update is now available, introducing "Points of interest" and many more changes!
Latest hotfix: 0.9 (2025-11-04)

    Argh, looks like even if you set a status of a door to open via the API, if it's locked you still can't open it. :dizzy:



    Java
    println("obj.getStatus() = " + obj.getStatus(), PrintlnColour.YELLOW); //prints 0 (locked door)
    final byte next = (obj.getStatus() == 0) ? (byte) 1 : (byte) 0;//flip the bit
    obj.setStatus(next);//sets to 1



    Console states "Door <long id> is locked..."





    EDIT: Wait a minute... not 1 its 100 :crazy: let me try that...
    EDIT2: Nope, setting to 100 still doesn't override the lock.

    I have tried this, but the elementObject does not have a getObjectDefinition method exposed in the API. :wat:


    Unless I'm incorrectly assuming that elementObject variable is a ObjectElement object?



    Hi Red,


    I see there are Objects.Type definitions.


    It would be great if we could get a ElementObject and get the Type definition.


    Sudo:


    Code
    if (elementObject instanceof Object.Storage) { ... }


    At the moment I'm having to use elementObject.getObjectID() then a comparison.

    Hi red51

    One last question (or two) here regarding modals...

    Is it possible to override the text that is displayed on the buttons?

    And, is it possible to change the alignment of text so it's, for example, aligned to the left?

    But we could add a method to the Internals class which enables you to apply custom StyleSheets to any UI element (this way you would be able to override the hover style of built-in elements)

    That would be awesome Red :thumbup:


    As a result, you can only load custom StyleSheets from AssetBundles atm

    Annoyance yes I agree, but If I wrapped it in a loader this would hopefully only be an annoyanceonce :saint:

    red51


    So is it possible override the hover background colour on modal windows like the Accept_Decline one?


    I see that the Style is based on IStyle in Unity, and that uses USS for this, I am assuming USS is Unity's version of CSS?

    I'm almost certain I did mention this a while back... but now you have me thinking 🤔😅


    If I understand correctly you want to be able to change the default cursor as well as set custom cursors when hovering API-created UI elements?


    Exactly this.


    I think this could be done by a new onMouseMove method and moving a image x y pos, but then again, this may trigger too many events and may not be feasible and may end up being clunky.


    It's more a "would be nice" API access, it's certainly not a show stopper :D

    Hi red51

    Sorry to be a pain, but can you show an example for the MessageBoxLayer?

    I've been trying to hack it for a few hours but I think just asking you may be easier :lol::lol:


    Ideally the accent colour on all menus, built in and API loaded ones.


    But if we could set individual colours for each item that would be a bonus. :saint: