Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrollbars would be cool :) #39

Open
kremsy opened this issue Apr 3, 2017 · 3 comments
Open

Scrollbars would be cool :) #39

kremsy opened this issue Apr 3, 2017 · 3 comments
Labels
Milestone

Comments

@kremsy
Copy link

kremsy commented Apr 3, 2017

Scrollbars in FML as ScriptFeature would be quite handy.

@PRGfx
Copy link

PRGfx commented Apr 5, 2017

Out of curiosity: how would you imagine an API for that in FML?
I could think of something like this, but again I don't even know how you would use this project.

$vScrollbar = new Scrollbar()
  ->setSize(4, 100)
  ->setDirection(Scrollbar::ScollDirectionVertical)
  ->setMinHandleSize(10)
  ->setValue(0.2)
  ->setDisplayAlways(true) // hide scrollbar if the content doesn't fill the container?
  ->setPosition(Scrollbar::PositionLeft); // next to container or custom coordinates

$scrollbarFeature = new ScrollbarFeature()
  ->setSize(100, 100) // containerSize
  ->setPosition(0, 0)
  ->addScrollbar($vScrollbar)
  ->addScrollbar($hScrollbar)
  ->setContent($contentFrame);

Maybe using a default vertical scrollbar if no specific one is set as this would probably be the primary usecase.

(a different approach would be to cycle through a set of records and fill them into existing controls when "scrolling" rather than sliding a frame through a clipped one)

@steeffeen-zz steeffeen-zz added this to the Components milestone Jul 4, 2017
@steeffeen-zz
Copy link
Owner

steeffeen-zz commented Jul 4, 2017

Well I could imagine that it could be possible to create a Frame that has a bigger "content size" than actual size, maybe by putting another bigger frame in it. The outer Frame would then display some scrollbars that make it possible to scroll through the content.

@steeffeen-zz
Copy link
Owner

steeffeen-zz commented Jul 4, 2017

The clipping mechanism of manialink version 3 makes this possible, without it the bigger inner Frame would still be visible completely instead of begin cut off at the edges like we need it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants