20 lines
330 B
GDScript3
20 lines
330 B
GDScript3
|
extends BaseControl
|
||
|
|
||
|
|
||
|
@export var TextureNormal:Texture2D
|
||
|
|
||
|
@export var TextureSelected:Texture2D
|
||
|
|
||
|
|
||
|
|
||
|
var is_select:bool=false:
|
||
|
set(value):
|
||
|
if value:
|
||
|
$TextureRect.texture=TextureSelected
|
||
|
else:
|
||
|
$TextureRect.texture=TextureNormal
|
||
|
is_select=value
|
||
|
func _ready() -> void:
|
||
|
super._ready()
|
||
|
self.focus_mode=Control.FOCUS_NONE
|