修复等于逻辑问题

pull/1/head
PJ568 10 months ago
parent 3345232cb8
commit 0e3cc9ad45

@ -19,6 +19,7 @@ func _ready():
for btn in Buttons.get_children():
if btn.name.is_valid_int():
btn.pressed.connect(Callable(self, "_number_buttons").bind(btn))
print(.text, , )
@warning_ignore("unused_parameter")
@ -91,6 +92,9 @@ func _on_clear_pressed():
= false
.text = ""
.text = "0"
= 0
= 0
= ""
= false
@ -191,7 +195,9 @@ func 等于():
= *
"/":
= /
.text = str() + + str() + "="
"":
=
.text = (str() + + str() + "=")
.text = str(snappedf(, 0.0000001))
= false
= false
@ -203,3 +209,11 @@ func _on_关于_pressed():
func _on__pressed():
get_tree().change_scene_to_file("res://设置.tscn")
func (str:String):
if str:
if str[0] == "0":
if str[1] == "0" or (str[1] != "." and str[1] != "="):
return (str.substr(1))
return str

Loading…
Cancel
Save