Browse Source

:wrench: Display custom messages in UI components

Use the keyword tool to make editable message visible in editor.
DricomDragon 3 years ago
parent
commit
018a164d36

+ 1 - 0
godot/component/ui/message_panel/MessagePanel.gd

@@ -1,3 +1,4 @@
+tool
 class_name MessagePanel
 extends Panel
 

+ 3 - 0
godot/component/ui/message_panel/MessagePanel.tscn

@@ -20,3 +20,6 @@ margin_bottom = 225.0
 text = "Your message here"
 align = 1
 valign = 1
+__meta__ = {
+"_edit_use_anchors_": false
+}

+ 1 - 0
godot/component/ui/number_panel/NumberPanel.gd

@@ -1,3 +1,4 @@
+tool
 class_name NumberPanel
 extends Panel
 

+ 2 - 2
godot/main.tscn

@@ -138,8 +138,8 @@ title = "Balls"
 [connection signal="body_entered" from="Catcher" to="Catcher" method="_on_Catcher_body_entered"]
 [connection signal="game_over" from="Catcher" to="UI" method="_on_Catcher_game_over"]
 [connection signal="gain_new_bullet" from="Launcher" to="UI/BallCounter" method="increase_counter"]
-[connection signal="get_firing" from="Launcher" to="Launcher" method="_on_Launcher_get_firing"]
 [connection signal="get_firing" from="Launcher" to="UI" method="_on_Launcher_get_firing"]
+[connection signal="get_firing" from="Launcher" to="Launcher" method="_on_Launcher_get_firing"]
 [connection signal="is_full" from="Launcher" to="Launcher/Grid" method="_on_Launcher_is_full"]
 [connection signal="move_visor" from="Launcher" to="Launcher/TargetLine" method="_on_Launcher_move_visor"]
 [connection signal="has_moved" from="Launcher/Grid" to="Launcher" method="_on_Grid_has_moved"]
@@ -148,5 +148,5 @@ title = "Balls"
 [connection signal="kace_damaged" from="Launcher/Grid" to="UI/ScoreCounter" method="increase_counter"]
 [connection signal="tween_all_completed" from="Launcher/Grid/MoveDown" to="Launcher/Grid" method="_on_MoveDown_tween_all_completed"]
 [connection signal="timeout" from="Launcher/ShootDelay" to="Launcher" method="_on_ShootDelay_timeout"]
-[connection signal="game_lost" from="Launcher/DeadLine" to="Launcher" method="_on_DeadLine_game_lost"]
 [connection signal="game_lost" from="Launcher/DeadLine" to="UI" method="_on_DeadLine_game_lost"]
+[connection signal="game_lost" from="Launcher/DeadLine" to="Launcher" method="_on_DeadLine_game_lost"]