Options Screen and Pause Screen improved
* When a button is selected in the pause screen, the font now becomes white with a black shadow * Cursor movement and scroll bar usage bugs fixed
This commit is contained in:
parent
8f00719cbd
commit
5a91f9f0a7
|
@ -97,6 +97,8 @@
|
|||
#Region "MainMenu"
|
||||
|
||||
Private Sub DrawMenu()
|
||||
Dim FontColor As Color
|
||||
Dim FontShadow As Color = New Color(0, 0, 0, 0)
|
||||
For i = 0 To 1
|
||||
Dim Text As String = ""
|
||||
Select Case i
|
||||
|
@ -107,12 +109,19 @@
|
|||
End Select
|
||||
|
||||
If i = mainIndex Then
|
||||
FontColor = Color.White
|
||||
FontShadow.A = 255
|
||||
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture(mainTexture, New Rectangle(0, 48, 48, 48)), 2, New Rectangle(CInt(Core.windowSize.Width / 2) - 180, 220 + i * 128, 320, 64), True)
|
||||
Else
|
||||
FontColor = Color.Black
|
||||
FontShadow.A = 0
|
||||
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture(mainTexture, New Rectangle(0, 0, 48, 48)), 2, New Rectangle(CInt(Core.windowSize.Width / 2) - 180, 220 + i * 128, 320, 64), True)
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Text, New Vector2(CInt(Core.windowSize.Width / 2 - FontManager.InGameFont.MeasureString(Text).X / 2 - 10), 256 + i * 128), Color.Black)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Text, New Vector2(CInt(Core.windowSize.Width / 2 - FontManager.InGameFont.MeasureString(Text).X / 2 - 10 + 2), 256 + i * 128 + 2), FontShadow)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Text, New Vector2(CInt(Core.windowSize.Width / 2 - FontManager.InGameFont.MeasureString(Text).X / 2 - 10), 256 + i * 128), FontColor)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
@ -187,6 +196,8 @@
|
|||
Dim pX As Integer = CInt(Core.windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("pause_menu_confirmation")).X / 2)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 7, CInt(Core.windowSize.Height / 7.5) + 3 + 110), Color.Black)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 10, CInt(Core.windowSize.Height / 7.5) + 110), Color.White)
|
||||
Dim FontColor As Color
|
||||
Dim FontShadow As Color = New Color(0, 0, 0, 0)
|
||||
|
||||
For i = 0 To 1
|
||||
Dim Text As String = ""
|
||||
|
@ -201,12 +212,19 @@
|
|||
End Select
|
||||
|
||||
If i = quitIndex Then
|
||||
FontColor = Color.White
|
||||
FontShadow.A = 255
|
||||
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture(mainTexture, New Rectangle(0, 48, 48, 48)), 2, New Rectangle(CInt(Core.windowSize.Width / 2) - 180 + x, 320, 320, 64), True)
|
||||
Else
|
||||
FontColor = Color.Black
|
||||
FontShadow.A = 0
|
||||
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture(mainTexture, New Rectangle(0, 0, 48, 48)), 2, New Rectangle(CInt(Core.windowSize.Width / 2) - 180 + x, 320, 320, 64), True)
|
||||
End If
|
||||
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Text, New Vector2(CInt(Core.windowSize.Width / 2 - (FontManager.InGameFont.MeasureString(Text).X / 2) - 10 + x), 356), Color.Black)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Text, New Vector2(CInt(Core.windowSize.Width / 2 - (FontManager.InGameFont.MeasureString(Text).X / 2) - 10 + x + 2), 356 + 2), FontShadow)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Text, New Vector2(CInt(Core.windowSize.Width / 2 - (FontManager.InGameFont.MeasureString(Text).X / 2) - 10 + x), 356), FontColor)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
|
|
@ -755,10 +755,25 @@
|
|||
|
||||
Select Case direction
|
||||
Case "up"
|
||||
If ScreenIndex = 0 And currentControl.ID > 7 Then
|
||||
If control.ID = 7 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
If ScreenIndex = 0 Then
|
||||
Select Case currentControl.ID
|
||||
Case 4
|
||||
If control.ID = 1 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case 5
|
||||
If control.ID = 3 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case 6, 7
|
||||
If control.ID = 4 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case 8
|
||||
If control.ID = 5 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
End Select
|
||||
Else
|
||||
If ScreenIndex = 7 Then
|
||||
If currentControl.ID <= 4 Then
|
||||
|
@ -766,28 +781,49 @@
|
|||
EligibleControls.Add(control)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
If Math.Abs(R2.X - R1.X) <= -(R2.Y - R1.Y) Then 'because Y axis points down
|
||||
ElseIf ScreenIndex = 5 Then
|
||||
If currentControl.ID > 3 Then
|
||||
If control.ID = 3 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
ElseIf control.ID = currentControl.ID - 1 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
ElseIf Math.Abs(R2.X - R1.X) <= -(R2.Y - R1.Y) Then 'because Y axis points down
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
End If
|
||||
Case "down"
|
||||
If ScreenIndex = 0 And currentControl.ID > 3 And currentControl.ID < 7 Then
|
||||
If control.ID = 7 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Else
|
||||
If Math.Abs(R2.X - R1.X) <= -(R1.Y - R2.Y) Then 'because Y axis points down
|
||||
EligibleControls.Add(control)
|
||||
If ScreenIndex = 0 Then
|
||||
Select Case currentControl.ID
|
||||
Case 1, 2
|
||||
If control.ID = 4 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case 3
|
||||
If control.ID = 5 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case 4
|
||||
If control.ID = 6 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case 5
|
||||
If control.ID = 8 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
End Select
|
||||
ElseIf ScreenIndex = 5 Then
|
||||
If currentControl.ID < 4 Then
|
||||
If control.ID = currentControl.ID + 1 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
End If
|
||||
ElseIf Math.Abs(R2.X - R1.X) <= -(R1.Y - R2.Y) Then 'because Y axis points down
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case "right"
|
||||
If ScreenIndex = 0 And currentControl.ID > 6 Then
|
||||
If Math.Abs(R2.Y - R1.Y) <= (R2.X - R1.X) And R2.Y >= R1.Y Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
ElseIf ScreenIndex = 7 Then
|
||||
If ScreenIndex = 7 Then
|
||||
If currentControl.ID = 5 And control.ID = 6 Then
|
||||
EligibleControls.Add(control)
|
||||
ElseIf currentControl.ID = 6 And control.ID = 4 Then
|
||||
|
@ -797,20 +833,14 @@
|
|||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case "left"
|
||||
If ScreenIndex = 0 And currentControl.ID > 6 Then
|
||||
If Math.Abs(R2.Y - R1.Y) <= (R1.X - R2.X) Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Else
|
||||
If ScreenIndex = 7 Then
|
||||
If currentControl.ID <= 4 And control.ID = 6 Then
|
||||
EligibleControls.Add(control)
|
||||
ElseIf currentControl.ID = 6 And control.ID = 5 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
ElseIf control.ID = currentControl.ID - 1 Then
|
||||
If ScreenIndex = 7 Then
|
||||
If currentControl.ID <= 4 And control.ID = 6 Then
|
||||
EligibleControls.Add(control)
|
||||
ElseIf currentControl.ID = 6 And control.ID = 5 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
ElseIf control.ID = currentControl.ID - 1 Then
|
||||
EligibleControls.Add(control)
|
||||
End If
|
||||
Case "next"
|
||||
If ScreenIndex = 7 And currentControl.ID < 4 Then
|
||||
|
@ -1729,7 +1759,7 @@
|
|||
End If
|
||||
Else
|
||||
If Controls.Accept(False, True, True) Then
|
||||
If s._cursorDestPosition = Me.Position Then
|
||||
If s._cursorDestPosition.Y = Me.Position.Y Then
|
||||
Selected = True
|
||||
s._selectedScrollBar = True
|
||||
End If
|
||||
|
|
Loading…
Reference in New Issue