(6f4d8cd0e) Added: Dimmed background for info frames. Fixed: Highlight waits to be only a frame as it seems to be enough
This commit is contained in:
+4
-4
@@ -148,7 +148,7 @@ namespace Barotrauma.Tutorials
|
|||||||
TriggerTutorialSegment(0);
|
TriggerTutorialSegment(0);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(1.5f);
|
yield return null;
|
||||||
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_medic, "follow", highlightColor, new Vector2(5, 5));
|
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_medic, "follow", highlightColor, new Vector2(5, 5));
|
||||||
}
|
}
|
||||||
while (!HasOrder(captain_medic, "follow"));
|
while (!HasOrder(captain_medic, "follow"));
|
||||||
@@ -163,7 +163,7 @@ namespace Barotrauma.Tutorials
|
|||||||
GameMain.GameSession.CrewManager.AddCharacter(captain_mechanic);
|
GameMain.GameSession.CrewManager.AddCharacter(captain_mechanic);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(1.5f);
|
yield return null;
|
||||||
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_mechanic, "repairsystems", highlightColor, new Vector2(5, 5));
|
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_mechanic, "repairsystems", highlightColor, new Vector2(5, 5));
|
||||||
HighlightOrderOption("jobspecific");
|
HighlightOrderOption("jobspecific");
|
||||||
}
|
}
|
||||||
@@ -174,7 +174,7 @@ namespace Barotrauma.Tutorials
|
|||||||
GameMain.GameSession.CrewManager.AddCharacter(captain_security);
|
GameMain.GameSession.CrewManager.AddCharacter(captain_security);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(1.5f);
|
yield return null;
|
||||||
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_security, "operateweapons", highlightColor, new Vector2(5, 5));
|
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_security, "operateweapons", highlightColor, new Vector2(5, 5));
|
||||||
HighlightOrderOption("fireatwill");
|
HighlightOrderOption("fireatwill");
|
||||||
}
|
}
|
||||||
@@ -185,7 +185,7 @@ namespace Barotrauma.Tutorials
|
|||||||
GameMain.GameSession.CrewManager.AddCharacter(captain_engineer);
|
GameMain.GameSession.CrewManager.AddCharacter(captain_engineer);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(1.5f);
|
yield return null;
|
||||||
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_engineer, "operatereactor", highlightColor, new Vector2(5, 5));
|
GameMain.GameSession.CrewManager.HighlightOrderButton(captain_engineer, "operatereactor", highlightColor, new Vector2(5, 5));
|
||||||
HighlightOrderOption("powerup");
|
HighlightOrderOption("powerup");
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-5
@@ -317,11 +317,14 @@ namespace Barotrauma.Tutorials
|
|||||||
SetHighlight(mechanic_workingPump.Item, true);
|
SetHighlight(mechanic_workingPump.Item, true);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (mechanic_workingPump.IsActiveSlider.FlashTimer <= 0)
|
|
||||||
{
|
|
||||||
mechanic_workingPump.IsActiveSlider.Flash(uiHighlightColor, 1.5f, true);
|
|
||||||
}
|
|
||||||
yield return null;
|
yield return null;
|
||||||
|
if (IsSelectedItem(mechanic_brokenPump.Item))
|
||||||
|
{
|
||||||
|
if (mechanic_workingPump.IsActiveSlider.FlashTimer <= 0)
|
||||||
|
{
|
||||||
|
mechanic_workingPump.IsActiveSlider.Flash(uiHighlightColor, 1.5f, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
} while (mechanic_workingPump.FlowPercentage >= 0 || !mechanic_workingPump.IsActive); // Highlight until draining
|
} while (mechanic_workingPump.FlowPercentage >= 0 || !mechanic_workingPump.IsActive); // Highlight until draining
|
||||||
SetHighlight(mechanic_workingPump.Item, false);
|
SetHighlight(mechanic_workingPump.Item, false);
|
||||||
do { yield return null; } while (mechanic_brokenhull_1.WaterPercentage > waterVolumeBeforeOpening); // Unlock door once drained
|
do { yield return null; } while (mechanic_brokenhull_1.WaterPercentage > waterVolumeBeforeOpening); // Unlock door once drained
|
||||||
@@ -510,6 +513,7 @@ namespace Barotrauma.Tutorials
|
|||||||
Repairable repairablePumpComponent = mechanic_brokenPump.Item.GetComponent<Repairable>();
|
Repairable repairablePumpComponent = mechanic_brokenPump.Item.GetComponent<Repairable>();
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
yield return null;
|
||||||
if (!mechanic_brokenPump.Item.IsFullCondition)
|
if (!mechanic_brokenPump.Item.IsFullCondition)
|
||||||
{
|
{
|
||||||
if (!mechanic.HasEquippedItem("wrench"))
|
if (!mechanic.HasEquippedItem("wrench"))
|
||||||
@@ -524,7 +528,6 @@ namespace Barotrauma.Tutorials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
yield return null;
|
|
||||||
} while (!mechanic_brokenPump.Item.IsFullCondition || mechanic_brokenPump.FlowPercentage >= 0 || !mechanic_brokenPump.IsActive);
|
} while (!mechanic_brokenPump.Item.IsFullCondition || mechanic_brokenPump.FlowPercentage >= 0 || !mechanic_brokenPump.IsActive);
|
||||||
RemoveCompletedObjective(segments[9]);
|
RemoveCompletedObjective(segments[9]);
|
||||||
SetHighlight(mechanic_brokenPump.Item, false);
|
SetHighlight(mechanic_brokenPump.Item, false);
|
||||||
|
|||||||
@@ -505,29 +505,33 @@ namespace Barotrauma.Tutorials
|
|||||||
Enum.TryParse(anchorStr, out anchor);
|
Enum.TryParse(anchorStr, out anchor);
|
||||||
}
|
}
|
||||||
|
|
||||||
var infoBlock = new GUIFrame(new RectTransform(new Point((int)(width * GUI.Scale), (int)(height * GUI.Scale)), GUI.Canvas, anchor) { AbsoluteOffset = new Point(20) });
|
var background = new GUIFrame(new RectTransform(new Point(GameMain.GraphicsWidth, GameMain.GraphicsHeight), GUI.Canvas, Anchor.Center), "InnerFrame", new Color(0, 0, 0, 1f));
|
||||||
|
|
||||||
|
var infoBlock = new GUIFrame(new RectTransform(new Point((int)(width * GUI.Scale), (int)(height * GUI.Scale)), background.RectTransform, anchor) { AbsoluteOffset = new Point(20) });
|
||||||
infoBlock.Flash(Color.Green);
|
infoBlock.Flash(Color.Green);
|
||||||
|
|
||||||
var infoContent = new GUILayoutGroup(new RectTransform(new Vector2(0.9f, 0.8f), infoBlock.RectTransform, Anchor.Center))
|
var infoContent = new GUILayoutGroup(new RectTransform(new Vector2(0.9f, 0.8f), infoBlock.RectTransform, Anchor.Center))
|
||||||
{
|
{
|
||||||
Stretch = true,
|
Stretch = true,
|
||||||
RelativeSpacing = 0.02f
|
RelativeSpacing = 0.05f
|
||||||
};
|
};
|
||||||
|
|
||||||
if (title.Length > 0)
|
if (title.Length > 0)
|
||||||
{
|
{
|
||||||
var titleBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.3f), infoContent.RectTransform),
|
var titleBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform),
|
||||||
title, font: GUI.VideoTitleFont, textAlignment: Alignment.Center, textColor: new Color(253, 174, 0));
|
title, font: GUI.VideoTitleFont, textAlignment: Alignment.Center, textColor: new Color(253, 174, 0));
|
||||||
titleBlock.TextScale = textScale;
|
titleBlock.TextScale = textScale;
|
||||||
}
|
}
|
||||||
|
|
||||||
var textBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 1.0f), infoContent.RectTransform), text, wrap: true);
|
var textBlock = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform),
|
||||||
|
text, wrap: true);
|
||||||
|
textBlock.TextScale = textScale;
|
||||||
|
|
||||||
infoBoxClosedCallback = callback;
|
infoBoxClosedCallback = callback;
|
||||||
|
|
||||||
if (hasButton)
|
if (hasButton)
|
||||||
{
|
{
|
||||||
var buttonContainer = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.3f), infoContent.RectTransform) { MinSize = new Point(0, 30), MaxSize = new Point((int) infoContent.Rect.X, 60) }, isHorizontal: true)
|
var buttonContainer = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.2f), infoContent.RectTransform) { MinSize = new Point(0, 30) }, isHorizontal: true)
|
||||||
{
|
{
|
||||||
Stretch = true,
|
Stretch = true,
|
||||||
RelativeSpacing = 0.1f
|
RelativeSpacing = 0.1f
|
||||||
@@ -555,7 +559,7 @@ namespace Barotrauma.Tutorials
|
|||||||
|
|
||||||
GUI.PlayUISound(GUISoundType.UIMessage);
|
GUI.PlayUISound(GUISoundType.UIMessage);
|
||||||
|
|
||||||
return infoBlock;
|
return background;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -2172,19 +2172,15 @@
|
|||||||
<None Include="$(MSBuildThisFileDirectory)Content\Sounds\Impact\SoftImpact3.ogg">
|
<None Include="$(MSBuildThisFileDirectory)Content\Sounds\Impact\SoftImpact3.ogg">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="$(MSBuildThisFileDirectory)Content\Tutorials\Dugong_Tutorial.sub">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)Content\Tutorials\TutorialOutpost.sub">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<None Include="$(MSBuildThisFileDirectory)Submarines\Berilia.sub">
|
<None Include="$(MSBuildThisFileDirectory)Submarines\Berilia.sub">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="$(MSBuildThisFileDirectory)Submarines\Dugong_Tutorial.sub">
|
<None Include="$(MSBuildThisFileDirectory)Submarines\Dugong_Tutorial.sub">
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
|
<None Include="$(MSBuildThisFileDirectory)Submarines\TutorialOutpost.sub">
|
||||||
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<None Include="$(MSBuildThisFileDirectory)Submarines\TutorialOutpost.sub" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="$(MSBuildThisFileDirectory)Content\Characters\Carrier\CARRIER_alarmLoop.ogg">
|
<None Include="$(MSBuildThisFileDirectory)Content\Characters\Carrier\CARRIER_alarmLoop.ogg">
|
||||||
|
|||||||
Reference in New Issue
Block a user