Added TYPED_METHOD_BIND and c++17 flags to windows build and moved test project files
This commit is contained in:
7
test/demo/default_env.tres
Normal file
7
test/demo/default_env.tres
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_resource type="Environment" load_steps=2 format=3 uid="uid://dtd3q2x2ulcsi"]
|
||||
|
||||
[sub_resource type="Sky" id="1"]
|
||||
|
||||
[resource]
|
||||
background_mode = 2
|
||||
sky = SubResource( "1" )
|
||||
8
test/demo/example.gdextension
Normal file
8
test/demo/example.gdextension
Normal file
@@ -0,0 +1,8 @@
|
||||
[configuration]
|
||||
|
||||
entry_symbol = "example_library_init"
|
||||
|
||||
[libraries]
|
||||
|
||||
Linux.64 = "bin/x11/libgdexample.so"
|
||||
Windows.64 = "bin/win64/libgdexample.dll"
|
||||
BIN
test/demo/icon.png
Normal file
BIN
test/demo/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
35
test/demo/icon.png.import
Normal file
35
test/demo/icon.png.import
Normal file
@@ -0,0 +1,35 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture2D"
|
||||
uid="uid://cswr8vy4lt7dt"
|
||||
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://icon.png"
|
||||
dest_files=["res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
compress/streamed=false
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/HDR_as_SRGB=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
26
test/demo/main.gd
Normal file
26
test/demo/main.gd
Normal 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)
|
||||
29
test/demo/main.tscn
Normal file
29
test/demo/main.tscn
Normal file
@@ -0,0 +1,29 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dmx2xuigcpvt4"]
|
||||
|
||||
[ext_resource type="Script" path="res://main.gd" id="1_c326s"]
|
||||
|
||||
[node name="Node" type="Node"]
|
||||
script = ExtResource( "1_c326s" )
|
||||
|
||||
[node name="Example" type="Example" parent="."]
|
||||
script = null
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="Label" type="Label" parent="Example"]
|
||||
offset_left = 194.0
|
||||
offset_top = -2.0
|
||||
offset_right = 234.0
|
||||
offset_bottom = 21.0
|
||||
structured_text_bidi_override_options = []
|
||||
script = null
|
||||
|
||||
[node name="Button" type="Button" parent="."]
|
||||
offset_right = 79.0
|
||||
offset_bottom = 29.0
|
||||
text = "Click me!"
|
||||
script = null
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
23
test/demo/project.godot
Normal file
23
test/demo/project.godot
Normal file
@@ -0,0 +1,23 @@
|
||||
; Engine configuration file.
|
||||
; It's best edited using the editor UI and not directly,
|
||||
; since the parameters that go here are not all obvious.
|
||||
;
|
||||
; Format:
|
||||
; [section] ; section goes between []
|
||||
; param=value ; assign values to parameters
|
||||
|
||||
config_version=4
|
||||
|
||||
[application]
|
||||
|
||||
config/name="GDExtension Test Project"
|
||||
run/main_scene="res://main.tscn"
|
||||
config/icon="res://icon.png"
|
||||
|
||||
[native_extensions]
|
||||
|
||||
paths=["res://example.gdextension"]
|
||||
|
||||
[rendering]
|
||||
|
||||
environment/defaults/default_environment="res://default_env.tres"
|
||||
Reference in New Issue
Block a user