about summary refs log tree commit diff stats
path: root/.gitmodules
blob: ebe016fe7a46b84ba35c56ee61c3ac2040615639 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
[submodule "vendor/hkutil"]
	path = vendor/hkutil
	url = https://git.fourisland.com/hkutil
[submodule "vendor/apclientpp"]
	path = vendor/apclientpp
	url = https://github.com/black-sliver/apclientpp.git
[submodule "vendor/valijson"]
	path = vendor/valijson
	url = https://github.com/tristanpenman/valijson.git
[submodule "vendor/wswrap"]
	path = vendor/wswrap
	url = https://github.com/black-sliver/wswrap.git
[submodule "vendor/asio"]
	path = vendor/asio
	url = https://github.com/chriskohlhoff/asio/
[submodule "vendor/vcpkg"]
	path = vendor/vcpkg
	url = https://github.com/Microsoft/vcpkg.git
: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
extends Node

var _message_queue = []


func _ready():
	var label = Label.new()
	label.set_name("label")
	label.margin_right = 1920.0
	label.margin_bottom = 1080.0 - 20
	label.margin_left = 20.0
	label.align = Label.ALIGN_LEFT
	label.valign = Label.VALIGN_BOTTOM

	var dynamic_font = DynamicFont.new()
	dynamic_font.font_data = load("res://fonts/Lingo.ttf")
	dynamic_font.size = 36
	dynamic_font.outline_color = Color(0, 0, 0, 1)
	dynamic_font.outline_size = 2
	label.add_font_override("font", dynamic_font)

	add_child(label)


func showMessage(text):
	var label = self.get_node("label")
	if label.text.count("\n") >= 9:
		_message_queue.append(text)
		return

	if !label.text == "":
		label.text += "\n"
		label.text += text
		return

	label.text = text

	var timeout = 10.0
	while label.text != "":
		yield(get_tree().create_timer(timeout), "timeout")

		var newline = label.text.find("\n")
		if newline == -1:
			label.text = ""
		else:
			label.text = label.text.substr(newline + 1)

		if !_message_queue.empty():
			var next_msg = _message_queue.pop_front()
			label.text += "\n"
			label.text += next_msg

		if timeout > 4:
			timeout -= 3