Results 1 to 14 of 14

Thread: XML on rightklick

  1. #1
    Join Date
    Jun 2017
    Location
    Sweden
    Posts
    24

    XML on rightklick

    Could we have access to an objects xml throw right klick, like we can do today with script?

  2. #2
    Join Date
    Feb 2017
    Posts
    178
    +1 please

  3. #3
    Join Date
    Jan 2014
    Posts
    986
    This should be working now.

  4. #4
    Join Date
    Feb 2017
    Posts
    178
    So... did this get added? I cannot find anything in the API docs that mention an alt click except for the classic-style buttons. the XML system seems to not even acknowledge any kind of right-click or alt click.

  5. #5
    Join Date
    Feb 2017
    Posts
    178
    I know it's bad form to bump a thread, but it's been two weeks since I asked about if this was actually added or not - would it be possible to get an update?

    EDIT:

    <Button id="testButton" onClick="onClickFunc">Test</Button>
    function onClickFunc(player, value, id, test, test2)
    print(player)
    print(value)
    print(id)
    print(test)
    print(test2)
    end

    prints out the following, no matter which form of clicking I do.
    LuaPlayer, nil, testButton, nil, nil
    Last edited by FoaS; 09-23-2018 at 01:13 PM.

  6. #6
    Join Date
    Feb 2017
    Posts
    178
    For the love of all that is holy, bump!

  7. #7
    Join Date
    Sep 2018
    Location
    Melbourne, Australia
    Posts
    14
    FoaS, if you want this to be added you'll want to contact the developers of XmlLayout (support email on linked page). I've just sent them an email asking the same. Assuming they make the change (pretty sure it's one line of code), then we can ask Berserk to update the XmlLayout version used in TTS. Berserk wouldn't need to make any changes themselves.

  8. #8
    Join Date
    Sep 2018
    Location
    Melbourne, Australia
    Posts
    14
    By the way, Berserk can't really fix this themselves due to the way XmlLayout is written.

    Well, they technically can, but it wouldn't be pretty. They'd need to dynamically patch XmlElement.OnPointerClick (using something like Harmony), because right now it's handling pointer events and not passing through Unity's pointer ID to listening callbacks.

  9. #9
    Join Date
    Feb 2017
    Posts
    178
    Weird, then, that berserk said it was fixed...
    I appreciate the help, but not my job to request fixes or features of upstream libraries, particularly when I didn't know it was a dependency in the first place.

  10. #10
    Join Date
    Sep 2018
    Location
    Melbourne, Australia
    Posts
    14
    I could be wrong, but the OP was a bit vague. It's conceivable that Knil thought Nedok1 was simply asking for the ability to edit the XML from the right-click drop-down menu - in fact, he might have been, that's actually how I originally read it.

  11. #11
    Join Date
    Feb 2017
    Posts
    178
    Ah. That's not how I interpreted it, but that makes a lot of sense now that you've cast it in that light. No, I thought this was asking for a mechanism for capturing right click events on inputs.

    Knil, if you read this, is it worth me making another thread that more specifically requests this feature?

  12. #12
    Join Date
    Sep 2018
    Location
    Melbourne, Australia
    Posts
    14
    Digital Legacy's (XmlLayout developers) support was truly fantastic, in just over 24 hours they've already implemented support within XmlLayout. Support was so good I actually bought myself a license of XmlLayout for Unity even though I have no plans on using it directly!

    Anyway, support will be available in version 1.80 of XmlLayout. However, it's not officially released yet, the version I was given is marked as WIP, I'm not sure when the official release is expected.

    Knil, when 1.80 is officially released, if you could kindly update the dependency within TTS that would be fantastic.

  13. #13
    Join Date
    Sep 2018
    Location
    Melbourne, Australia
    Posts
    14
    I forgot to check back. However, 1.80 was officially released a month ago. If the next TTS release could please include 1.80, with "pointerId" support that would be fantastic.

    From the release notes:

    v1.80
    - Fixed an issue where XmlLayoutSelectableNavigator would still call onPointerClick events for selected objects that were no longer active
    - The delay commmands (WaitForSeconds/WaitForSecondsRealtime) used by XmlLayout are no longer cached - it appears that caching them can cause issues.
    - The onClick, onMouseDown, and onMouseUp events now support the 'pointerId' value, e.g. MethodName(pointerId), which will specify which mouse button was clicked (-1 = left, -2 = right, or -3 = middle)
    - Rewrote the drag handling code to use the position of the pointer rather than Unity's 'delta' (this should help prevent issues where the element 'lags' behind the pointer)
    - Added a (rather complicated) example: UI/XmlLayout/Examples/ReorderableList This is a list which can have elements dragged around to new positions
    - Fixed an issue which could prevent building with v1.79

  14. #14
    Join Date
    Feb 2017
    Posts
    178
    Gonna go ahead and bump this since it's been seven months since this started, three updates since then, and nothing...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •