Pull out the "Paused" string into a file.

This commit is contained in:
Colin McMillen 2020-03-09 12:46:19 -04:00
parent 4870964cc5
commit 8f2fec053d
3 changed files with 8 additions and 1 deletions

View File

@ -121,7 +121,7 @@ namespace SemiColinGames {
} }
if (paused) { if (paused) {
string text = "Paused"; string text = Strings.Paused;
Vector2 position = Textures.BannerFont.CenteredOn(text, camera.HalfSize); Vector2 position = Textures.BannerFont.CenteredOn(text, camera.HalfSize);
Text.DrawOutlined(spriteBatch, Textures.BannerFont, text, position, Color.White); Text.DrawOutlined(spriteBatch, Textures.BannerFont, text, position, Color.White);
music.Pause(); music.Pause();

View File

@ -15,6 +15,7 @@
<Compile Include="$(MSBuildThisFileDirectory)NPC.cs" /> <Compile Include="$(MSBuildThisFileDirectory)NPC.cs" />
<Compile Include="$(MSBuildThisFileDirectory)SoundEffects.cs" /> <Compile Include="$(MSBuildThisFileDirectory)SoundEffects.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Sprites.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Sprites.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Strings.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Text.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Text.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Textures.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Textures.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Clock.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Clock.cs" />

6
Shared/Strings.cs Normal file
View File

@ -0,0 +1,6 @@
// This file contains all user-visible strings which might one day wish to be translated.
namespace SemiColinGames {
public static class Strings {
public const string Paused = "Paused";
}
}