Skip to content

Commit

Permalink
Add event for when the UI is finished opening
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraser Greenroyd committed Dec 2, 2022
1 parent 68e4690 commit 94ddc32
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions UI_Engine/Compute/LogUsage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ private static void TriggerUIOpening(TriggerLogUsageArgs e)
m_UIOpening.Invoke(null, e);
}

/*************************************/

private static void TriggerUIEndOpening()
{
if(m_UIEndOpening != null)
m_UIEndOpening.Invoke(null, null);
}

/*************************************/
/**** Static Fields ****/
/*************************************/
Expand All @@ -207,6 +215,7 @@ private static void TriggerUIOpening(TriggerLogUsageArgs e)
public static event EventHandler m_UsageLogTriggered;
public static event EventHandler m_UIClosed;
public static event EventHandler m_UIOpening;
public static event EventHandler m_UIEndOpening;

/*************************************/
}
Expand Down
3 changes: 3 additions & 0 deletions UI_Engine/Objects/DocumentLoading.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public static partial class Compute

public static void SetDocumentOpeningState(bool state)
{
if (m_documentOpening && !state)
TriggerUIEndOpening();

m_documentOpening = state;
}
}
Expand Down

0 comments on commit 94ddc32

Please sign in to comment.