Create PickerView/Tumbler like in xcode
Hi All,
Does anyone have an idea/template on how to implement a PickerView/Tumbler like you get in xcode?
Just throwing it out there
Thanks,
Does anyone have an idea/template on how to implement a PickerView/Tumbler like you get in xcode?
Just throwing it out there
Thanks,
Best Answer
-
ORBZ Posts: 1,304
You'll have to build it from scratch. There are no native GUI widgets in GS except for native text input.
I would start with a stack of items that all scroll on Y. Have an actor above them to make the border and shadow. Code the drag to scroll behavior and make all the items reflect the scrolling so that you can have a "list"
Alternatively, if it's a full screen list you can just stack the items and then move the camera on Y axis in relation to the drag-to-scroll logic you will have to implement. This is probably easier but only viable if the list is full screen.
This really seems like a lot of work for a small UI element. If possible I would suggest an alternative UI design unless it's crucial to your game.
Answers
Place all the actors in the scene, but off screen. Have the folder icon or whatever you choose tell those other actors to move into position instantly when the folder is pressed.
Super super easy, but if you want to change the contents of a folder you will need to do it manually.
On the other hand if you want to get more technical you could just create one using tables and dynamically load the content/images/names.
It is one of these I am trying to implement: http://bit.ly/LuRvZK
Thanks though