Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Programming and Scripting
Overlay txt with scrollbar?

Newbee
Guest
Quote
2021-09-14 11:46:15

Hi, is it possible to add a vertical scrollbar on a 2D overlay? with a plugin?


just_in_case
Moderator
Quote
2021-09-14 13:30:42

Yes, it is. But need scripting.


veganpete
Registered User
Quote
2021-10-06 16:10:56

You could make it without coding by using a series of 2D overlays and several buttons next to each other. Then use the "on hover" function to switch between the overlays (by hiding/unhiding them appropriately) as the mouse hovers over the buttons.

Although they would be separate buttons, you could position them so there is no visible gap. This would give the illusion of it being a solid scrollbar. This is how I used to make CDRom menus - works like a charm but it would take me hours to make a single menu.

As just_in_case says, it would probably be easier to script it if you know how.


sven
Registered User
Quote
2021-10-09 06:42:35

Newbee wrote:
Hi, is it possible to add a vertical scrollbar on a 2D overlay? with a plugin?


I have made simple overlay with scrollable text.

https://www.ambiera.com/forum.ph...


hadoken
Guest
Quote
2021-10-10 12:44:07

Impressing & very useful, many thanks @sven.

Do you think, you could also get this going with relative Position Mode instead of absolute pixel Mode of the involved 2D Overlays? That would also be cool.

Besides, have you worked on the third player climbing concept of yours as demonstrated at YouTube any further to maybe provide any improved scripts for easy use with other projects?

Like your spirit of sharing knowledge, motivation & invention very much, your CopperCube community contributions are always great & very much appreciated! Big THX!

Cheers


sven
Registered User
Quote
2021-10-10 16:21:00

hadoken wrote:
Impressing & very useful, many thanks @sven.

Do you think, you could also get this going with relative Position Mode instead of absolute pixel Mode of the involved 2D Overlays? That would also be cool.

Besides, have you worked on the third player climbing concept of yours as demonstrated at YouTube any further to maybe provide any improved scripts for easy use with other projects?

Like your spirit of sharing knowledge, motivation & invention very much, your CopperCube community contributions are always great & very much appreciated! Big THX!

Cheers


Thanks for nice words.

Yes it can be done by percent instead of pixels.
(next version i will add this option to chooce pixel or percent)
(also i add scrolling with mouse wheel)

My 3rd person climb game uses simple system.. if player jumps or falls near to climbable object and player chin
touches "on_proximy" area then invisible plate will appear under player and player sets its animation to hang..
(so actually it stands on plate with hang animation)
Plate will appear actually under climbable object -Y value(so its always at correct position).
It doesnt use any special script ..only sets animation and sets plate position when "on_proximy" occurs.



Edit:
Now you can scroll with mouse wheel and use pixel or pecent position mode.

https://drive.google.com/file/d/...


hadoken
Guest
Quote
2021-10-10 20:30:49

Thanks for the lightning fast update @sven which seems to work like a charm with new option "PixelOrPercent" 2D Overlay Position Mode and corresponding 0/1 selecting. So now we can have easier manageable story text, point & click mechanisms, inventories and certainly much more - resolution independent.

Great job!!!


P.S.: Your climbing approach is also very effective & clever. I remember using a similar technique but vertically flipped for defining/limiting player jump heights by an invisible collision plane in one of my CC research projects.


gree
Registered User
Quote
2022-11-16 14:29:40

@sven thanks for this great script.
For some unknown reason I ran into some troubles and I was hoping for you know what is going on...

- srollable area is limited to 100x100 (or 150x150) px, Top-Left orientation of the 2doverlay node
Within this area it is possible to scroll up/down. When the mouse cursor resides in an onscreen position of ~300,500 px (x,y) the scroll feature stops working

- long text is visible beyond bottom edge (the 2doverlay does not hide the text if it's longer)
-> I've tested this on a WebGL FullHD output size

Any idea how to overcome these issues? If not I do have an alternative workflow; but would prefer this one.

Many thanks.


sven
Registered User
Quote
2022-11-17 18:25:32

wrote:
@sven thanks for this great script.
For some unknown reason I ran into some troubles and I was hoping for you know what is going on...

- srollable area is limited to 100x100 (or 150x150) px, Top-Left orientation of the 2doverlay node
Within this area it is possible to scroll up/down. When the mouse cursor resides in an onscreen position of ~300,500 px (x,y) the scroll feature stops working

- long text is visible beyond bottom edge (the 2doverlay does not hide the text if it's longer)
-> I've tested this on a WebGL FullHD output size

Any idea how to overcome these issues? If not I do have an alternative workflow; but would prefer this one.

Many thanks.


Seems like WebGL doesnt care to hide text that is out of the rect.
(this problem exsists even if my script not being used so its something to do with WebGL itself)
I have some ideas how to make it work but it takes time and my ideas may not actually work so cant promise that i can make it to work on WebGL.


gree
Registered User
Quote
2022-11-17 22:37:41

sounds good, but don't rush just because of me.
I'll overlay a custom div to trigger the visibility of that from a ccb button. should work too.


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Inter?ational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact