Skip to content

Commit

Permalink
debug text for investigating build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hankmorgan committed Apr 17, 2024
1 parent e50321f commit 3550817
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
14 changes: 7 additions & 7 deletions Underworld.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ shader = ExtResource("6_x6exc")

[node name="Underworld" type="Node3D"]

[node name="main" type="Node3D" parent="." node_paths=PackedStringArray("cam", "audioplayer", "lblPositionDebug", "secondarycameras")]
script = ExtResource("6_3y8oy")
cam = NodePath("../WorldViewContainer/SubViewport/Camera3D")
audioplayer = NodePath("../UI/AudioPlayer")
lblPositionDebug = NodePath("../UI/Common/PositionLabel")
secondarycameras = NodePath("../WorldViewContainer/SubViewport")

[node name="WorldViewContainer" type="SubViewportContainer" parent="."]
offset_left = 200.0
offset_top = 72.0
Expand Down Expand Up @@ -2723,13 +2730,6 @@ PowerGemUW2 = NodePath("../UW2/PowerGemUW2")

[node name="tilemap" type="Node3D" parent="."]

[node name="main" type="Node3D" parent="." node_paths=PackedStringArray("cam", "audioplayer", "lblPositionDebug", "secondarycameras")]
script = ExtResource("6_3y8oy")
cam = NodePath("../WorldViewContainer/SubViewport/Camera3D")
audioplayer = NodePath("../UI/AudioPlayer")
lblPositionDebug = NodePath("../UI/Common/PositionLabel")
secondarycameras = NodePath("../WorldViewContainer/SubViewport")

[connection signal="gui_input" from="UI/UW1/CompassUW1/CompassClickArea" to="UI/uiManager" method="_on_compass_click"]
[connection signal="gui_input" from="UI/UW1/ConversationUW1/PlayerTradeSelectedUW1_0" to="UI/uiManager" method="_on_player_trade_selected" binds= [0]]
[connection signal="gui_input" from="UI/UW1/ConversationUW1/PlayerTradeSelectedUW1_1" to="UI/uiManager" method="_on_player_trade_selected" binds= [1]]
Expand Down
9 changes: 9 additions & 0 deletions main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,16 @@ public static void StartGame()
{
if (gamecam==null)
{
if (instance.cam == null)
{
Debug.Print("Main Cam instance is null. trying to find it's node");
instance.cam = (Camera3D)instance.GetNode("WorldViewContainer/SubViewport/Camera3D");
}
gamecam = instance.cam;
if (gamecam==null)
{
Debug.Print("Gamecam is still null!");
}
}
gamecam.Fov = Math.Max(50, uwsettings.instance.FOV);
uimanager.EnableDisable(instance.lblPositionDebug,EnablePositionDebug);
Expand Down
11 changes: 11 additions & 0 deletions src/ui/uimanager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Godot;
using System.Diagnostics;


namespace Underworld
Expand All @@ -15,11 +16,21 @@ public partial class uimanager : Node2D

public override void _Ready()
{
Debug.Print("Uimanager about to set instance to this");
instance = this;
Debug.Print("Uimanager has set instance");
if (instance==null)
{
Debug.Print("Uimanager instance is null");
}
//uimanager.instance.mousecursor.Texture = uimanager.instance.cross;
//uimanager.EnableDisable(uimanager.instance.StartMenuPanel, true);
Debug.Print("Trying to load settings");
uimanager.instance.pathuw1.Text = uwsettings.instance.pathuw1;
Debug.Print(uwsettings.instance.pathuw1);
uimanager.instance.pathuw2.Text = uwsettings.instance.pathuw2;
Debug.Print(uwsettings.instance.pathuw2);
Debug.Print("Settings loaded");
}

public void InitUI()
Expand Down

0 comments on commit 3550817

Please sign in to comment.