Scroller for Sprites or Tiles

Get help using Construct 2

Post » Tue Jan 08, 2013 3:57 am

Hi all, i'm making an UI element where you can scroll the icons inside of sprite or tile background.

Related to pic



I'm using Blend effect "source atop" to icons to make them invisible outside of sprite window.

I couldn't make it, do you have good idea?

Thanks!Joannesalfa2013-01-08 03:59:19
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Tue Jan 08, 2013 9:21 pm

Anyone could help me?
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Tue Jan 08, 2013 10:59 pm

Isn't there a masking webGL effect?
B
50
S
21
G
8
Posts: 844
Reputation: 10,299

Post » Tue Jan 08, 2013 11:08 pm

[QUOTE=justifun] Isn't there a masking webGL effect?[/QUOTE]

@justifun it's not only about masking effect, i was looking a solution to create a scroller for sprite background, the problem is when the icons move to down, the icons are still visible outside of sprite background
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Tue Jan 08, 2013 11:29 pm

you can create an invisible object(container), pin the objects you want to scroll to the container, and change it's position on scrollbar dragging.wildmedia2013-01-08 23:29:38
B
15
S
3
G
2
Posts: 42
Reputation: 2,412

Post » Tue Jan 08, 2013 11:53 pm

[QUOTE=wildmedia] you can create an invisible object(container), pin the objects you want to scroll to the container, and change it's position on scrollbar dragging.[/QUOTE]

@wildmedia i've made a .capx according your idea, but i wasn't sure how to make it to pin the objects to scroll to the cointer and change it's position on scrollbar dragging.

scroller.capx
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Post » Wed Jan 09, 2013 12:06 am

I edited the capx a bit, I'm sorry but i have to go to sleep, (4 more hours and I must go to university)

The idea is that you must calculate the delthaX (current touch X - strating X) and move the family in the oposite direction with the deltha value.

.capx
B
15
S
3
G
2
Posts: 42
Reputation: 2,412

Post » Wed Jan 09, 2013 12:08 am

I think that the best option is to use the draggable behavior on the pink sprite and in the IS DRAGGING event SET x = your pos,(otherwise it will be draggable on the X axis as well) in order to keep it feel like a scroll bar and do the deltha thing

xDwildmedia2013-01-09 00:11:26
B
15
S
3
G
2
Posts: 42
Reputation: 2,412

Post » Wed Jan 09, 2013 12:18 am

B
50
S
11
G
8
Posts: 479
Reputation: 9,911

Post » Wed Jan 09, 2013 12:18 am

@wildmedia well, it wasn't useful solution, anyways i can wait for you, have good sleep
B
96
S
25
G
20
Posts: 3,055
Reputation: 22,644

Next

Return to How do I....?

Who is online

Users browsing this forum: farfetchd83 and 19 guests