Add wrong answer follow-up prompts
This commit is contained in:
@@ -71,6 +71,10 @@ func _build_ui() -> void:
|
||||
user_label = Label.new()
|
||||
Style.set_label(user_label, 15, Style.CYAN)
|
||||
user_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
|
||||
user_label.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
user_label.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
|
||||
user_label.tooltip_text = "Open profile"
|
||||
user_label.gui_input.connect(_on_user_label_gui_input)
|
||||
header.add_child(user_label)
|
||||
|
||||
var screens_container := MarginContainer.new()
|
||||
@@ -246,3 +250,14 @@ func _open_profile_from_menu() -> void:
|
||||
if BlockSessionService.block_started:
|
||||
BlockSessionService.finish_block()
|
||||
show_screen("profile")
|
||||
|
||||
|
||||
func _on_user_label_gui_input(event: InputEvent) -> void:
|
||||
if not AuthState.is_logged_in:
|
||||
return
|
||||
var mouse_event := event as InputEventMouseButton
|
||||
if mouse_event == null or mouse_event.button_index != MOUSE_BUTTON_LEFT or not mouse_event.pressed:
|
||||
return
|
||||
_close_app_menu()
|
||||
if current_screen_name != "profile":
|
||||
show_screen("profile")
|
||||
|
||||
Reference in New Issue
Block a user