Results 1 to 4 of 4

Thread: new UI system - "Self" as event function target

  1. #1
    Join Date
    Feb 2017

    new UI system - "Self" as event function target

    I know that you can use the GUID of an object to have a UI element trigger a function in game, but would it be possible to add the ability to have "self" to refer to the object that spawned the UI? (which falls back to Global if the UI was not spawned by an object?)

  2. #2
    Wait, how does a script dynamically add an element to the UI? I thought they had to be always defined by hand in the UI xml file. Probably missing something obvious but can't find it in the API.

  3. #3
    Join Date
    May 2016
    Objects, and scripting in general, do not spawn UI elements. You can only show/hide elements that are part of the table's UI layer. If you wanted to dynamically change where a UI element is pointed, you would just change its function triggering attribute with UI.setAttribute(...)

    Could change in the future, but that is likely you best bet currently.

  4. #4
    Join Date
    Feb 2017
    Ah, I follow now.
    So basically, I cannot import an object with a UI but I rather have to open up a save game with a UI present.

Similar Threads

  1. Replies: 7
    Last Post: 07-25-2017, 09:24 AM
  2. Event needed when object enters a "bag/deck" (not global).
    By francogp in forum Scripting Suggestions
    Replies: 3
    Last Post: 07-06-2017, 09:16 AM
  3. Function for "modified cards" in popup.
    By Tragic in forum Suggestions
    Replies: 3
    Last Post: 12-15-2016, 04:16 PM
  4. Replies: 3
    Last Post: 08-15-2016, 02:01 AM
  5. Replies: 2
    Last Post: 05-09-2016, 10:27 AM

Posting Permissions

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