Results 1 to 3 of 3

Thread: Passing index to functions with Inputs and Buttons

  1. #1

    Exclamation Passing index to functions with Inputs and Buttons

    It would be great to be have Inputs and Buttons pass their input/buttons index to the function they call.

    Currently, you may want to have several buttons/inputs do nearly the same thing, but the quickest way to do that is to have each of them call their own function that will call FunctionB which takes an index (or a string or something) as a parameter. If you have a lot of buttons, that means a lot of code that we could easily live without if the button/inputs would pass their index on top of obj, player, alt, input_value, and selected. We could then all have them call their FunctionB and do different things inside the function itself.

    This might seem like it's a small thing, but sometimes you can potentially have a LOT of buttons/inputs that do similar things but with 1 difference such as which numbered input did you type a word in.

  2. #2

  3. #3
    Join Date
    Jan 2014
    These old createButton() based are consider depreciated at this point now that you can spawn 3d UI with the new Xml UI system.

Similar Threads

  1. Inputs Ghosting
    By LastTalon in forum Bug Reports
    Replies: 3
    Last Post: 09-23-2017, 10:08 PM
  2. Inputs: pressing Enter and Tab
    By Unreal_Ed in forum Scripting Suggestions
    Replies: 7
    Last Post: 09-08-2017, 10:34 AM
  3. Passing functions between scripts?
    By dzikakulka in forum Scripting
    Replies: 7
    Last Post: 07-20-2017, 05:56 PM
  4. Make button click functions return button parameters and/or index
    By MrStump in forum Scripting Suggestions
    Replies: 0
    Last Post: 05-16-2017, 10:10 PM
  5. Passing parameters to a coroutine
    By Tanners in forum Scripting
    Replies: 3
    Last Post: 04-04-2017, 08:19 AM

Tags for this Thread

Posting Permissions

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