Added TYPED_METHOD_BIND and c++17 flags to windows build and moved test project files

This commit is contained in:
Bastiaan Olij
2021-08-21 21:50:22 +10:00
parent f3dea4b752
commit df9164b9bd
10 changed files with 9 additions and 4 deletions

26
test/demo/main.gd Normal file
View File

@@ -0,0 +1,26 @@
extends Node
func _ready():
# Connect signals.
$Button.button_up.connect($Example.emit_custom_signal, ["Button", 42])
$Example.custom_signal.connect(on_signal)
# Call methods.
$Example.simple_func()
($Example as Example).simple_const_func() # Force use of ptrcall
prints("returned", $Example.return_something("some string"))
prints("returned const", $Example.return_something_const())
prints("vararg args", $Example.varargs_func("some", "arguments", "to", "test"))
# Use properties.
prints("custom postion is", $Example.custom_position)
$Example.custom_position = Vector2(50, 50)
prints("custom postion now is", $Example.custom_position)
# Get constants
prints("FIRST", $Example.FIRST)
prints("ANSWER_TO_EVERYTHING", $Example.ANSWER_TO_EVERYTHING)
prints("CONSTANT_WITHOUT_ENUM", $Example.CONSTANT_WITHOUT_ENUM)
func on_signal(name, value):
prints("Example emitted:", name, value)