+1 vote

I create a theme for the interface in the game. Add to the theme of the class "SpinBox". It includes only the icon...
enter image description here
How can I change its "skin"?

in Engine by (355 points)

1 Answer

+1 vote

The first or left part of the SpinBox is a LineEdit object so you need to add the Class LineEdit to your theme too. Then you can change everything regarding theme and stylebox for it.

You can set everything in the inspector.

The theme can be set in GDScript too.
But it seems to be missing to set the icon in GDScript or I did not find it yet.

obj.add_icon_override("custom_icons/updown", preload("res://ArrowUpDown.png"))

does not seem to work. Although it works to use the same png file in the Inspector for defining the icon.

by (75 points)
edited by

thank you ,so it was LineEdit

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.