GUI elements now respect render order + some minor distance comparison optimization
This commit is contained in:
@@ -157,6 +157,13 @@ namespace Barotrauma
|
||||
//new GUIImage(new Rectangle(-10, -5, 0, 0), character.AnimController.Limbs[0].sprite, Alignment.Left, frame);
|
||||
}
|
||||
|
||||
public void AddToGUIUpdateList()
|
||||
{
|
||||
guiFrame.AddToGUIUpdateList();
|
||||
if (commander.Frame != null) commander.Frame.AddToGUIUpdateList();
|
||||
if (crewFrameOpen) crewFrame.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
guiFrame.Update(deltaTime);
|
||||
|
||||
@@ -77,6 +77,8 @@ namespace Barotrauma
|
||||
|
||||
public virtual void MsgBox() { }
|
||||
|
||||
public virtual void AddToGUIUpdateList() { }
|
||||
|
||||
public virtual void Update(float deltaTime)
|
||||
{
|
||||
//if (!isRunning) return;
|
||||
|
||||
@@ -27,6 +27,11 @@ namespace Barotrauma
|
||||
|
||||
}
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
tutorialType.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
public override void Update(float deltaTime)
|
||||
{
|
||||
base.Update(deltaTime);
|
||||
|
||||
@@ -75,6 +75,11 @@ namespace Barotrauma.Tutorials
|
||||
CoroutineManager.StartCoroutine(UpdateState());
|
||||
}
|
||||
|
||||
public virtual void AddToGUIUpdateList()
|
||||
{
|
||||
if (infoBox != null) infoBox.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
public virtual void Update(float deltaTime)
|
||||
{
|
||||
if (character!=null)
|
||||
|
||||
@@ -360,6 +360,13 @@ namespace Barotrauma
|
||||
|
||||
}
|
||||
|
||||
public void AddToGUIUpdateList()
|
||||
{
|
||||
if (gameMode != null) gameMode.AddToGUIUpdateList();
|
||||
|
||||
if (infoFrame != null) infoButton.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
public void Update(float deltaTime)
|
||||
{
|
||||
TaskManager.Update(deltaTime);
|
||||
|
||||
Reference in New Issue
Block a user