rename IWindow -> IDisplay & refactor uses

GitOrigin-RevId: 9cb63778dead2564bc6d3931d7fc9626c878fd8c
This commit is contained in:
Colin McMillen 2019-12-04 17:15:50 -05:00
parent 92f4558c18
commit f6d1cac42f
3 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,7 @@
using Microsoft.Xna.Framework; using Microsoft.Xna.Framework;
namespace Jumpy { namespace Jumpy {
public interface IWindow { public interface IDisplay {
void Initialize(GameWindow window, GraphicsDeviceManager graphics); void Initialize(GameWindow window, GraphicsDeviceManager graphics);
void SetFullScreen(bool fullScreen); void SetFullScreen(bool fullScreen);
} }

View File

@ -9,7 +9,7 @@
<Import_RootNamespace>Jumpy.Shared</Import_RootNamespace> <Import_RootNamespace>Jumpy.Shared</Import_RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)IWindow.cs" /> <Compile Include="$(MSBuildThisFileDirectory)IDisplay.cs" />
<Compile Include="$(MSBuildThisFileDirectory)KeyboardInput.cs" /> <Compile Include="$(MSBuildThisFileDirectory)KeyboardInput.cs" />
<Compile Include="$(MSBuildThisFileDirectory)JumpyGame.cs" /> <Compile Include="$(MSBuildThisFileDirectory)JumpyGame.cs" />
</ItemGroup> </ItemGroup>

View File

@ -11,7 +11,7 @@ namespace Jumpy {
SpriteFont font; SpriteFont font;
KeyboardInput keyboardInput = new KeyboardInput(); KeyboardInput keyboardInput = new KeyboardInput();
bool fullScreen = false; bool fullScreen = false;
IWindow display; IDisplay display;
public JumpyGame() { public JumpyGame() {
graphics = new GraphicsDeviceManager(this); graphics = new GraphicsDeviceManager(this);
@ -21,7 +21,7 @@ namespace Jumpy {
// Performs initialization that's needed before starting to run. // Performs initialization that's needed before starting to run.
protected override void Initialize() { protected override void Initialize() {
display = (IWindow) Services.GetService(typeof(IWindow)); display = (IDisplay) Services.GetService(typeof(IDisplay));
display.Initialize(Window, graphics); display.Initialize(Window, graphics);
display.SetFullScreen(fullScreen); display.SetFullScreen(fullScreen);
base.Initialize(); base.Initialize();