Small scrollable area

Get help using Construct 2

Post » Mon Nov 04, 2013 10:15 am

Hi there,

busy with an app which displays a textbox half the windows size somewhere in the middle. And depanding on actions, text fields are spawned on top of this text box as extra options.

I load a bunch of data from a php file elsewhere, this data dynamically spawns the text fields which become clickable links.

Problem: when it loads a long list, the spawned list of text boxes below eachother become longer then the text field on top which they are generated ...
Result: text links cover the entire app from the top down where they are generated.

When I programmed in html I simply made a div with overflow-y: scroll with set dimensions, instantly giving me a scrollable area ...

Is there something like this in Cs2 ?
Something like a div which gives me a localised scrollable area ?
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Mon Nov 04, 2013 8:26 pm

Sweet found my own solution :D

So simple, I love this prog !

is touching object, I set a var from touch.y once, compare distance difference from following touch.Y slide
as long as its touching it increases or decreases all the Y from the spawned text objects
Added some fade and invisible limiter for height and low and voila !!!

loving it
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Wed Nov 06, 2013 12:29 pm

@lennaert, Could you provide example capx please for a slow minded fool today. Can't wrap my head around it lol

I created something similiar, but it is overly complicated. This seems so much simplier.

My very over complicated example.
Scrollable SpriteFontDUTOIT2013-11-06 12:31:20
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Thu Nov 07, 2013 11:26 pm

Hi there :D

I took a look at that thing and euhm .. well .. yes ... looks, troublesome haha


but, tbh, to get all the delimiters in place what I do requires some events to keep it very clean .. but it also kinda depands on where and what you need to apply. So keep in mind, added example is rough work.

My approach is that i take a text box and spawn it .... hadnt used a sprite font before.


Anywaysz, I added some pieces .. I abused your slider thing, and made it a slide controle.
Just start your own example, my functionality is integrated together with it.

https://dl.dropboxusercontent.com/u/7134196/scrollable_spritefont.capx
lennaert2013-11-07 23:27:50
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Fri Nov 08, 2013 6:57 am

Lol, yeah, very troublesome :)

Thank you for capx - Wow, so cool with slider - I will play around with it. Thanks again.

As for sprite font, I sort of moved away from textbox as it tends to give some problems on mobile etc. I just use sprite font now for everthing. Once you learn how to make your own - it really is better (more pretty at least).
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718

Post » Fri Nov 08, 2013 7:04 am

Your welcome.
One of the things I'm currently liking to my approach is that I can set options/events/actions for each spawned textbox too. :)

Just imagine a score list, with your score standing out, blinking or bigger font etclennaert2013-11-08 07:04:39
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,572

Post » Fri Nov 08, 2013 7:19 am

Your approach is very versatile. Much easier to understand with the capx example.

Yip, a score list will work nicely. But so many other uses too :)
You think you can do these things, but you can't, Nemo!
Just keep reading.
Just keep learning.
B
65
S
16
G
9
Posts: 1,429
Reputation: 12,718


Return to How do I....?

Who is online

Users browsing this forum: Lancifer, Yahoo [Bot] and 22 guests