Added shortcuts. Added dialog for winner. Started cleaning code.

This commit is contained in:
2023-09-11 21:20:48 +02:00
parent 724455b232
commit c5e6366760
5 changed files with 136 additions and 78 deletions

View File

@@ -13,17 +13,25 @@ var add_to_stats: bool = false
var use_low_played_mode: bool = false
var winning_score: int = 20
var version: String = "0.7.5-Beta"
var whats_new: String = "0.7.5-Beta: Added settings menu, most things don't do anythig yet
var version: String = "0.7.8-Beta"
var whats_new: String = "Changelog:
0.7.8-Beta: Added shortcuts. Added dialog for winner. Started cleaning code.
0.7.5-Beta: Added settings menu, most things don't do anythig yet
0.7-Beta: Can now hop between songs"
var whats_left: String = "Fix reset buttons
var whats_left: String = "Things left to do:
Fix reset buttons
Fix settings
Fix winner
Fix graphics in lists
Fix layout
Fix for local play
Change some buttons to icons
Add shortcuts"
Change some buttons to icons"
var shortcuts: String = "Shortcuts:
Alt + S = Search
Alt + A = Add Players
Alt + X = Play/Pause
Alt + C = Next Song
Alt + V = Show Answer"
#play = X
@@ -32,11 +40,21 @@ Add shortcuts"
#lägga till poäng? 1, 2, 3, 4, 5, 6
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func make_request2(address: String, func_name: Callable) -> void:
var error_handling = func(result, response_code, headers, body):
var json = JSON.new()
var error = json.parse(body.get_string_from_utf8())
if error == OK:
var data_received = json.get_data()
print("data_received: ", data_received)
func_name.call(data_received)
var http_request = HTTPRequest.new()
add_child(http_request)
http_request.request_completed.connect(error_handling)
# Perform a GET request. The URL below returns JSON as of writing.
var error = http_request.request(default_path + address)
if error != OK:
push_error("An error occurred in the HTTP request.")