Disable 'UPDATE' button when updating
This commit is contained in:
parent
64f41c2bb4
commit
d942277add
13
Main_menu.gd
13
Main_menu.gd
@ -84,6 +84,9 @@ func _download_request_completed(result, response_code, headers, body):
|
|||||||
# IF the os is "linux" based, use chmod to change the file to executable
|
# IF the os is "linux" based, use chmod to change the file to executable
|
||||||
if os_name == "linux":
|
if os_name == "linux":
|
||||||
OS.execute("chmod", ["+x", OS.get_config_dir()+"/UltraFlare/current/UltraFlare-"+os_name+"-x86_64"])
|
OS.execute("chmod", ["+x", OS.get_config_dir()+"/UltraFlare/current/UltraFlare-"+os_name+"-x86_64"])
|
||||||
|
|
||||||
|
# Enable (Un-disable?) the Play_button
|
||||||
|
$Panel/Play_button.disabled = false
|
||||||
|
|
||||||
# When the play button is pressed,
|
# When the play button is pressed,
|
||||||
func _on_Play_button_pressed():
|
func _on_Play_button_pressed():
|
||||||
@ -110,6 +113,16 @@ func _on_Play_button_pressed():
|
|||||||
|
|
||||||
# Send an HTTP request to the url
|
# Send an HTTP request to the url
|
||||||
var error = download.request(url)
|
var error = download.request(url)
|
||||||
|
|
||||||
|
# If the request was *created* successfully (Not neccessarily saying the server responded positively),
|
||||||
|
if error == OK:
|
||||||
|
# Disable the Play_button (So it can't be clicked multiple times)
|
||||||
|
$Panel/Play_button.disabled = true
|
||||||
|
# If not,
|
||||||
|
else:
|
||||||
|
# Debug message!
|
||||||
|
print("Failed to send HTTP request to server! Error: "+error)
|
||||||
|
|
||||||
# If not,
|
# If not,
|
||||||
# Play the game
|
# Play the game
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user