This repository has been archived on 2020-09-30. You can view files and clone it, but cannot push or open issues or pull requests.
2020-07-21 08:51:15 +00:00
|
|
|
extends Control
|
|
|
|
|
2020-07-21 17:47:33 +00:00
|
|
|
onready var log_text = $ResizablePanel/RichTextLabel
|
2020-07-21 08:51:15 +00:00
|
|
|
onready var chat_bar = $ResizablePanel/LineEdit
|
|
|
|
|
2020-07-21 17:47:33 +00:00
|
|
|
func _input(event: InputEvent) -> void:
|
2020-07-21 08:51:15 +00:00
|
|
|
if event is InputEventMouseButton:
|
|
|
|
if not chat_bar_focus:
|
|
|
|
chat_bar.release_focus()
|
|
|
|
|
2020-07-21 17:47:33 +00:00
|
|
|
func add_line(line: String) -> void:
|
|
|
|
log_text.append_bbcode(line)
|
|
|
|
|
2020-07-21 08:51:15 +00:00
|
|
|
var chat_bar_focus = false
|
|
|
|
|
2020-07-21 17:47:33 +00:00
|
|
|
func _chat_bar_status(editing: bool) -> void:
|
2020-07-21 08:51:15 +00:00
|
|
|
$"/root/scene".writing = editing
|
|
|
|
|
2020-07-21 17:47:33 +00:00
|
|
|
func _chat_bar_focus(entered: bool) -> void:
|
2020-07-21 08:51:15 +00:00
|
|
|
chat_bar_focus = entered
|