blob: 59dbdf848bfb4fc3aa2e92327cf64ea0095e3e6f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
class_name CharacterSelectionItem
extends Control
signal activated
signal selected
func initialize_with_info(info: CharacterInformation):
%Head.texture = load(
"%s/%s/000.png" % [
"res://client_data/data/sprite",
Constants.FilePaths.get_player_head(info.gender, info.head),
]
)
%Body.texture = load(
"%s/%s/000.png" % [
"res://client_data/data/sprite",
Constants.FilePaths.get_player_body(info.gender, info.job),
]
)
%Name.text = info.name
func _on_gui_input(event: InputEvent) -> void:
if event.is_pressed():
activated.emit()
func _on_login_button_pressed() -> void:
selected.emit()
|