Browse Source

:tada: Make important slides always visible

DricomDragon 2 years ago
parent
commit
222ed1cfd1
3 changed files with 14 additions and 1 deletions
  1. 1 1
      godot/projector/show/Show.gd
  2. 9 0
      godot/projector/slide/Slide.gd
  3. 4 0
      godot/run/root.tscn

+ 1 - 1
godot/projector/show/Show.gd

@@ -49,7 +49,7 @@ func focus_slide(id: int) -> Slide:
 
 func hide_every_slide() -> void:
 	for slide in slides:
-		slide.set_visible(false)
+		slide.gently_hide()
 
 
 func _disconnect_current_slide():

+ 9 - 0
godot/projector/slide/Slide.gd

@@ -6,6 +6,8 @@ extends Node2D
 
 signal finished
 
+@export var always_visible: bool = false
+
 var center_offset: Vector2
 
 
@@ -27,6 +29,13 @@ func get_center():
 	return get_position() + center_offset
 
 
+func gently_hide() -> void:
+	if always_visible:
+		return
+
+	set_visible(false)
+
+
 func _unhandled_key_input(event: InputEvent):
 	if event.is_action("ui_accept") and event.is_pressed():
 		finished.emit()

+ 4 - 0
godot/run/root.tscn

@@ -99,6 +99,7 @@ scale = Vector2(10, 10)
 [node name="Me" parent="Board/Show" instance=ExtResource("4_uqvn6")]
 position = Vector2(1099, 1460)
 scale = Vector2(3, 3)
+always_visible = true
 
 [node name="Dev" parent="Board/Show" instance=ExtResource("6_cl7a1")]
 position = Vector2(1222, 2070)
@@ -132,6 +133,7 @@ position = Vector2(5689, 2376)
 [node name="Foundation" parent="Board/Show" instance=ExtResource("8_e1aig")]
 position = Vector2(10921, 1439)
 scale = Vector2(3, 3)
+always_visible = true
 
 [node name="GameEngineDef" parent="Board/Show" instance=ExtResource("16_8qr5i")]
 position = Vector2(9142, 1449)
@@ -178,6 +180,7 @@ scale = Vector2(0.3, 0.3)
 [node name="Graps" parent="Board/Show" instance=ExtResource("16_cwygl")]
 position = Vector2(825, 5675)
 scale = Vector2(3.125, 3.125)
+always_visible = true
 
 [node name="Features" parent="Board/Show" instance=ExtResource("18_w48m6")]
 position = Vector2(2945, 8082)
@@ -312,6 +315,7 @@ scale = Vector2(0.3, 0.3)
 [node name="Share" parent="Board/Show" instance=ExtResource("16_qlbv0")]
 position = Vector2(10554, 5303)
 scale = Vector2(4, 4)
+always_visible = true
 
 [node name="Discover" parent="Board/Show" instance=ExtResource("64_0qssy")]
 position = Vector2(9304, 7579)