How can I create a scrollable text box, that scrolls when finger drags
StormyStudio
United KingdomMember Posts: 3,989
Good morning,
I've searched the forum/wiki. (possibly not using right search term).
I want to create a tips page for my current game.
The page has a piece of static title text, and 'Back' button and the tips are created on one tall image (png with alpha), and there is a static background.
I want to make it so the user can click and drag down through the text , just like on the the iphone web browser, ipod music selection etc etc. Would only need to work in the 'x' axis.
Tried a few things, but nothing works as yet. Possibly due to a sleepless night looking after my new baby daughter (now 4 whole days old) ....not all bad as she has been the inspiration for my first proper game. Plus she's pretty damn gorgeous.
Any hints, would be great.
Cheers
Jon
I've searched the forum/wiki. (possibly not using right search term).
I want to create a tips page for my current game.
The page has a piece of static title text, and 'Back' button and the tips are created on one tall image (png with alpha), and there is a static background.
I want to make it so the user can click and drag down through the text , just like on the the iphone web browser, ipod music selection etc etc. Would only need to work in the 'x' axis.
Tried a few things, but nothing works as yet. Possibly due to a sleepless night looking after my new baby daughter (now 4 whole days old) ....not all bad as she has been the inspiration for my first proper game. Plus she's pretty damn gorgeous.
Any hints, would be great.
Cheers
Jon
Comments
I have tried the same thing you are working on and this is what I came up with. Create two boolean attributes (scrollup and scrolldown or something). Then create two button actors. In each actor have a rule that says when pressed change scrollup to true (same for other button with other attribuute).
Then create am actor called scrollcamera. In this actor put a control camera behavior. Then a rule that says when scrollup is true move DOWN. This makes the camera move down which makes the textbox in the background appear to move up. Do the opposite for when scrolldown is true. It's not the same as using your finger in your iTunes playlists but it gets the job done and if you make a nice looking pair of buttons it can come out very professional.
good luck. let me know if you do get it to work like iTunes.
Cheers Jon
can't see where its gone wrong...
Cheers
Jon