Added fullscreen toogling and fixed the game icon

This commit is contained in:
Your Name 2024-11-25 18:50:30 +01:00
parent 4d3bfd1e91
commit 668868b839
3 changed files with 18 additions and 3 deletions

View File

@ -969,5 +969,15 @@ namespace WindowsPhoneSpeedyBlupi
decor.MemorizeDoors(gameData);
gameData.Write();
}
//public void SetFullScreen(bool isFullScreen)
//{
// this.graphics.IsFullScreen = isFullScreen;
// graphics.ToggleFullScreen();
//}
public void ToggleFullScreen()
{
this.graphics.ToggleFullScreen();
}
public bool IsFullScreen() { return this.graphics.IsFullScreen; }
}
}

View File

@ -277,7 +277,6 @@ namespace WindowsPhoneSpeedyBlupi
}
}
MouseState mouseState = Mouse.GetState();
if (mouseState.LeftButton == ButtonState.Pressed)
{
@ -297,6 +296,11 @@ namespace WindowsPhoneSpeedyBlupi
if (newState.IsKeyDown(Keys.Left)) touchesOrClicks.Add(createTinyPoint(-1, Misc.keyboardPressToInt(KeyboardPress.Left)));
if (newState.IsKeyDown(Keys.Space)) touchesOrClicks.Add(createTinyPoint(-1, Misc.keyboardPressToInt(KeyboardPress.Space)));
}
if (newState.IsKeyDown(Keys.F11))
{
game1.ToggleFullScreen ();
Debug.WriteLine("F11 was pressed.");
}
Boolean keyPressedUp = false;
Boolean keyPressedDown = false;

View File

@ -98,6 +98,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
<Content Include="worlds\world001.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@ -335,10 +336,10 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="icon.ico">
<LogicalName>icon.ico</LogicalName>
<LogicalName>Icon.ico</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="icon.bmp">
<LogicalName>icon.bmp</LogicalName>
<LogicalName>Icon.bmp</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>