UI: I need a scrollable list of images #709
Replies: 3 comments
-
|
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022). Resources.images().get("e2.png"),
Resources.images().get("e3.png"),
Resources.images().get("e4.png") };
ListField lf = new ListField(200, 200, 126, 504, images, 3);
this.getComponents().add(lf);[upl-image-preview url=https://forum.litiengine.com/assets/files/2020-02-13/1581604345-669891-image-list-field.gif] |
Beta Was this translation helpful? Give feedback.
-
|
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022). |
Beta Was this translation helpful? Give feedback.
-
|
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This post has been migrated automatically from the old LITIENGINE forum (2018 - 2022).
Posted: 2020-02-13 11:05:57
User: KvaGram [] (age: 1068 days 🔥; posts: 52)
I need to make a selection-menu for crewmembers in my game.
I have made a support function that builds an image containing the needed profile info for each crewman (item) in the menu.
So, say I have an array of BufferImage and an array of AbleCrewman (the object type I want to list).
I need a scrollable list component displaying the images, while giving me either the index or object when the player selects one from the list.
I have been looking in the source codes for the engine, and the closest existing component I have found, is ListField.
Now, ListField seems to not support images, only text, and have a unused property called 'buttonSprite'.
(this also seems ironic, since it creates ImageComponent objects to render the menu-text)
I could always make my own UI component for this, but that would take time.
Is there an existing component I can use for this?
Beta Was this translation helpful? Give feedback.
All reactions