New Percent Class

I recently started working on a plugin that allows you to manage new ready-made classes (you can see it here). But due to some issues that are still unresolved I decided to prepare some classes for it before it was ready and I created some classes including the percentage class, I had some conversations yesterday that made me decide to prepare this class for use and added some features to it, you can see it here and download:

There is more guidance on the main page of the repository and inside the file (with Godot documentation system), but if there are any questions I will be happy to answer, I may also publish a demo of how to use it soon.
I would be happy to try it out!

1 Like

I see you have a convert_to_string() function however I think you should also be overriding the _to_string() function so that it can be dropped straight into a print (and other uses).

func _to_string()->String: 
   return str(_value)    
   #return str(_value * 100)    # alternative (but i prefer the former)
1 Like

This will be a little different because it is not clear whether to convert to a string it should just return the value or include the %…

IMO just return the value ex .5

OK, It was fixed