SpyrexDE / SmoothScroll

Addon for the Godot Game Engine that adds a SmoothScrollContainer.
https://spyrexde.github.io/SmoothScroll/
MIT License
132 stars 10 forks source link

Setting horizontal and vertical scroll values does not work for SmoothScrollContainer #56

Closed ReikaKalseki closed 2 months ago

ReikaKalseki commented 2 months ago

As in programmatically changing the scroll position via ScrollHorizontal/ScrollVertical. I imagine your script is overriding those, so this is not very surprising, but it is still something I consider undesirable.

If there is a method in SmoothScrollContainer to do this rather than directly setting ScrollHorizontal/ScrollVertical, how do I access the SmoothScrollContainer object from my own C# code (like what am I using to be able to extend that class)?

As before, plugin v1.3 and Godot v4.2.1.

SpyrexDE commented 2 months ago

Same issue as #48

ReikaKalseki commented 2 months ago

Same issue as #48

Fair enough, though this does not answer my question about how to actually reference your custom type from my C# code.

SpyrexDE commented 2 months ago

I've never used C# with Godot before but I assumed that its just like calling any other custom gdscript function. In this case SmoothScrollContainer.Call("scroll_y_to", y_pos, duration); See https://docs.godotengine.org/en/stable/tutorials/scripting/cross_language_scripting.html#calling-gdscript-methods-from-c