From c8f674ac6fa0914d9e448d2929f2385cdad80d60 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Tue, 5 Nov 2024 11:34:49 +0100 Subject: next commit --- UI/Assets/Button_Green_9Slides_2.png | Bin 0 -> 4045 bytes UI/Assets/Button_Green_9Slides_2.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Button_Green_9Slides_2.png~ | Bin 0 -> 4041 bytes UI/Assets/Icons/door.png | Bin 0 -> 15149 bytes UI/Assets/Icons/door.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/gear.png | Bin 0 -> 15475 bytes UI/Assets/Icons/gear.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/key_e.png | Bin 0 -> 138 bytes UI/Assets/Icons/key_e.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/key_r.png | Bin 0 -> 144 bytes UI/Assets/Icons/key_r.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/tilemap_white.png | Bin 0 -> 10054 bytes UI/Assets/Icons/tilemap_white.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/wrench.png | Bin 0 -> 15327 bytes UI/Assets/Icons/wrench.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/zoom.png | Bin 0 -> 15329 bytes UI/Assets/Icons/zoom.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/zoomDefault.png | Bin 0 -> 15343 bytes UI/Assets/Icons/zoomDefault.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/zoomIn.png | Bin 0 -> 15343 bytes UI/Assets/Icons/zoomIn.png.import | 34 ++++++++++++++++++++++++++++ UI/Assets/Icons/zoomOut.png | Bin 0 -> 15339 bytes UI/Assets/Icons/zoomOut.png.import | 34 ++++++++++++++++++++++++++++ UI/Camera.gd | 1 + UI/SpawnButton.tscn | 4 +++- UI/spawn_button.gd | 4 ++++ 26 files changed, 382 insertions(+), 1 deletion(-) create mode 100644 UI/Assets/Button_Green_9Slides_2.png create mode 100644 UI/Assets/Button_Green_9Slides_2.png.import create mode 100644 UI/Assets/Button_Green_9Slides_2.png~ create mode 100644 UI/Assets/Icons/door.png create mode 100644 UI/Assets/Icons/door.png.import create mode 100644 UI/Assets/Icons/gear.png create mode 100644 UI/Assets/Icons/gear.png.import create mode 100644 UI/Assets/Icons/key_e.png create mode 100644 UI/Assets/Icons/key_e.png.import create mode 100644 UI/Assets/Icons/key_r.png create mode 100644 UI/Assets/Icons/key_r.png.import create mode 100644 UI/Assets/Icons/tilemap_white.png create mode 100644 UI/Assets/Icons/tilemap_white.png.import create mode 100644 UI/Assets/Icons/wrench.png create mode 100644 UI/Assets/Icons/wrench.png.import create mode 100644 UI/Assets/Icons/zoom.png create mode 100644 UI/Assets/Icons/zoom.png.import create mode 100644 UI/Assets/Icons/zoomDefault.png create mode 100644 UI/Assets/Icons/zoomDefault.png.import create mode 100644 UI/Assets/Icons/zoomIn.png create mode 100644 UI/Assets/Icons/zoomIn.png.import create mode 100644 UI/Assets/Icons/zoomOut.png create mode 100644 UI/Assets/Icons/zoomOut.png.import (limited to 'UI') diff --git a/UI/Assets/Button_Green_9Slides_2.png b/UI/Assets/Button_Green_9Slides_2.png new file mode 100644 index 0000000..f868263 Binary files /dev/null and b/UI/Assets/Button_Green_9Slides_2.png differ diff --git a/UI/Assets/Button_Green_9Slides_2.png.import b/UI/Assets/Button_Green_9Slides_2.png.import new file mode 100644 index 0000000..09dec97 --- /dev/null +++ b/UI/Assets/Button_Green_9Slides_2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bxq68idyeo6gm" +path="res://.godot/imported/Button_Green_9Slides_2.png-0c6d25552d85d31722e4048e9330a7de.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Button_Green_9Slides_2.png" +dest_files=["res://.godot/imported/Button_Green_9Slides_2.png-0c6d25552d85d31722e4048e9330a7de.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/UI/Assets/Button_Green_9Slides_2.png~ b/UI/Assets/Button_Green_9Slides_2.png~ new file mode 100644 index 0000000..15988a8 Binary files /dev/null and b/UI/Assets/Button_Green_9Slides_2.png~ differ diff --git a/UI/Assets/Icons/door.png b/UI/Assets/Icons/door.png new file mode 100644 index 0000000..1e53791 Binary files /dev/null and b/UI/Assets/Icons/door.png differ diff --git a/UI/Assets/Icons/door.png.import b/UI/Assets/Icons/door.png.import new file mode 100644 index 0000000..948a028 --- /dev/null +++ b/UI/Assets/Icons/door.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dau8u0yw83a6d" +path="res://.godot/imported/door.png-d01668e5bca7e3b2040489f10796ca61.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/door.png" +dest_files=["res://.godot/imported/door.png-d01668e5bca7e3b2040489f10796ca61.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/UI/Assets/Icons/gear.png b/UI/Assets/Icons/gear.png new file mode 100644 index 0000000..9663f90 Binary files /dev/null and b/UI/Assets/Icons/gear.png differ diff --git a/UI/Assets/Icons/gear.png.import b/UI/Assets/Icons/gear.png.import new file mode 100644 index 0000000..62b625d --- /dev/null +++ b/UI/Assets/Icons/gear.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://vq0n0i5f4mtu" +path="res://.godot/imported/gear.png-c798bd00e97013cd349c08351e8e9365.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/gear.png" +dest_files=["res://.godot/imported/gear.png-c798bd00e97013cd349c08351e8e9365.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/UI/Assets/Icons/key_e.png b/UI/Assets/Icons/key_e.png new file mode 100644 index 0000000..2e51475 Binary files /dev/null and b/UI/Assets/Icons/key_e.png differ diff --git a/UI/Assets/Icons/key_e.png.import b/UI/Assets/Icons/key_e.png.import new file mode 100644 index 0000000..1a30062 --- /dev/null +++ b/UI/Assets/Icons/key_e.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c7ntdvxvv16io" +path="res://.godot/imported/key_e.png-3f73f20da5b7e38c120d6e64781b17b1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/key_e.png" +dest_files=["res://.godot/imported/key_e.png-3f73f20da5b7e38c120d6e64781b17b1.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/UI/Assets/Icons/key_r.png b/UI/Assets/Icons/key_r.png new file mode 100644 index 0000000..22d4284 Binary files /dev/null and b/UI/Assets/Icons/key_r.png differ diff --git a/UI/Assets/Icons/key_r.png.import b/UI/Assets/Icons/key_r.png.import new file mode 100644 index 0000000..9aabdbe --- /dev/null +++ b/UI/Assets/Icons/key_r.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://hljlcokgys6y" +path="res://.godot/imported/key_r.png-04ae5649a9112c98b95dbfa6c859ad7e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/key_r.png" +dest_files=["res://.godot/imported/key_r.png-04ae5649a9112c98b95dbfa6c859ad7e.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/UI/Assets/Icons/tilemap_white.png b/UI/Assets/Icons/tilemap_white.png new file mode 100644 index 0000000..207208e Binary files /dev/null and b/UI/Assets/Icons/tilemap_white.png differ diff --git a/UI/Assets/Icons/tilemap_white.png.import b/UI/Assets/Icons/tilemap_white.png.import new file mode 100644 index 0000000..7c86ea5 --- /dev/null +++ b/UI/Assets/Icons/tilemap_white.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dlg78heamuf5g" +path="res://.godot/imported/tilemap_white.png-de35b5c1d117311fa91d8ce605d3b526.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/tilemap_white.png" +dest_files=["res://.godot/imported/tilemap_white.png-de35b5c1d117311fa91d8ce605d3b526.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/UI/Assets/Icons/wrench.png b/UI/Assets/Icons/wrench.png new file mode 100644 index 0000000..fd16f6b Binary files /dev/null and b/UI/Assets/Icons/wrench.png differ diff --git a/UI/Assets/Icons/wrench.png.import b/UI/Assets/Icons/wrench.png.import new file mode 100644 index 0000000..1a69093 --- /dev/null +++ b/UI/Assets/Icons/wrench.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://8nwosf1t03m7" +path="res://.godot/imported/wrench.png-fe966896040bfe3dc92030166a6eaded.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/wrench.png" +dest_files=["res://.godot/imported/wrench.png-fe966896040bfe3dc92030166a6eaded.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/UI/Assets/Icons/zoom.png b/UI/Assets/Icons/zoom.png new file mode 100644 index 0000000..f8c60c8 Binary files /dev/null and b/UI/Assets/Icons/zoom.png differ diff --git a/UI/Assets/Icons/zoom.png.import b/UI/Assets/Icons/zoom.png.import new file mode 100644 index 0000000..0bea4e7 --- /dev/null +++ b/UI/Assets/Icons/zoom.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cdmyw6ucmvq5a" +path="res://.godot/imported/zoom.png-b6b534437d120155424c2f14ae6889dd.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/zoom.png" +dest_files=["res://.godot/imported/zoom.png-b6b534437d120155424c2f14ae6889dd.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/UI/Assets/Icons/zoomDefault.png b/UI/Assets/Icons/zoomDefault.png new file mode 100644 index 0000000..a18677f Binary files /dev/null and b/UI/Assets/Icons/zoomDefault.png differ diff --git a/UI/Assets/Icons/zoomDefault.png.import b/UI/Assets/Icons/zoomDefault.png.import new file mode 100644 index 0000000..f2ab962 --- /dev/null +++ b/UI/Assets/Icons/zoomDefault.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://ciojbjh3mpiag" +path="res://.godot/imported/zoomDefault.png-46c2e4a2ad3f0c644da1df7dc02ba10b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/zoomDefault.png" +dest_files=["res://.godot/imported/zoomDefault.png-46c2e4a2ad3f0c644da1df7dc02ba10b.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/UI/Assets/Icons/zoomIn.png b/UI/Assets/Icons/zoomIn.png new file mode 100644 index 0000000..70fff49 Binary files /dev/null and b/UI/Assets/Icons/zoomIn.png differ diff --git a/UI/Assets/Icons/zoomIn.png.import b/UI/Assets/Icons/zoomIn.png.import new file mode 100644 index 0000000..d48aa93 --- /dev/null +++ b/UI/Assets/Icons/zoomIn.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvv4vc5rot73y" +path="res://.godot/imported/zoomIn.png-c12836e7f94e61943d43536e9760f5ba.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/zoomIn.png" +dest_files=["res://.godot/imported/zoomIn.png-c12836e7f94e61943d43536e9760f5ba.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/UI/Assets/Icons/zoomOut.png b/UI/Assets/Icons/zoomOut.png new file mode 100644 index 0000000..7f20ad2 Binary files /dev/null and b/UI/Assets/Icons/zoomOut.png differ diff --git a/UI/Assets/Icons/zoomOut.png.import b/UI/Assets/Icons/zoomOut.png.import new file mode 100644 index 0000000..d019796 --- /dev/null +++ b/UI/Assets/Icons/zoomOut.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dwed1e2bvyixn" +path="res://.godot/imported/zoomOut.png-dd8aed3aac684833472c5de1a557d9af.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://UI/Assets/Icons/zoomOut.png" +dest_files=["res://.godot/imported/zoomOut.png-dd8aed3aac684833472c5de1a557d9af.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/UI/Camera.gd b/UI/Camera.gd index e10c371..1fd9361 100644 --- a/UI/Camera.gd +++ b/UI/Camera.gd @@ -48,6 +48,7 @@ func _input(event): zoom = Vector2(new_zoom, new_zoom) global_position += previous_mouse_position - get_global_mouse_position() zoomed.emit(zoom) + if event.is_action("camera_zoom_in"): var previous_mouse_position := get_global_mouse_position() var new_zoom = min(zoom.x + zoom_step, zoom_max) diff --git a/UI/SpawnButton.tscn b/UI/SpawnButton.tscn index 7b3450b..a5954a0 100644 --- a/UI/SpawnButton.tscn +++ b/UI/SpawnButton.tscn @@ -3,12 +3,14 @@ [ext_resource type="Script" path="res://UI/spawn_button.gd" id="1_ayei4"] [node name="SpawnButton" type="TextureButton"] +texture_filter = 1 custom_minimum_size = Vector2(32, 32) offset_left = 2.0 offset_top = 2.0 offset_right = 38.0 offset_bottom = 38.0 -stretch_mode = 3 +mouse_default_cursor_shape = 2 +stretch_mode = 5 script = ExtResource("1_ayei4") [connection signal="pressed" from="." to="." method="_on_pressed"] diff --git a/UI/spawn_button.gd b/UI/spawn_button.gd index ba67e37..a773406 100644 --- a/UI/spawn_button.gd +++ b/UI/spawn_button.gd @@ -2,6 +2,7 @@ extends TextureButton @export var texture: Texture2D +@export var sprite_sheet: SpriteFrames func _on_pressed() -> void: @@ -11,4 +12,7 @@ func _on_pressed() -> void: unit.get_node("Sprite2D").texture = texture unit.get_node("Sprite2D").scale = Vector2(32,32) / texture.get_size() + if sprite_sheet: + unit.get_node("AnimatedSprite2D").sprite_frames = sprite_sheet + Client.spawn_unit(unit, Client.current_stage.get_spawn(), Client.current_stage.get_overwrite_target()) -- cgit v1.2.3