goost icon indicating copy to clipboard operation
goost copied to clipboard

Exposing `EditorSpinSlider` as `SpinSlider`

Open sairam4123 opened this issue 4 years ago • 1 comments

Describe the limitation you are having in your project I'm currently writing a custom property editor in GDScript, I don't have access to EditorSpinSlider

Describe the enhancement and how it helps to overcome the limitation Exposing SpinSlider, this is one way, I think it is easy to expose SpinSlider

How difficult it is to workaround the limitation? Write your own SpinSlider (difficult) in GDScript ;)

sairam4123 avatar May 24 '21 18:05 sairam4123

Looks like there's existing Godot proposal for this: godotengine/godot-proposals#2068.

I'm not sure whether it would be easy to expose the class to be available in non-editor builds without reimplementing the entire class in Goost (it would basically lead to copy-paste of the class, which is indeed easy to do, but may not as easy to maintain), which may be OK to do if further enhancements and properties need to be exposed.

That said, it would be much-much easier to expose this class in Godot directly, but yeah I'm not against this feature, especially when this class would complement existing SpinBox class, apparently. Yet any fixes and enhancements would need to be synchronized with Godot's implementation manually that way, which may be PITA. 😅

This is also a general problem of "editor vs scene/core" regarding editor GUI classes: godotengine/godot-proposals#2063. If Godot could implement godotengine/godot-proposals#2063 as a compile-time option, then it would be easy to take advantage of this mechanism to be available in official Goost builds. Godot aims to keep its binary sizes small for their official builds, this is why you don't see SpinSlider in Godot, and many others. 😛

Xrayez avatar May 24 '21 20:05 Xrayez