demo-overridable-card
This commit is contained in:
39
growth/Card/base_bard.tscn
Normal file
39
growth/Card/base_bard.tscn
Normal file
@@ -0,0 +1,39 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dg8euc6mh055m"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c4x7n1r3ce1bc" path="res://Card/card.gd" id="1_yeifr"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_p5xmp"]
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_thmvr"]
|
||||
gradient = SubResource("Gradient_p5xmp")
|
||||
width = 104
|
||||
height = 71
|
||||
fill_to = Vector2(1, 1)
|
||||
|
||||
[node name="Card" type="AspectRatioContainer"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
size_flags_horizontal = 2
|
||||
size_flags_vertical = 2
|
||||
ratio = 0.714
|
||||
script = ExtResource("1_yeifr")
|
||||
|
||||
[node name="NinePatchRect" type="NinePatchRect" parent="."]
|
||||
layout_mode = 2
|
||||
texture = SubResource("GradientTexture2D_thmvr")
|
||||
region_rect = Rect2(10, 10, 76, 48)
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
text = "Isnt that nice?"
|
||||
fit_content = true
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="."]
|
||||
layout_mode = 2
|
||||
columns = 3
|
||||
9
growth/Card/card.gd
Normal file
9
growth/Card/card.gd
Normal file
@@ -0,0 +1,9 @@
|
||||
extends Control
|
||||
|
||||
@export var inner_script: GDScript
|
||||
|
||||
|
||||
func activate():
|
||||
var foo_instance = inner_script.new()
|
||||
foo_instance.a()
|
||||
|
||||
1
growth/Card/card.gd.uid
Normal file
1
growth/Card/card.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c4x7n1r3ce1bc
|
||||
5
growth/Card/card_inner.gd
Normal file
5
growth/Card/card_inner.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends AspectRatioContainer
|
||||
|
||||
func a():
|
||||
print("Test")
|
||||
pass
|
||||
1
growth/Card/card_inner.gd.uid
Normal file
1
growth/Card/card_inner.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://b1exu0m00vjaw
|
||||
17
growth/Card/test.tscn
Normal file
17
growth/Card/test.tscn
Normal file
@@ -0,0 +1,17 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://lqw1rkwsv8xt"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dg8euc6mh055m" path="res://Card/base_bard.tscn" id="1_7jxl2"]
|
||||
[ext_resource type="Script" uid="uid://b1exu0m00vjaw" path="res://Card/card_inner.gd" id="2_2q6qc"]
|
||||
|
||||
[sub_resource type="GDScript" id="GDScript_7jxl2"]
|
||||
script/source = "extends Node2D
|
||||
|
||||
func _ready():
|
||||
$Card.activate()
|
||||
"
|
||||
|
||||
[node name="Node2D" type="Node2D"]
|
||||
script = SubResource("GDScript_7jxl2")
|
||||
|
||||
[node name="Card" parent="." instance=ExtResource("1_7jxl2")]
|
||||
inner_script = ExtResource("2_2q6qc")
|
||||
1
growth/card.gd
Normal file
1
growth/card.gd
Normal file
@@ -0,0 +1 @@
|
||||
extends "res://Card/card.gd"
|
||||
1
growth/card.gd.uid
Normal file
1
growth/card.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dee7xa6183dwg
|
||||
Reference in New Issue
Block a user