Jump to content

How do you implement scroll on GUI?


renjianfeng
 Share

Recommended Posts

Hi guys!  There is a "odd thing" that @Arte and I created, once.  It uses a complex stackPanel swap-out method to accomplish a mousewheel-active, slider-drag-active, scrolling dialog/listview.

https://www.babylonjs-playground.com/#08KEYA#32

Not sure if useful or on-topic, but I thought I would pass it along.  Be well, guys.

Oh yeah, there's another terrible example/attempt... https://www.babylonjs-playground.com/#11JINV#44

Phew... talk about taking the long bus to school.  :)  Perhaps smarter to make a giant plane-o-text, position it at 1000x 1000z.  Light it and scroll a 2nd camera across it, create a renderTargetTexture from THAT 2nd camera, and feed that RTT to another plane's material.  Put the plane inside the picture frame.  Done.  :)

That PG series eventually became "the sparkle-fonts test".  Goofy fun.  

Link to comment
Share on other sites

Oh Arte, don't try to be humble and claim you ONLY contributed the mouseWheel feature.  Folks, he bought ALL the beer, and ALL the pizza, and was a major consultant and advisor for the entire scrolling list-view project.  :)  He also got us some hookers for the release party.  hehe.  (no, not really, but he DID offer some farm animals)  :)

https://www.babylonjs-playground.com/#1WROZH#59

I started one of the RTT-scroller tests (as described earlier).  I haven't moved the textPlane out to nowhere, yet, nor moved camera 4 out to scroll across it... slowly... and rtt-feed mon4 plane on the bottom.  (or, scroll textPlane across cam4 fov... Teleprompter v1.0.  :) LayerMasks might also eliminate the need to move the textPlane and camera4 to 1000x/1000z, too.  We can, instead, hide it on a layer of its own... maybe. 

Sometimes I get stuck in the scene.activeCameras array, surrounded by curious renderGroupId's & layerMasks, and I get easily entangled, and then my dog starts barking at me for some reason.  Weird.

I can't get the darned textPlane or text1... to have a white background.  I forgot how to use materials or control.background or something.  The more I code, the dumber I get.  :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...