Added command to change Screen.Fade color
This commit is contained in:
parent
f56696df23
commit
6e0b1d1550
|
@ -9,7 +9,8 @@ Public Class OverworldScreen
|
||||||
|
|
||||||
#Region "Fields"
|
#Region "Fields"
|
||||||
|
|
||||||
Private Shared _fadeValue As Integer = 0 'Fade progress value for the black screen fade.
|
Private Shared _fadeColor As Color = Color.Black 'Fade screen color.
|
||||||
|
Private Shared _fadeValue As Integer = 0 'Fade progress value for the screen fade.
|
||||||
Private Shared _drawRodID As Integer = -1 'The rod ID to display on the screen during the fishing animation.
|
Private Shared _drawRodID As Integer = -1 'The rod ID to display on the screen during the fishing animation.
|
||||||
|
|
||||||
Private _actionScript As ActionScript 'Private ActionScript instance.
|
Private _actionScript As ActionScript 'Private ActionScript instance.
|
||||||
|
@ -57,7 +58,19 @@ Public Class OverworldScreen
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Fade progress value for the black screen fade.
|
''' Fade color for the screen.
|
||||||
|
''' </summary>
|
||||||
|
Public Shared Property FadeColor() As Color
|
||||||
|
Get
|
||||||
|
Return _fadeColor
|
||||||
|
End Get
|
||||||
|
Set(value As Color)
|
||||||
|
_fadeColor = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
''' <summary>
|
||||||
|
''' Fade progress value for the screen fade.
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public Shared Property FadeValue() As Integer
|
Public Shared Property FadeValue() As Integer
|
||||||
Get
|
Get
|
||||||
|
@ -378,7 +391,7 @@ Public Class OverworldScreen
|
||||||
|
|
||||||
'If the black fade is visible, render it:
|
'If the black fade is visible, render it:
|
||||||
If FadeValue > 0 Then
|
If FadeValue > 0 Then
|
||||||
Canvas.DrawRectangle(Core.windowSize, New Color(0, 0, 0, FadeValue))
|
Canvas.DrawRectangle(Core.windowSize, New Color(FadeColor.R, FadeColor.G, FadeColor.B, FadeValue))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If FadeValue > 0 Then
|
If FadeValue > 0 Then
|
||||||
Canvas.DrawRectangle(windowSize, New Color(0, 0, 0, FadeValue))
|
Canvas.DrawRectangle(windowSize, New Color(FadeColor.R, FadeColor.G, FadeColor.B, FadeValue))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,14 @@
|
||||||
Else
|
Else
|
||||||
IsReady = True
|
IsReady = True
|
||||||
End If
|
End If
|
||||||
|
Case "fadeoutcolor"
|
||||||
|
If Not String.IsNullOrEmpty(argument) Then
|
||||||
|
Dim colorR As Integer = int(argument.GetSplit(0))
|
||||||
|
Dim colorG As Integer = int(argument.GetSplit(1))
|
||||||
|
Dim colorB As Integer = int(argument.GetSplit(2))
|
||||||
|
OverworldScreen.FadeColor = New Color(colorR, colorG, colorB)
|
||||||
|
End If
|
||||||
|
IsReady = True
|
||||||
Case "setfade"
|
Case "setfade"
|
||||||
OverworldScreen.FadeValue = int(argument).Clamp(0, 255)
|
OverworldScreen.FadeValue = int(argument).Clamp(0, 255)
|
||||||
IsReady = True
|
IsReady = True
|
||||||
|
|
Loading…
Reference in New Issue