blob: 23641e5b948e81483f11f65547707f1a7eb8ccb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
extends TextureButton
@export var background_colors: Array[Color] = [Color.MAGENTA]
func _ready() -> void:
var texture_keys := [
"texture_normal",
"texture_pressed",
"texture_hover",
"texture_disabled",
"texture_focused",
]
for texture_key in texture_keys:
if not self[texture_key]:
continue
self[texture_key] = BMPTexture.from_texture(self[texture_key], background_colors)
|