BECOME PART OF THE COMMUNITY - Sign up here
  • Andreas wrote a great post on how to use the hook.

    UI contains HookObjectChange(). I want to delete a temporary hook using Unhook() when I close the UI using "ESC". I think there is some kind of handler for closing the UI. Perhaps it is done in a similar way:

    How to do it right?

  • Two types of buttons 1 and 2 (see screenshot). Can you please tell me what their types are called? I can hypothetically suggest what it might look like:

  • Can you please tell me what their types are called?

    Both are 'PropertyInput' types. See example:

  • Thank you. It now became clear to me that these are not just buttons, but they display properties. However, for simple tasks, is it possible to use some method that would print one central text? For example, like here, where :AddListNumericItem("Central text", 1) is used for adding, and :GetListSelectedItemIndex() for reading?

  • I'm looking for a button (if it exists) that can display title "Berry" and name "Strawberry". I looked through the parameters of "Button" and "UIObject" using Dump(), but did not see the title.

  • Ah, ok. Then you can use 'IndicatorButton' type:

    Code
    return function ()
        local dialog = GetFocusDisplay().ScreenOverlay:Append('BaseInput')
        dialog.H, dialog.W = 100, 300
        local button = dialog:Append('IndicatorButton')    
        button.textleftcorner = 'Berry'
        button.colorindicatorheight = 0
        button.text = 'Strawberry'
    end
  • Hey guys, so I'm trying to figure out how to make a UI "MessageBox" element have a default button that will be lit with yellow and executed on "Please."
    It happens without my doing anything sometimes, but not others. I think it may be related to whether or not the messagebox has inputs. Is there a way to manually choose a button to be the default in this sense?

    Also another question. Is it possible to make a TextInput box larger so it can show multiple paragraphs at once?

  • Is there a way to manually choose a button to be the default in this sense?

    "Officially" not, but there is a nice workaround suggested by Andreas in another thread - put Timer(FindNextFocus, 0.1, n) right before calling the MessageBox function. n here is the amount of times you need to press Tab in your message box to get to a desired button and 0.1 is a delay between each FindNextFocus function call.

    Is it possible to make a TextInput box larger so it can show multiple paragraphs at once?

    To my knowledge - no.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!