Scroller for Sprites or Tiles

0 favourites
  • 14 posts
From the Asset Store
Each tile 64 by 64 pixels - Ultimate Tile Set for your awesome games
  • Hi all, i'm making an UI element where you can scroll the icons inside of sprite or tile background.

    Related to pic

    <img src="http://www.knowdotnet.com/articles/ScrollingWindow.jpg" border="0" />

    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!

  • Anyone could help me?

  • Isn't there a masking webGL effect?

  • Isn't there a masking webGL effect?

    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

  • 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.

  • 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.

    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

  • 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

  • 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

    xD

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • wildmedia well, it wasn't useful solution, anyways i can wait for you, have good sleep

  • Wink i already edited that but it didn't help me because i changed text to sprites, when i drag scrollbar goes down, all icons goes down... i assume it's designed for Listbox, not just image list

  • Joannesalfa I think I got R0J0hound's example modified for you.

    I was in a hurry so I didn't comment what I all changed but if you compare R0J0hound's, and mine side by side you should be able to see what I did. I had to add a couple new instance variables, And I left all of R0J0hound's original code there. I just disabled what I didn't need.

    I also couldn't get his highlight effect to work. To get it working it has something to do with setting the sprite_inst to the sprite height. I commented were I was having problems with it in the code. You could probably just delete his highlighter, and make your own by setting the highlighter image visible on object clicked or something like that if you cant get his to work.

    Anyway, I hope this helps:

    Scroll Sprites

  • Joannesalfa I think I got R0J0hound's example modified for you.

    I was in a hurry so I didn't comment what I all changed but if you compare R0J0hound's, and mine side by side you should be able to see what I did. I had to add a couple new instance variables, And I left all of R0J0hound's original code there. I just disabled what I didn't need.

    I also couldn't get his highlight effect to work. To get it working it has something to do with setting the sprite_inst to the sprite height. I commented were I was having problems with it in the code. You could probably just delete his highlighter, and make your own by setting the highlighter image visible on object clicked or something like that if you cant get his to work.

    Anyway, I hope this helps:

    Scroll Sprites

    Wink Nice! thanks for modifying, i think i should modify to get the positions like the icons in grid. Your help is useful after all. Thanks!

  • I've spent like 9 hours figuring out to make a decent scroller, well no solution :/

    EDIT: I've made a simple scroller, so there no dynamic scrollbar, but 2 buttons.

    http://dl.dropbox.com/u/76227787/scroller_ivan.capx

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)