#22: Now block add player if player name is empty
All checks were successful
Build / build (push) Successful in 1m21s
All checks were successful
Build / build (push) Successful in 1m21s
#23: Add a log for when points are given to players #25: Fixed some graphical stuff #26: Changed so the same character can be on a song multiple times #27: Turning off statistics after win
This commit is contained in:
29
log.gd
Normal file
29
log.gd
Normal file
@@ -0,0 +1,29 @@
|
||||
extends Control
|
||||
|
||||
@onready
|
||||
var log_panel: Panel = %LogPanel
|
||||
|
||||
@onready
|
||||
var log_box: VBoxContainer = %LogVBoxContainer
|
||||
|
||||
var log_rows: Array
|
||||
|
||||
func add_log_row(text: String) -> void:
|
||||
var log_row: String = get_time() + text
|
||||
log_rows.append(log_row)
|
||||
update_log()
|
||||
|
||||
func update_log() -> void:
|
||||
print("update_log")
|
||||
Settings.delete_children(log_box)
|
||||
for row: String in log_rows:
|
||||
var log_label: Label = Label.new()
|
||||
log_label.set_texture_filter(TextureFilter.TEXTURE_FILTER_NEAREST)
|
||||
log_label.add_theme_font_size_override("font_size", 20)
|
||||
log_label.text = row
|
||||
log_label.autowrap_mode = TextServer.AUTOWRAP_WORD
|
||||
log_box.add_child(log_label)
|
||||
|
||||
func get_time() -> String:
|
||||
var dateTime: Dictionary = Time.get_datetime_dict_from_system()
|
||||
return "" + str(dateTime.hour) + ":" + str(dateTime.minute) + ":" + str(dateTime.second) + " "
|
||||
Reference in New Issue
Block a user