Texture and color fixes in menus
This commit is contained in:
parent
03bdf93468
commit
0b183bb5f8
|
@ -340,8 +340,8 @@ Public Class NewInventoryScreen
|
||||||
mainBackgroundColor = New Color(255, 255, 255, CInt(255 * _interfaceFade))
|
mainBackgroundColor = New Color(255, 255, 255, CInt(255 * _interfaceFade))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Canvas.DrawRectangle(New Rectangle(halfWidth - 400, halfHeight - 232, 260, 32), New Color(84, 198, 216, mainBackgroundColor.A))
|
Canvas.DrawRectangle(New Rectangle(halfWidth - 400, halfHeight - 232, 260, 32), New Color(ColorProvider.MainColor.R, ColorProvider.MainColor.G, ColorProvider.MainColor.B, mainBackgroundColor.A))
|
||||||
Canvas.DrawRectangle(New Rectangle(halfWidth - 140, halfHeight - 216, 16, 16), New Color(84, 198, 216, mainBackgroundColor.A))
|
Canvas.DrawRectangle(New Rectangle(halfWidth - 140, halfHeight - 216, 16, 16), New Color(ColorProvider.MainColor.R, ColorProvider.MainColor.G, ColorProvider.MainColor.B, mainBackgroundColor.A))
|
||||||
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 140, halfHeight - 232, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 140, halfHeight - 232, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
||||||
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 124, halfHeight - 216, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 124, halfHeight - 216, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
||||||
|
|
||||||
|
|
|
@ -388,6 +388,8 @@ Public Class NewMainMenuScreen
|
||||||
_selectedProfile = x
|
_selectedProfile = x
|
||||||
If _MainProfiles(_selectedProfile)._gameModeExists Then
|
If _MainProfiles(_selectedProfile)._gameModeExists Then
|
||||||
GameModeManager.SetGameModePointer(_MainProfiles(_selectedProfile)._gameMode)
|
GameModeManager.SetGameModePointer(_MainProfiles(_selectedProfile)._gameMode)
|
||||||
|
Else
|
||||||
|
GameModeManager.SetGameModePointer("Kolben")
|
||||||
End If
|
End If
|
||||||
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
||||||
_oldMenuTexture = TextureManager.GetTexture("GUI\Menus\Menu")
|
_oldMenuTexture = TextureManager.GetTexture("GUI\Menus\Menu")
|
||||||
|
@ -502,12 +504,22 @@ Public Class NewMainMenuScreen
|
||||||
_screenOffsetTarget.X -= 180
|
_screenOffsetTarget.X -= 180
|
||||||
_GameJoltButtonIndex = 0
|
_GameJoltButtonIndex = 0
|
||||||
GameModeSplash = Nothing
|
GameModeSplash = Nothing
|
||||||
|
If _MainProfiles(_selectedProfile)._gameModeExists Then
|
||||||
|
GameModeManager.SetGameModePointer(_MainProfiles(_selectedProfile)._gameMode)
|
||||||
|
End If
|
||||||
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
||||||
|
_oldMenuTexture = TextureManager.GetTexture("GUI\Menus\Menu")
|
||||||
End If
|
End If
|
||||||
If Controls.Left(True) And _selectedProfile > 0 Then
|
If Controls.Left(True) And _selectedProfile > 0 Then
|
||||||
_selectedProfile -= 1
|
_selectedProfile -= 1
|
||||||
_screenOffsetTarget.X += 180
|
_screenOffsetTarget.X += 180
|
||||||
_GameJoltButtonIndex = 0
|
_GameJoltButtonIndex = 0
|
||||||
GameModeSplash = Nothing
|
GameModeSplash = Nothing
|
||||||
|
If _MainProfiles(_selectedProfile)._gameModeExists Then
|
||||||
|
GameModeManager.SetGameModePointer(_MainProfiles(_selectedProfile)._gameMode)
|
||||||
|
End If
|
||||||
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
||||||
|
_oldMenuTexture = TextureManager.GetTexture("GUI\Menus\Menu")
|
||||||
End If
|
End If
|
||||||
Case 1
|
Case 1
|
||||||
If Controls.Right(True) And _selectedProfile < _GameJoltProfiles.Count - 1 Then
|
If Controls.Right(True) And _selectedProfile < _GameJoltProfiles.Count - 1 Then
|
||||||
|
@ -515,12 +527,22 @@ Public Class NewMainMenuScreen
|
||||||
_gameJoltOffsetTarget.X -= 180
|
_gameJoltOffsetTarget.X -= 180
|
||||||
_GameJoltButtonIndex = 0
|
_GameJoltButtonIndex = 0
|
||||||
GameModeSplash = Nothing
|
GameModeSplash = Nothing
|
||||||
|
If _MainProfiles(_selectedProfile)._gameModeExists Then
|
||||||
|
GameModeManager.SetGameModePointer(_MainProfiles(_selectedProfile)._gameMode)
|
||||||
|
End If
|
||||||
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
||||||
|
_oldMenuTexture = TextureManager.GetTexture("GUI\Menus\Menu")
|
||||||
End If
|
End If
|
||||||
If Controls.Left(True) And _selectedProfile > 0 Then
|
If Controls.Left(True) And _selectedProfile > 0 Then
|
||||||
_selectedProfile -= 1
|
_selectedProfile -= 1
|
||||||
_gameJoltOffsetTarget.X += 180
|
_gameJoltOffsetTarget.X += 180
|
||||||
_GameJoltButtonIndex = 0
|
_GameJoltButtonIndex = 0
|
||||||
GameModeSplash = Nothing
|
GameModeSplash = Nothing
|
||||||
|
If _MainProfiles(_selectedProfile)._gameModeExists Then
|
||||||
|
GameModeManager.SetGameModePointer(_MainProfiles(_selectedProfile)._gameMode)
|
||||||
|
End If
|
||||||
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
||||||
|
_oldMenuTexture = TextureManager.GetTexture("GUI\Menus\Menu")
|
||||||
End If
|
End If
|
||||||
Case 2, 3
|
Case 2, 3
|
||||||
If Controls.Right(True) And _selectedProfile < _OptionsProfiles.Count - 1 Then
|
If Controls.Right(True) And _selectedProfile < _OptionsProfiles.Count - 1 Then
|
||||||
|
@ -1561,6 +1583,8 @@ Public Class GameModeSelectionScreen
|
||||||
Private tempGameModesDisplay As String = ""
|
Private tempGameModesDisplay As String = ""
|
||||||
Private GameModeSplash As Texture2D = Nothing
|
Private GameModeSplash As Texture2D = Nothing
|
||||||
|
|
||||||
|
Private _menuTexture As Texture2D
|
||||||
|
|
||||||
Private Const WIDTH = 320
|
Private Const WIDTH = 320
|
||||||
Private Const HEIGHT = 64
|
Private Const HEIGHT = 64
|
||||||
Private Const GAP = 32
|
Private Const GAP = 32
|
||||||
|
@ -1575,8 +1599,9 @@ Public Class GameModeSelectionScreen
|
||||||
CanTakeScreenshot = True
|
CanTakeScreenshot = True
|
||||||
|
|
||||||
PreScreen = currentScreen
|
PreScreen = currentScreen
|
||||||
|
|
||||||
_gameModes = GameModeManager.GetAllGameModes
|
_gameModes = GameModeManager.GetAllGameModes
|
||||||
|
GameModeManager.SetGameModePointer(_gameModes(_index).DirectoryName)
|
||||||
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Draw()
|
Public Overrides Sub Draw()
|
||||||
|
@ -1589,7 +1614,6 @@ Public Class GameModeSelectionScreen
|
||||||
Dim text = Localization.GetString("gamemode_menu_select1", "Select a GameMode") + Environment.NewLine + Localization.GetString("gamemode_menu_select2", "to start the new game with.")
|
Dim text = Localization.GetString("gamemode_menu_select1", "Select a GameMode") + Environment.NewLine + Localization.GetString("gamemode_menu_select2", "to start the new game with.")
|
||||||
|
|
||||||
GetFontRenderer().DrawString(FontManager.InGameFont, text, New Vector2(30, 30), Color.White)
|
GetFontRenderer().DrawString(FontManager.InGameFont, text, New Vector2(30, 30), Color.White)
|
||||||
Dim _menuTexture As Texture2D = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
|
||||||
|
|
||||||
'Draw buttons
|
'Draw buttons
|
||||||
Dim center = CInt(windowSize.Width / 2 + 320)
|
Dim center = CInt(windowSize.Width / 2 + 320)
|
||||||
|
@ -1693,13 +1717,17 @@ Public Class GameModeSelectionScreen
|
||||||
|
|
||||||
If _index > 0 AndAlso Controls.Up(True, True, True, True, True, True) Then
|
If _index > 0 AndAlso Controls.Up(True, True, True, True, True, True) Then
|
||||||
_index -= 1
|
_index -= 1
|
||||||
|
GameModeManager.SetGameModePointer(_gameModes(_index).DirectoryName)
|
||||||
tempGameModesDisplay = ""
|
tempGameModesDisplay = ""
|
||||||
GameModeSplash = Nothing
|
GameModeSplash = Nothing
|
||||||
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
||||||
End If
|
End If
|
||||||
If _index < _gameModes.Length - 1 AndAlso Controls.Down(True, True, True, True, True, True) Then
|
If _index < _gameModes.Length - 1 AndAlso Controls.Down(True, True, True, True, True, True) Then
|
||||||
_index += 1
|
_index += 1
|
||||||
|
GameModeManager.SetGameModePointer(_gameModes(_index).DirectoryName)
|
||||||
tempGameModesDisplay = ""
|
tempGameModesDisplay = ""
|
||||||
GameModeSplash = Nothing
|
GameModeSplash = Nothing
|
||||||
|
_menuTexture = TextureManager.GetTexture("GUI\Menus\MainMenu")
|
||||||
End If
|
End If
|
||||||
If KeyBoardHandler.KeyPressed(KeyBindings.EscapeKey) Or KeyBoardHandler.KeyPressed(KeyBindings.BackKey1) Or KeyBoardHandler.KeyPressed(KeyBindings.BackKey2) Or MouseHandler.ButtonPressed(MouseHandler.MouseButtons.RightButton) Or ControllerHandler.ButtonPressed(Buttons.B) Then
|
If KeyBoardHandler.KeyPressed(KeyBindings.EscapeKey) Or KeyBoardHandler.KeyPressed(KeyBindings.BackKey1) Or KeyBoardHandler.KeyPressed(KeyBindings.BackKey2) Or MouseHandler.ButtonPressed(MouseHandler.MouseButtons.RightButton) Or ControllerHandler.ButtonPressed(Buttons.B) Then
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
|
@ -1707,6 +1735,7 @@ Public Class GameModeSelectionScreen
|
||||||
End If
|
End If
|
||||||
If Controls.Accept(True, True, True) Then
|
If Controls.Accept(True, True, True) Then
|
||||||
GameModeManager.SetGameModePointer(_gameModes(_index).DirectoryName)
|
GameModeManager.SetGameModePointer(_gameModes(_index).DirectoryName)
|
||||||
|
|
||||||
Localization.ReloadGameModeTokens()
|
Localization.ReloadGameModeTokens()
|
||||||
SoundManager.PlaySound("select")
|
SoundManager.PlaySound("select")
|
||||||
If GameModeManager.ActiveGameMode.IntroType = "0" Then
|
If GameModeManager.ActiveGameMode.IntroType = "0" Then
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
Public Class NewOptionScreen
|
Imports P3D.Screens.UI
|
||||||
|
|
||||||
|
Public Class NewOptionScreen
|
||||||
|
|
||||||
Inherits Screen
|
Inherits Screen
|
||||||
Dim TextSpeed As Integer = 2
|
Dim TextSpeed As Integer = 2
|
||||||
|
@ -551,8 +553,8 @@
|
||||||
Dim halfWidth As Integer = CInt(Core.windowSize.Width / 2)
|
Dim halfWidth As Integer = CInt(Core.windowSize.Width / 2)
|
||||||
Dim halfHeight As Integer = CInt(Core.windowSize.Height / 2)
|
Dim halfHeight As Integer = CInt(Core.windowSize.Height / 2)
|
||||||
|
|
||||||
Canvas.DrawRectangle(New Rectangle(halfWidth - 400, halfHeight - 232, 260, 32), New Color(84, 198, 216, mainBackgroundColor.A))
|
Canvas.DrawRectangle(New Rectangle(halfWidth - 400, halfHeight - 232, 260, 32), New Color(ColorProvider.MainColor.R, ColorProvider.MainColor.G, ColorProvider.MainColor.B, mainBackgroundColor.A))
|
||||||
Canvas.DrawRectangle(New Rectangle(halfWidth - 140, halfHeight - 216, 16, 16), New Color(84, 198, 216, mainBackgroundColor.A))
|
Canvas.DrawRectangle(New Rectangle(halfWidth - 140, halfHeight - 216, 16, 16), New Color(ColorProvider.MainColor.R, ColorProvider.MainColor.G, ColorProvider.MainColor.B, mainBackgroundColor.A))
|
||||||
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 140, halfHeight - 232, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 140, halfHeight - 232, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
||||||
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 124, halfHeight - 216, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 124, halfHeight - 216, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
||||||
|
|
||||||
|
@ -950,7 +952,7 @@
|
||||||
d.Add(0, Localization.GetString("option_screen_graphics_renderdistance_tiny", "Tiny"))
|
d.Add(0, Localization.GetString("option_screen_graphics_renderdistance_tiny", "Tiny"))
|
||||||
d.Add(1, Localization.GetString("option_screen_graphics_renderdistance_small", "Small"))
|
d.Add(1, Localization.GetString("option_screen_graphics_renderdistance_small", "Small"))
|
||||||
d.Add(2, Localization.GetString("option_screen_graphics_renderdistance_normal", "Normal"))
|
d.Add(2, Localization.GetString("option_screen_graphics_renderdistance_normal", "Normal"))
|
||||||
d.Add(3, Localization.GetString("option_screen_graphics_renderdistance_far","Far"))
|
d.Add(3, Localization.GetString("option_screen_graphics_renderdistance_far", "Far"))
|
||||||
d.Add(4, Localization.GetString("option_screen_graphics_renderdistance_extreme", "Extreme"))
|
d.Add(4, Localization.GetString("option_screen_graphics_renderdistance_extreme", "Extreme"))
|
||||||
Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 100), 400, Localization.GetString("option_screen_graphics_renderdistance", "Render Distance"), Me.RenderDistance, 0, 4, AddressOf ChangeRenderDistance, d, 2))
|
Me.ControlList.Add(New ScrollBar(New Vector2(Delta_X + 100, Delta_Y + 100), 400, Localization.GetString("option_screen_graphics_renderdistance", "Render Distance"), Me.RenderDistance, 0, 4, AddressOf ChangeRenderDistance, d, 2))
|
||||||
|
|
||||||
|
|
|
@ -251,8 +251,8 @@ Public Class PartyScreen
|
||||||
Dim halfWidth As Integer = CInt(Core.windowSize.Width / 2)
|
Dim halfWidth As Integer = CInt(Core.windowSize.Width / 2)
|
||||||
Dim halfHeight As Integer = CInt(Core.windowSize.Height / 2)
|
Dim halfHeight As Integer = CInt(Core.windowSize.Height / 2)
|
||||||
|
|
||||||
Canvas.DrawRectangle(New Rectangle(halfWidth - 400, halfHeight - 232, 320, 32), New Color(84, 198, 216, mainBackgroundColor.A))
|
Canvas.DrawRectangle(New Rectangle(halfWidth - 400, halfHeight - 232, 320, 32), New Color(ColorProvider.MainColor.R, ColorProvider.MainColor.G, ColorProvider.MainColor.B, mainBackgroundColor.A))
|
||||||
Canvas.DrawRectangle(New Rectangle(halfWidth - 400 + 320, halfHeight - 216, 16, 16), New Color(84, 198, 216, mainBackgroundColor.A))
|
Canvas.DrawRectangle(New Rectangle(halfWidth - 400 + 320, halfHeight - 216, 16, 16), New Color(ColorProvider.MainColor.R, ColorProvider.MainColor.G, ColorProvider.MainColor.B, mainBackgroundColor.A))
|
||||||
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 400 + 320, halfHeight - 232, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 400 + 320, halfHeight - 232, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
||||||
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 400 + 320 + 16, halfHeight - 216, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
SpriteBatch.Draw(_texture, New Rectangle(halfWidth - 400 + 320 + 16, halfHeight - 216, 16, 16), New Rectangle(80, 0, 16, 16), mainBackgroundColor)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue