22 lines
595 B
GDScript
22 lines
595 B
GDScript
extends Control
|
|
|
|
export(String) var title := ""
|
|
export(String) var description := ""
|
|
export(Texture) var texture_normal
|
|
export(Texture) var texture_hover
|
|
export(bool) var is_left := true
|
|
|
|
onready var button = $TextureButton
|
|
onready var hover_control = $HoverControl
|
|
|
|
func _ready():
|
|
button.texture_normal = texture_normal
|
|
button.texture_hover = texture_hover
|
|
hover_control.selection_object = button
|
|
if is_left:
|
|
hover_control.infobox_position = "right"
|
|
else:
|
|
hover_control.infobox_position = "left"
|
|
hover_control.info_panel.title = title
|
|
hover_control.info_panel.content = description
|
|
|