From 90cfe87ae84263f56936b68078fd1276986d1109 Mon Sep 17 00:00:00 2001 From: Nitwel Date: Thu, 18 Apr 2024 12:10:20 +0200 Subject: [PATCH] improve mini view selection --- app/content/system/armband/armband.gd | 15 --------------- app/content/system/armband/armband.tscn | 23 ----------------------- app/content/system/dot/dot.gd | 4 ++-- app/content/system/house/mini/Entity.gd | 3 +++ app/export_presets.cfg | 4 +++- 5 files changed, 8 insertions(+), 41 deletions(-) delete mode 100644 app/content/system/armband/armband.gd delete mode 100644 app/content/system/armband/armband.tscn diff --git a/app/content/system/armband/armband.gd b/app/content/system/armband/armband.gd deleted file mode 100644 index c9db1a0..0000000 --- a/app/content/system/armband/armband.gd +++ /dev/null @@ -1,15 +0,0 @@ -extends Node3D - -@onready var menu_button = $Menu -@onready var mini_button = $Mini -@onready var clock = $Clock -@onready var main = $"/root/Main" - -func _ready(): - menu_button.on_button_down.connect(func(): - main.toggle_menu() - ) - - mini_button.on_button_down.connect(func(): - House.body.mini_view = !House.body.mini_view - ) diff --git a/app/content/system/armband/armband.tscn b/app/content/system/armband/armband.tscn deleted file mode 100644 index fa24fd9..0000000 --- a/app/content/system/armband/armband.tscn +++ /dev/null @@ -1,23 +0,0 @@ -[gd_scene load_steps=3 format=3 uid="uid://bexxngoxcegul"] - -[ext_resource type="Script" path="res://content/system/armband/armband.gd" id="1_4tskg"] -[ext_resource type="PackedScene" uid="uid://bsjqdvkt0u87c" path="res://content/ui/components/button/button.tscn" id="1_egcvm"] - -[node name="Armband" type="Node3D"] -transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0, 0) -script = ExtResource("1_4tskg") - -[node name="Menu" parent="." instance=ExtResource("1_egcvm")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.04, 0, 0.04) -label = "menu" -icon = true - -[node name="Mini" parent="." instance=ExtResource("1_egcvm")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.02, 0, 0.04) -label = "view_comfy" -icon = true - -[node name="Clock" type="Label3D" parent="."] -transform = Transform3D(1, 4.37114e-08, 4.37114e-08, -4.37114e-08, -4.37114e-08, 1, 4.37114e-08, -1, -4.37114e-08, 0, 0.02, -0.02) -pixel_size = 0.001 -text = "10:00" diff --git a/app/content/system/dot/dot.gd b/app/content/system/dot/dot.gd index faded69..548fd14 100644 --- a/app/content/system/dot/dot.gd +++ b/app/content/system/dot/dot.gd @@ -34,7 +34,7 @@ func _ready(): ) func _on_click(_event: EventPointer): - if entity.has_method("quick_action"): + if entity.has_method("quick_action")&&miniature.entity_select.selection_active() == false: entity.quick_action() else: miniature.entity_select.toggle(entity) @@ -61,7 +61,7 @@ func _on_touch_move(_event: EventTouch): func _on_touch_leave(_event: EventTouch): if touch_ran: return - if entity.has_method("quick_action"): + if entity.has_method("quick_action")&&miniature.entity_select.selection_active() == false: entity.quick_action() else: miniature.entity_select.toggle(entity) \ No newline at end of file diff --git a/app/content/system/house/mini/Entity.gd b/app/content/system/house/mini/Entity.gd index 1629924..67ee467 100644 --- a/app/content/system/house/mini/Entity.gd +++ b/app/content/system/house/mini/Entity.gd @@ -58,6 +58,9 @@ func _ready(): dots.add_child(dot) ) +func selection_active(): + return editing.value.size() > 0 + func toggle(entity: Entity): if active_type == null: active_type = entity.entity_id.split(".")[0] diff --git a/app/export_presets.cfg b/app/export_presets.cfg index 7ae243a..e4b6cb7 100644 --- a/app/export_presets.cfg +++ b/app/export_presets.cfg @@ -134,6 +134,7 @@ permissions/mount_format_filesystems=false permissions/mount_unmount_filesystems=false permissions/nfc=false permissions/persistent_activity=false +permissions/post_notifications=false permissions/process_outgoing_calls=false permissions/read_calendar=false permissions/read_call_log=false @@ -244,7 +245,7 @@ custom_template/release="" gradle_build/use_gradle_build=true gradle_build/export_format=0 gradle_build/min_sdk="" -gradle_build/target_sdk="32" +gradle_build/target_sdk="" architectures/armeabi-v7a=false architectures/arm64-v8a=true architectures/x86=false @@ -357,6 +358,7 @@ permissions/mount_format_filesystems=false permissions/mount_unmount_filesystems=false permissions/nfc=false permissions/persistent_activity=false +permissions/post_notifications=false permissions/process_outgoing_calls=false permissions/read_calendar=false permissions/read_call_log=false