How do I call a listbox from a sprite?

0 favourites
  • 8 posts
From the Asset Store
Medeival & Viking War Horns Sounds / 22 Unique Calls / 2:40 minutes of audio
  • Hi,

    I'm using listbox to store some lists, but I want the list to load when I tap on a sprite (custom button). Is it possible to do that?

    Tagged:

  • What do you mean by 'call' or 'load'?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • What do you mean by 'call' or 'load'?

    Sorry.

    I'm using the default List object (dropdown list) to store some names, but I want to hide this object and access the dropdown list when the user touches a sprite object.

  • + Mouse: On Left button Clicked on Sprite

    -> List: Set visibility Visible

  • + Mouse: On Left button Clicked on Sprite

    -> List: Set visibility Visible

    This is not ideal, because the list box (the gray box) appears on top of the sprite.

    It is an Android application.

    In other programming languages ​​this is called a "call dropdown list" where I can access the list without needing to touch the object.

    And after selecting the item from the list, I can write a result in a label for example. (This I know how to do).

  • I see, I'm not familiar with that, but I would try leaving the list object outside of the viewport and using the set focus action to see if it triggers the system list popup dialogue. Alternatively, you could use CSS to style a listbox however you like, similarly to how the system displays it. One more option is to use javascript to directly call and build the list in an android alert dialogue.

  • I see, I'm not familiar with that, but I would try leaving the list object outside of the viewport and using the set focus action to see if it triggers the system list popup dialogue. Alternatively, you could use CSS to style a listbox however you like, similarly to how the system displays it. One more option is to use javascript to directly call and build the list in an android alert dialogue.

    I just did another test, and I left the list box visible, with the same size as the sprite and in the same position. But I left the text and background transparent.

    When tapping on the sprite, the list opens normally on my Android, I'm just not sure if it will work on other phones, because testing it on Windows the text of the list is transparent as the box, but on Android it doesn't.

  • You can use the platform info object to make specific events for each platform depending on how you want it to behave.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)