
Publisher
tattomoosa
Spinner 2D
Simple but configurable generic process status indicator node. Features: * 5 statuses * EMPTY for a process that hasn't started * SPINNING for indeterminate progress, such as a network request * PROGRESSING for determinate progress, such as a timer or download with known message body size * SUCCESS for a process that has completed successfully * WARNING for a process that has completed successfully with warnings * ERROR for a process that has errored out * Can use custom icons, with defaults ...
This plugin has been mirrored from the Godot Asset Library.
The plugin author is in no way affiliated with Gadget.
If you are the author of this plugin and would like this mirror removed, please contact support@gadgetgodot.com.
Spinner
	Simple but configurable process status indicator node, for Godot
 -->
Compatible with Godot 4.4 - use 4.3 branch for Godot 4.3 compatibility
Adds new Range control Spinner, an all-purpose process indicator. Use to provide feedback on ongoing processes - threads, network requests, timers, etc.
Features
- 5 statuses- EMPTYfor a process that hasn't started
- SPINNINGfor indeterminate progress, such as a network request
- PROGRESSINGfor determinate progress, such as a timer or download with known message body size
- SUCCESSfor a process that has completed successfully
- WARNINGfor a process that has completed successfully with warnings
- ERRORfor a process that has errored out
 
- Can use custom icons, with defaults taken from Godot's own icons
- Option to use no icon and fills with status color instead
- Configurable spinner/border width and speed
- Configurable colors and option to use editor theme
Installation
Install via the AssetLib tab within Godot by searching for Spinner
Usage
Add the Spinner node to your scene. All options update a live preview in the editor. All options are documented in the Inspector panel. If anything isn't clear enough there, open an issue.
Basic Usage
Set status to the desired status indication setting. Spinner is a range node, and
can have its min_value, max_value and value updated accordingly, but those values
only affect its border fill when status is Status.Progressing.
To set value to a new value and status to Status.Progressing at the same time,
use set_progressing(value). This function can be connected to a signal for easy updates,
but be aware that when value == max_value Spinner will not automatically update to Status.SUCCESS,
that has to be set separately.
Borderless Icons
If you set icon_borderless, you probably also want to set icon_scale to 1.
Example: Watching an HTTPRequest
A very basic implementation.
@onready var spinner : Spinner = $Spinner
@onready var http_request : HTTPRequest = $HTTPRequest
func _ready() -> void:
	var error := http_request.request("https://github.com/godotengine/godot/releases/download/4.3-stable/godot-4.3-stable.tar.xz")
	if error != OK:
		spinner.status = Spinner.Status.ERROR
	http_request.request_completed.connect(_on_request_completed)
func _process(_delta: float) -> void:
	if http_request.get_body_size() > 0 and http_request.get_http_client_status() != HTTPClient.STATUS_DISCONNECTED:
		spinner.max_value = http_request.get_body_size()
		spinner.set_progressing(http_request.get_downloaded_bytes())
func _on_request_completed(
	result: int,
	response_code: int,
	headers: PackedStringArray,
	body: PackedByteArray
) -> void:
	spinner.status = Spinner.Status.SUCCESS
The Future
I primarily intend to use this to watch network requests, thread execution, etc. I am considering bundling extended classes which do this as-expected and have optional labels, but in its current state it is fairly simple to hook up to these manually. Let me know if there's interest in the following (or other) pre-built solutions:
- HTTPRequestSpinner
- ThreadSpinner
- ValueSpinner- Connect to any value_changed-type Signal, auto-SUCCESS upon completion)
 
- Connect to any 
The main thing holding me back from including this is it feels a bit like clutter and any plugin-side implementation should be really robust.
Let me know if there's interest!