Skip to content

Commit

Permalink
update ui when a slot unlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
deltanedas committed Feb 10, 2025
1 parent 85bcadc commit d022a2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Content.Client/_DV/Reputation/UI/ContractsWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public void UpdateState()
else
{
var empty = new EmptyContract(comp.Slots[i].NextUnlock);
empty.OnUnlock += UpdateState;
if (!empty.IsLocked)
slotsFull = false;
Contracts.AddChild(empty);
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/_DV/Reputation/UI/EmptyContract.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public sealed partial class EmptyContract : BoxContainer
{
[Dependency] private readonly IGameTiming _timing = default!;

public event Action? OnComplete;
public event Action? OnReject;
public event Action? OnUnlock;

private TimeSpan? _nextUnlock;
private TimeSpan _nextUpdate;
Expand Down Expand Up @@ -43,6 +42,7 @@ private void UpdateUnlock()
// unlocked now
_nextUnlock = null;
UnlockLabel.Visible = false;
OnUnlock?.Invoke();
return;
}

Expand Down

0 comments on commit d022a2e

Please sign in to comment.