diff options
author | Jonas Bernard <public.jbernard@web.de> | 2021-04-24 22:11:35 +0200 |
---|---|---|
committer | Jonas Bernard <public.jbernard@web.de> | 2021-04-24 22:11:35 +0200 |
commit | 3a22d5f9a6e539deb1fee5209af3557ae2b598fa (patch) | |
tree | 4a37961b37a37a36da211c47f0702e233f9cffd8 | |
parent | a6d55f5145d1aa05c4b05fc4e9f980643dfbeefd (diff) | |
download | ldjam48-3a22d5f9a6e539deb1fee5209af3557ae2b598fa.tar.gz ldjam48-3a22d5f9a6e539deb1fee5209af3557ae2b598fa.tar.bz2 ldjam48-3a22d5f9a6e539deb1fee5209af3557ae2b598fa.zip |
Push
-rw-r--r-- | components/HackButton.tscn | 12 | ||||
-rw-r--r-- | components/button.gd (renamed from components/buttontest.gd) | 0 | ||||
-rw-r--r-- | components/button.tscn (renamed from components/buttontest.tscn) | 20 | ||||
-rw-r--r-- | project.godot | 2 | ||||
-rw-r--r-- | scenes/menu.tscn | 6 |
5 files changed, 19 insertions, 21 deletions
diff --git a/components/HackButton.tscn b/components/HackButton.tscn index e3f61bb..2241ac6 100644 --- a/components/HackButton.tscn +++ b/components/HackButton.tscn @@ -4,12 +4,12 @@ [ext_resource path="res://components/HackButton.gd" type="Script" id=2] [sub_resource type="Shader" id=2] -code = "shader_type canvas_item; -uniform vec4 glow_color : hint_color = vec4(1,1,1,1); - -void fragment() { - COLOR = texture(TEXTURE, UV) + glow_color; -} +code = "shader_type canvas_item;
+uniform vec4 glow_color : hint_color = vec4(1,1,1,1);
+
+void fragment() {
+ COLOR = texture(TEXTURE, UV) + glow_color;
+}
" [sub_resource type="ShaderMaterial" id=3] diff --git a/components/buttontest.gd b/components/button.gd index 0303480..0303480 100644 --- a/components/buttontest.gd +++ b/components/button.gd diff --git a/components/buttontest.tscn b/components/button.tscn index d0d4e6b..9519475 100644 --- a/components/buttontest.tscn +++ b/components/button.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=8 format=2] [ext_resource path="res://textures/components/button/middle.png" type="Texture" id=1] [ext_resource path="res://textures/components/button/right.png" type="Texture" id=2] [ext_resource path="res://fonts/Fipps-Regular.otf" type="DynamicFontData" id=3] [ext_resource path="res://textures/components/button/left.png" type="Texture" id=4] +[ext_resource path="res://components/button.gd" type="Script" id=5] [sub_resource type="DynamicFont" id=1] outline_color = Color( 0, 0, 0, 1 ) @@ -12,7 +13,8 @@ font_data = ExtResource( 3 ) [sub_resource type="Theme" id=2] default_font = SubResource( 1 ) -[node name="Node2D" type="Node2D"] +[node name="ButtonTest" type="Node2D"] +script = ExtResource( 5 ) [node name="Left" type="Sprite" parent="."] position = Vector2( -100, 0 ) @@ -25,22 +27,18 @@ scale = Vector2( 4, 4 ) texture = ExtResource( 2 ) [node name="Middle" type="Sprite" parent="."] +position = Vector2( -0.5, 0 ) scale = Vector2( 30.321, 4 ) texture = ExtResource( 1 ) -[node name="RichTextLabel" type="RichTextLabel" parent="."] -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -margin_left = -31.9373 -margin_top = -19.027 -margin_right = 76.0627 -margin_bottom = 27.973 +[node name="FontSource" type="RichTextLabel" parent="."] grow_horizontal = 2 grow_vertical = 2 +rect_clip_content = false +size_flags_horizontal = 3 theme = SubResource( 2 ) text = "Menu" +scroll_active = false __meta__ = { "_edit_use_anchors_": false } diff --git a/project.godot b/project.godot index 7acd388..ffba327 100644 --- a/project.godot +++ b/project.godot @@ -12,7 +12,7 @@ _global_script_classes=[ { "base": "Node2D", "class": "ButtonTest", "language": "GDScript", -"path": "res://components/buttontest.gd" +"path": "res://components/button.gd" } ] _global_script_class_icons={ "ButtonTest": "" diff --git a/scenes/menu.tscn b/scenes/menu.tscn index 912ff99..b84a4f2 100644 --- a/scenes/menu.tscn +++ b/scenes/menu.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=3 format=2] [ext_resource path="res://components/Logo.tscn" type="PackedScene" id=1] -[ext_resource path="res://components/buttontest.tscn" type="PackedScene" id=2] +[ext_resource path="res://components/button.tscn" type="PackedScene" id=2] [node name="Node2D" type="Node2D"] @@ -9,5 +9,5 @@ position = Vector2( 144.311, 162.722 ) [node name="ButtonTest" parent="." instance=ExtResource( 2 )] -position = Vector2( 713.045, 367.228 ) -text = "Goodbye" +position = Vector2( 677.355, 443.519 ) +text = "Exit" |