From aacf95aab9f2bec6c9f8676960122bcfa440bb9f Mon Sep 17 00:00:00 2001 From: jacob janzen <53062115+JacobJanzen@users.noreply.github.com> Date: Sat, 16 Nov 2024 14:16:06 -0600 Subject: add clippy (#3) --- .../LDPA_angy.png | Bin 0 -> 23767 bytes .../LDPA_angy.png.import | 34 ++++++++++ .../LDPA_hapi.png | Bin 0 -> 23133 bytes .../LDPA_hapi.png.import | 34 ++++++++++ .../LDPA_normal.png | Bin 0 -> 22023 bytes .../LDPA_normal.png.import | 34 ++++++++++ .../LegallyDistinctPaperclipAssistant/area_2d.gd | 19 ++++++ .../LegallyDistinctPaperclipAssistant/paperclip.gd | 51 ++++++++++++++ .../LegallyDistinctPaperclipAssistant/window.tscn | 73 +++++++++++++++++++++ 9 files changed, 245 insertions(+) create mode 100644 scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png create mode 100644 scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png.import create mode 100644 scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png create mode 100644 scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png.import create mode 100644 scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png create mode 100644 scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png.import create mode 100644 scenes/LegallyDistinctPaperclipAssistant/area_2d.gd create mode 100644 scenes/LegallyDistinctPaperclipAssistant/paperclip.gd create mode 100644 scenes/LegallyDistinctPaperclipAssistant/window.tscn (limited to 'scenes/LegallyDistinctPaperclipAssistant') diff --git a/scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png b/scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png new file mode 100644 index 0000000..8993315 Binary files /dev/null and b/scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png differ diff --git a/scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png.import b/scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png.import new file mode 100644 index 0000000..77f9854 --- /dev/null +++ b/scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://b1t8f4nb5aahv" +path="res://.godot/imported/LDPA_angy.png-c258f1b99cb15873df1104046cf934d8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png" +dest_files=["res://.godot/imported/LDPA_angy.png-c258f1b99cb15873df1104046cf934d8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +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/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png b/scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png new file mode 100644 index 0000000..3b5d8f0 Binary files /dev/null and b/scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png differ diff --git a/scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png.import b/scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png.import new file mode 100644 index 0000000..0bc2ee4 --- /dev/null +++ b/scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bdwx62dyof0fb" +path="res://.godot/imported/LDPA_hapi.png-d80bfa5f344e7ec540376630d03e2eae.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png" +dest_files=["res://.godot/imported/LDPA_hapi.png-d80bfa5f344e7ec540376630d03e2eae.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +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/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png b/scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png new file mode 100644 index 0000000..b634dba Binary files /dev/null and b/scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png differ diff --git a/scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png.import b/scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png.import new file mode 100644 index 0000000..fdcdc67 --- /dev/null +++ b/scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bv0ecc0g1i45s" +path="res://.godot/imported/LDPA_normal.png-9d45aca70a23009053b14bf55b2b995f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png" +dest_files=["res://.godot/imported/LDPA_normal.png-9d45aca70a23009053b14bf55b2b995f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +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/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/scenes/LegallyDistinctPaperclipAssistant/area_2d.gd b/scenes/LegallyDistinctPaperclipAssistant/area_2d.gd new file mode 100644 index 0000000..7c060f6 --- /dev/null +++ b/scenes/LegallyDistinctPaperclipAssistant/area_2d.gd @@ -0,0 +1,19 @@ +extends Area2D + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + + +func _on_input_event(viewport: Node, event: InputEvent, shape_idx: int) -> void: + print("hi") + + +func _on_mouse_entered() -> void: + print('test') diff --git a/scenes/LegallyDistinctPaperclipAssistant/paperclip.gd b/scenes/LegallyDistinctPaperclipAssistant/paperclip.gd new file mode 100644 index 0000000..d431372 --- /dev/null +++ b/scenes/LegallyDistinctPaperclipAssistant/paperclip.gd @@ -0,0 +1,51 @@ +extends Window + +const START_TEXT = "Hi, I'm your legally\ndistinct paperclip\nassistant,\nClippette..." +const TOUCHED = "Don't touch me!" + +var angy: Sprite2D +var normal: Sprite2D +var hapi: Sprite2D +var label: Label +var timer: Timer +var panel: Panel + +var current_text = START_TEXT + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + angy = $Angy + hapi = $Hapi + normal = $Normal + label = $Label + timer = $Timer + panel = $Panel + + normal.visible = true; + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(_delta: float) -> void: + if current_text == "": + label.visible = false + panel.visible = false + else: + label.text = "" # I hate this, but it does fix a bug + label.text = current_text + label.visible = true + panel.visible = true + + +func _on_texture_button_button_up() -> void: + normal.visible = false + hapi.visible = false + angy.visible = true + current_text = TOUCHED + timer.start() + +func _on_timer_timeout() -> void: + normal.visible = true + hapi.visible = false + angy.visible = false + current_text = "" + timer.stop() diff --git a/scenes/LegallyDistinctPaperclipAssistant/window.tscn b/scenes/LegallyDistinctPaperclipAssistant/window.tscn new file mode 100644 index 0000000..cfea78b --- /dev/null +++ b/scenes/LegallyDistinctPaperclipAssistant/window.tscn @@ -0,0 +1,73 @@ +[gd_scene load_steps=7 format=3 uid="uid://bbg7lnak6kup7"] + +[ext_resource type="Texture2D" uid="uid://b1t8f4nb5aahv" path="res://scenes/LegallyDistinctPaperclipAssistant/LDPA_angy.png" id="1_bqw21"] +[ext_resource type="Script" path="res://scenes/LegallyDistinctPaperclipAssistant/paperclip.gd" id="1_mbnc6"] +[ext_resource type="Texture2D" uid="uid://bdwx62dyof0fb" path="res://scenes/LegallyDistinctPaperclipAssistant/LDPA_hapi.png" id="2_stani"] +[ext_resource type="Texture2D" uid="uid://bv0ecc0g1i45s" path="res://scenes/LegallyDistinctPaperclipAssistant/LDPA_normal.png" id="3_dw2nh"] +[ext_resource type="Theme" uid="uid://ve18rbkeiwti" path="res://UI/text.tres" id="5_8ck3a"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_a5dhw"] +bg_color = Color(0.980392, 0.980392, 0.8, 1) +border_width_left = 5 +border_width_top = 5 +border_width_right = 5 +border_width_bottom = 5 +border_color = Color(0, 0, 0, 1) +corner_radius_top_left = 20 +corner_radius_top_right = 20 +corner_radius_bottom_right = 20 +corner_radius_bottom_left = 20 + +[node name="Window" type="Window"] +transparent_bg = true +position = Vector2i(0, 36) +size = Vector2i(1000, 600) +unresizable = true +borderless = true +transparent = true +script = ExtResource("1_mbnc6") + +[node name="Panel" type="Panel" parent="."] +custom_minimum_size = Vector2(600, 200) +offset_left = 400.0 +offset_right = 1000.0 +offset_bottom = 200.0 +mouse_filter = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_a5dhw") + +[node name="Label" type="Label" parent="."] +offset_left = 420.0 +offset_top = 15.0 +offset_right = 1491.0 +offset_bottom = 99.0 +theme = ExtResource("5_8ck3a") +theme_override_font_sizes/font_size = 25 +text = "Hi, I'm your legally +distinct paperclip +assistant, Clippette..." + +[node name="Angy" type="Sprite2D" parent="."] +visible = false +position = Vector2(250, 350) +texture = ExtResource("1_bqw21") + +[node name="Hapi" type="Sprite2D" parent="."] +visible = false +position = Vector2(250, 350) +texture = ExtResource("2_stani") + +[node name="Normal" type="Sprite2D" parent="."] +position = Vector2(250, 350) +texture = ExtResource("3_dw2nh") + +[node name="Paperclips" type="Node2D" parent="."] + +[node name="TextureButton" type="TextureButton" parent="."] +offset_right = 1000.0 +offset_bottom = 600.0 + +[node name="Timer" type="Timer" parent="."] +wait_time = 0.25 + +[connection signal="button_up" from="TextureButton" to="." method="_on_texture_button_button_up"] +[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"] -- cgit v1.2.3