Merge branch 'master' of https://gitlab.com/poe.regalis/barotrauma
This commit is contained in:
@@ -250,8 +250,8 @@ namespace Barotrauma
|
||||
public override void Select()
|
||||
{
|
||||
base.Select();
|
||||
|
||||
GUIComponent.MouseOn = null;
|
||||
|
||||
GUIComponent.ForceMouseOn(null);
|
||||
characterMode = false;
|
||||
|
||||
if (Submarine.MainSub != null)
|
||||
@@ -278,7 +278,7 @@ namespace Barotrauma
|
||||
{
|
||||
base.Deselect();
|
||||
|
||||
GUIComponent.MouseOn = null;
|
||||
GUIComponent.ForceMouseOn(null);
|
||||
|
||||
MapEntityPrefab.Selected = null;
|
||||
|
||||
@@ -768,7 +768,7 @@ namespace Barotrauma
|
||||
|
||||
MapEntityPrefab.SelectPrefab(obj);
|
||||
selectedTab = -1;
|
||||
GUIComponent.MouseOn = null;
|
||||
GUIComponent.ForceMouseOn(null);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -803,6 +803,43 @@ namespace Barotrauma
|
||||
previouslyUsedList.children.Insert(0, textBlock);
|
||||
}
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
if (tutorial != null) tutorial.AddToGUIUpdateList();
|
||||
|
||||
if (MapEntity.SelectedList.Count == 1)
|
||||
{
|
||||
MapEntity.SelectedList[0].AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
leftPanel.AddToGUIUpdateList();
|
||||
topPanel.AddToGUIUpdateList();
|
||||
|
||||
if (wiringMode)
|
||||
{
|
||||
wiringToolPanel.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
if (loadFrame != null)
|
||||
{
|
||||
loadFrame.AddToGUIUpdateList();
|
||||
}
|
||||
else if (saveFrame != null)
|
||||
{
|
||||
saveFrame.AddToGUIUpdateList();
|
||||
}
|
||||
else if (selectedTab > -1)
|
||||
{
|
||||
GUItabs[selectedTab].AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
if ((characterMode || wiringMode) && dummyCharacter != null)
|
||||
{
|
||||
CharacterHUD.AddToGUIUpdateList(dummyCharacter);
|
||||
}
|
||||
|
||||
GUI.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows the game to run logic such as updating the world,
|
||||
@@ -851,16 +888,15 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
MapEntity.UpdateSelecting(cam);
|
||||
}
|
||||
|
||||
GUIComponent.MouseOn = null;
|
||||
//GUIComponent.ForceMouseOn(null);
|
||||
|
||||
if (!characterMode && !wiringMode)
|
||||
{
|
||||
if (MapEntityPrefab.Selected != null) MapEntityPrefab.Selected.UpdatePlacing(cam);
|
||||
|
||||
|
||||
MapEntity.UpdateEditor(cam);
|
||||
}
|
||||
|
||||
|
||||
@@ -88,7 +88,21 @@ namespace Barotrauma
|
||||
|
||||
Sounds.SoundManager.LowPassHFGain = 1.0f;
|
||||
}
|
||||
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
if (GameMain.GameSession != null) GameMain.GameSession.AddToGUIUpdateList();
|
||||
|
||||
if (Character.Controlled != null && Character.Controlled.SelectedConstruction != null)
|
||||
{
|
||||
if (Character.Controlled.SelectedConstruction == Character.Controlled.ClosestItem)
|
||||
{
|
||||
Character.Controlled.SelectedConstruction.AddToGUIUpdateList();
|
||||
}
|
||||
}
|
||||
Character.AddAllToGUIUpdateList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows the game to run logic such as updating the world,
|
||||
/// checking for collisions, gathering input, and playing audio.
|
||||
@@ -132,7 +146,7 @@ namespace Barotrauma
|
||||
}
|
||||
}
|
||||
Character.UpdateAll(cam, (float)deltaTime);
|
||||
|
||||
|
||||
BackgroundCreatureManager.Update(cam, (float)deltaTime);
|
||||
|
||||
GameMain.ParticleManager.Update((float)deltaTime);
|
||||
|
||||
@@ -341,6 +341,14 @@ namespace Barotrauma
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
base.AddToGUIUpdateList();
|
||||
|
||||
topPanel.AddToGUIUpdateList();
|
||||
bottomPanel[selectedRightPanel].AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
public override void Update(double deltaTime)
|
||||
{
|
||||
base.Update(deltaTime);
|
||||
|
||||
@@ -467,6 +467,12 @@ namespace Barotrauma
|
||||
menuTabs[(int)Tab.LoadGame].RemoveChild(prevFrame);
|
||||
}
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
buttonsTab.AddToGUIUpdateList();
|
||||
if (selectedTab > 0) menuTabs[selectedTab].AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
public override void Update(double deltaTime)
|
||||
{
|
||||
buttonsTab.Update((float)deltaTime);
|
||||
|
||||
@@ -921,6 +921,24 @@ namespace Barotrauma
|
||||
playerList.ClearChildren();
|
||||
}
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
base.AddToGUIUpdateList();
|
||||
|
||||
if (jobInfoFrame != null)
|
||||
{
|
||||
jobInfoFrame.AddToGUIUpdateList();
|
||||
}
|
||||
else if (playerFrame != null)
|
||||
{
|
||||
playerFrame.AddToGUIUpdateList();
|
||||
}
|
||||
else
|
||||
{
|
||||
menu.AddToGUIUpdateList();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Update(double deltaTime)
|
||||
{
|
||||
base.Update(deltaTime);
|
||||
@@ -949,9 +967,7 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
menu.Update((float)deltaTime);
|
||||
|
||||
menu.Update((float)deltaTime);
|
||||
}
|
||||
|
||||
if (autoRestartTimer != 0.0f && autoRestartBox.Selected)
|
||||
|
||||
@@ -33,6 +33,10 @@ namespace Barotrauma
|
||||
get { return null; }
|
||||
}
|
||||
|
||||
public virtual void AddToGUIUpdateList()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Update(double deltaTime)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -366,6 +366,11 @@ namespace Barotrauma
|
||||
spriteBatch.End();
|
||||
}
|
||||
|
||||
public override void AddToGUIUpdateList()
|
||||
{
|
||||
menu.AddToGUIUpdateList();
|
||||
}
|
||||
|
||||
public override void Update(double deltaTime)
|
||||
{
|
||||
menu.Update((float)deltaTime);
|
||||
|
||||
Reference in New Issue
Block a user