2017-02-14 15:49:43 +01:00
|
|
|
|
Imports System.Threading
|
2016-09-16 22:26:28 +02:00
|
|
|
|
|
2018-05-17 02:39:25 +02:00
|
|
|
|
''' <summary>
|
|
|
|
|
''' This is the game screen that includes the MonoGame logo and the relevant license text.
|
|
|
|
|
''' </summary>
|
|
|
|
|
|
2016-09-16 22:26:28 +02:00
|
|
|
|
Friend Class SplashScreen
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
|
|
|
|
Inherits Screen
|
|
|
|
|
|
2018-01-07 19:44:27 +01:00
|
|
|
|
Private Const LICENSE_TEXT As String =
|
2018-05-17 02:39:25 +02:00
|
|
|
|
"""MonoGame"", the MonoGame Logo, and its source code are copyrights of MonoGame Team (monogame.net).
|
|
|
|
|
Pokémon 3D is not affiliated with The Pokémon Company, Nintendo, Creatures inc. or GAME FREAK inc.
|
|
|
|
|
Please support the official release!"
|
2016-09-16 22:26:28 +02:00
|
|
|
|
|
|
|
|
|
Private ReadOnly _monoGameLogo As Texture2D
|
|
|
|
|
Private ReadOnly _licenseFont As SpriteFont
|
|
|
|
|
Private ReadOnly _licenseTextSize As Vector2
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
2016-09-16 22:26:28 +02:00
|
|
|
|
Private _delay As Single = 7.0F
|
|
|
|
|
Private _loadThread As Thread
|
|
|
|
|
Private _startedLoad As Boolean
|
|
|
|
|
Private _game As GameController
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
|
|
|
|
Public Sub New(ByVal GameReference As GameController)
|
2016-09-16 22:26:28 +02:00
|
|
|
|
_game = GameReference
|
|
|
|
|
|
|
|
|
|
CanBePaused = False
|
2018-05-17 02:39:25 +02:00
|
|
|
|
CanMuteMusic = True
|
2016-09-16 22:26:28 +02:00
|
|
|
|
CanChat = False
|
2018-05-17 02:39:25 +02:00
|
|
|
|
CanTakeScreenshot = True
|
2018-09-11 15:52:38 +02:00
|
|
|
|
CanDrawDebug = False
|
2018-05-17 02:39:25 +02:00
|
|
|
|
MouseVisible = False
|
|
|
|
|
CanGoFullscreen = True
|
2016-09-16 22:26:28 +02:00
|
|
|
|
|
2018-02-21 16:34:06 +01:00
|
|
|
|
_monoGameLogo = TextureManager.LoadDirect("GUI\Logos\MonoGame.png")
|
2016-09-16 22:26:28 +02:00
|
|
|
|
_licenseFont = Core.Content.Load(Of SpriteFont)("Fonts\BMP\mainFont")
|
|
|
|
|
_licenseTextSize = _licenseFont.MeasureString(LICENSE_TEXT)
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
|
|
|
|
Me.Identification = Identifications.SplashScreen
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Overrides Sub Draw()
|
2016-09-16 22:26:28 +02:00
|
|
|
|
Canvas.DrawRectangle(Core.windowSize, Color.Black)
|
|
|
|
|
|
|
|
|
|
Core.SpriteBatch.Draw(_monoGameLogo, New Vector2(CSng(Core.windowSize.Width / 2 - _monoGameLogo.Width / 2),
|
|
|
|
|
CSng(Core.windowSize.Height / 2 - _monoGameLogo.Height / 2 - 50)), Color.White)
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
2016-09-16 22:26:28 +02:00
|
|
|
|
Core.SpriteBatch.DrawString(_licenseFont, LICENSE_TEXT, New Vector2(CSng(Core.windowSize.Width / 2 - _licenseTextSize.X / 2),
|
|
|
|
|
CSng(Core.windowSize.Height - _licenseTextSize.Y - 50)), Color.White)
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Overrides Sub Update()
|
2016-09-16 22:26:28 +02:00
|
|
|
|
If _startedLoad = False Then
|
|
|
|
|
_startedLoad = True
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
2016-09-16 22:26:28 +02:00
|
|
|
|
_loadThread = New Thread(AddressOf LoadContent)
|
|
|
|
|
_loadThread.Start()
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End If
|
|
|
|
|
|
2016-09-16 22:26:28 +02:00
|
|
|
|
If _loadThread.IsAlive = False Then
|
|
|
|
|
If _delay <= 0.0F Or GameController.IS_DEBUG_ACTIVE = True Then
|
2016-09-07 18:50:38 +02:00
|
|
|
|
Core.GraphicsManager.ApplyChanges()
|
|
|
|
|
|
|
|
|
|
Logger.Debug("---Loading content ready---")
|
|
|
|
|
|
|
|
|
|
If MapPreviewScreen.MapViewMode = True Then
|
|
|
|
|
Core.SetScreen(New MapPreviewScreen())
|
|
|
|
|
Else
|
2017-08-14 06:14:45 +02:00
|
|
|
|
Core.SetScreen(New PressStartScreen())
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End If
|
2018-05-17 02:39:25 +02:00
|
|
|
|
'Core.SetScreen(New TransitionScreen(Me, New IntroScreen(), Color.Black, False))
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
2016-09-16 22:26:28 +02:00
|
|
|
|
_delay -= 0.1F
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub LoadContent()
|
|
|
|
|
Logger.Debug("---Start loading content---")
|
|
|
|
|
Core.LoadContent()
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Class
|