How do I add inner scrollbars?

0 favourites
  • 5 posts
From the Asset Store
Scrollbars with FULL functionality and versatility, just like the ones you can find in AAA games!
  • I know Construct can use scrollbars but what I want is to have scrollbars active for a subset of the interface. I have attached a screenshot of a piece of code I'm working on. You'll note that there 10 textboxes with names in the textboxes on the left side and money amounts in the textboxes on the right side. I'd like to be able to scroll such that one could scroll through more than 10 textboxes while leaving the background in place. Also, I'd like to activate/deactivate the scrollbars based on whether or not there are more than 10 textboxes of info.

  • There's a tutorial for custom scrolling: https://www.scirra.com/tutorials/1217/c ... -or-slider

  • So I just got around to attempting to implement said scrollbar feature. However, I now have a different issue. The scrollbar tutorial leaves the parts of the sprite not in the window visible. Is there a way to make whatever can be viewed within the window that is not currently within the window invisible while leaving everything that is not meant to be viewed inside the window visible? That way I can have many sprites, text boxes, etc. without the parts not within the window covering everything above and/or below the window.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use 'Blend Mode'. To the demo, I've created a new layer, set it to 'Force own texture' = Yes, and moved 'content' and 'window' to that layer. For 'content' set the Blend mode to 'Source in' - it will disappear. Make a new Sprite ('windowClip') that is just a square that is slightly smaller than 'window' and center it in 'window'. Now right-click 'windowClip' and 'Z Order' -> 'Send to bottom of layer. 'content' will now be visible where it overlaps 'windowClip'.

  • Thanks for the new version. Another follow-up question: As per the screenshot included in my very first post in this thread, I'm looking to hide/show text boxes. Text boxes do not appear to have an Effects section where I can set the Blend mode to 'Source in' as you did with the 'content' sprite. How would I make text boxes disappear except when said text boxes are within the window?

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