Skip to content
Nikita Yudin edited this page Feb 13, 2024 · 8 revisions

Spin Button Manual

Welcome to the Godot Spin Button Manual! 👋

This manual will guide you through how to get the most out of the Spin Button addon for Godot 4.x. Whether you are new to game development or a seasoned pro, this manual aims to provide you with a thorough understanding of how to effectively create a customizable horizontal selector.

Introduction

The addon adds a new "SpinButton" element that think of this thing as a dropdown but the navigation is managed by with next and previous controls. By incorporating this addon, users can conveniently choose options in a horizontal arrangement, thereby enhancing the overall user experience in Godot projects.

Getting Started

First, make sure you've followed the Installation instructions from the README file. Ensure that the addon is activated in your Godot project.

Initialize SpinButton

Now that we have a SpinButton, we can start using it.

If you want the button not to be created on loading, you need to set the "auto_initialize" parameter to false. Then you can initialize the button at any time using the "initialize" function.

For example:

var spin_button = new SBSpinButton()
spin_button.auto_initialize = false
spin_button.initialize()

After initializing the SpinButton, you can find out if the button is initialized or not:

print(spin_button.is_initialized)

We hope this manual helps you to effectively use the Spin Button addon to enrich your game development experience. Happy coding! 😄