Added -nosplash command

This commit is contained in:
Aragas 2016-12-05 22:28:36 +03:00
parent f8689cf891
commit 6f0a35b5c7
2 changed files with 22 additions and 2 deletions

View File

@ -1,12 +1,20 @@
Module CommandLineArgHandler
Private _forceGraphics As Boolean = False
Private _nosplash As Boolean = False
Public Sub Initialize(ByVal args() As String)
If args.Length > 0 Then
If args(0) = "-forcegraphics" Then
If args.Any(Function(arg As String)
Return arg = "-forcegraphics"
End Function) Then
_forceGraphics = True
End If
If args.Any(Function(arg As String)
Return arg = "-nosplash"
End Function) Then
_nosplash = True
End If
End If
For Each arg As String In args
@ -28,4 +36,10 @@
End Get
End Property
Public ReadOnly Property NoSplash() As Boolean
Get
Return _nosplash
End Get
End Property
End Module

View File

@ -73,7 +73,13 @@
GraphicsDevice.SamplerStates(0) = sampler
KeyboardInput = New KeyboardInput()
SetScreen(New SplashScreen(GameInstance))
If CommandLineArgHandler.NoSplash = True Then
Core.LoadContent()
SetScreen(New MainMenuScreen())
Else
SetScreen(New SplashScreen(GameInstance))
End If
End Sub
Public Sub LoadContent()