Refactor UI components to inherit from Control and update node paths for consistency

This commit is contained in:
2025-08-26 16:20:01 +02:00
parent 1d4948e5b4
commit ca0d21e40a
84 changed files with 767 additions and 884 deletions

View File

@@ -4,7 +4,7 @@ using Mr.BrickAdventures.scripts.Resources;
namespace Mr.BrickAdventures.scripts.UI;
public partial class ChargeProgressBar : Node
public partial class ChargeProgressBar : ProgressBar
{
[Export] public ProgressBar ProgressBar { get; set; }
[Export] public BrickThrowComponent ThrowComponent { get; set; }
@@ -27,6 +27,11 @@ public partial class ChargeProgressBar : Node
private void SetupDependencies()
{
if (ThrowComponent == null || ProgressBar == null)
{
return;
}
if (ThrowComponent.ThrowInputBehavior is ChargeThrowInputResource throwInput)
{
_throwInput = throwInput;