ThE GREAT SHATTERINGgit status! control.tscn is DEAD! LoNG LIVE CONTROL.TSCNgit statusgit status! MWAHAHAHAHAHAHAHA

This commit is contained in:
Haze Weathers 2023-04-08 00:33:55 -04:00
parent 6c22279e41
commit c1a9ab7cdc
17 changed files with 253 additions and 270 deletions

29
autoloads/console.gd Normal file
View file

@ -0,0 +1,29 @@
extends CanvasLayer
export var opacity: float = 0.5
var lines: int = 0
onready var label: Label = $Label
func _ready() -> void:
label.visible = false
label.modulate.a = opacity
$Label/Panel.modulate.a = opacity
func _physics_process(delta: float) -> void:
if Input.is_action_just_pressed("debug_show"):
label.visible = not label.visible
func print(text) -> void:
lines += 1
if lines > 1:
label.text += "\n"
if lines > 10:
var n = label.text.find("\n")
var t = label.text
t.erase(0, n+1)
lines -= 1
label.text = t + str(text)
else:
label.text += str(text)