Merge branch 'master' of https://github.com/P3D-Legacy/P3D-Legacy
This commit is contained in:
commit
9e558ca26c
Binary file not shown.
Before Width: | Height: | Size: 362 B After Width: | Height: | Size: 395 B |
Binary file not shown.
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.2 KiB |
|
@ -50,11 +50,11 @@
|
|||
Public Overrides Sub Draw()
|
||||
Me.PreScreen.Draw()
|
||||
|
||||
Canvas.DrawRectangle(New Rectangle(0, 0, Core.ScreenSize.Width, Core.ScreenSize.Height), New Color(0, 0, 0, 150))
|
||||
Canvas.DrawRectangle(New Rectangle(0, 0, Core.windowSize.Width, Core.windowSize.Height), New Color(0, 0, 0, 150))
|
||||
Dim titletext As String = Localization.GetString("pause_menu_title")
|
||||
Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(titletext).X / 2)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, titletext, New Vector2(pX - 7, CInt(160 - FontManager.InGameFont.MeasureString(titletext).Y / 2 + 3)), Color.Black)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, titletext, New Vector2(pX - 10, CInt(160 - FontManager.InGameFont.MeasureString(titletext).Y / 2)), Color.White)
|
||||
Dim pX As Integer = CInt(Core.windowSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(titletext).X / 2)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, titletext, New Vector2(CInt(pX - 7), CInt(160 - FontManager.InGameFont.MeasureString(titletext).Y / 2 + 3)), Color.Black)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, titletext, New Vector2(CInt(pX - 10), CInt(160 - FontManager.InGameFont.MeasureString(titletext).Y / 2)), Color.White)
|
||||
|
||||
If Me.menuIndex = 0 Then
|
||||
DrawMenu()
|
||||
|
@ -65,8 +65,8 @@
|
|||
If Me.canCreateAutosave = False Then
|
||||
Dim autosaveFailText As String = Localization.GetString("pause_menu_autosave_fail")
|
||||
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, autosaveFailText, New Vector2(9, Core.ScreenSize.Height - FontManager.InGameFont.MeasureString(autosaveFailText).Y), Color.Black)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, autosaveFailText, New Vector2(5, Core.ScreenSize.Height - FontManager.InGameFont.MeasureString(autosaveFailText).Y - 4), Color.White)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, autosaveFailText, New Vector2(9, CInt(Core.windowSize.Height - FontManager.InGameFont.MeasureString(autosaveFailText).Y)), Color.Black)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, autosaveFailText, New Vector2(5, CInt(Core.windowSize.Height - FontManager.InGameFont.MeasureString(autosaveFailText).Y - 4)), Color.White)
|
||||
End If
|
||||
|
||||
Dim d As New Dictionary(Of Buttons, String)
|
||||
|
@ -105,12 +105,12 @@
|
|||
End Select
|
||||
|
||||
If i = mainIndex Then
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture(mainTexture, New Rectangle(0, 48, 48, 48)), 2, New Rectangle(CInt(Core.ScreenSize.Width / 2) - 180, 220 + i * 128, 320, 64), True)
|
||||
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
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture(mainTexture, New Rectangle(0, 0, 48, 48)), 2, New Rectangle(CInt(Core.ScreenSize.Width / 2) - 180, 220 + i * 128, 320, 64), True)
|
||||
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.ScreenSize.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), 256 + i * 128), Color.Black)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
@ -124,7 +124,7 @@
|
|||
|
||||
If Core.GameInstance.IsMouseVisible = True Then
|
||||
For i = 0 To 1
|
||||
If Core.ScaleScreenRec(New Rectangle(CInt(Core.ScreenSize.Width / 2) - 180, 220 + i * 128, 320 + 32, 64 + 32)).Contains(MouseHandler.MousePosition) = True Then
|
||||
If Core.ScaleScreenRec(New Rectangle(CInt(Core.windowSize.Width / 2) - 180, 220 + i * 128, 320 + 32, 64 + 32)).Contains(MouseHandler.MousePosition) = True Then
|
||||
Me.mainIndex = i
|
||||
|
||||
If Controls.Accept(True, False) = True Then
|
||||
|
@ -182,9 +182,9 @@
|
|||
#Region "QuitMenu"
|
||||
|
||||
Private Sub DrawQuit()
|
||||
Dim pX As Integer = CInt(Core.ScreenSize.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.ScreenSize.Height / 7.5) + 3 + 110), Color.Black)
|
||||
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 10, CInt(Core.ScreenSize.Height / 7.5) + 110), Color.White)
|
||||
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)
|
||||
|
||||
For i = 0 To 1
|
||||
Dim Text As String = ""
|
||||
|
@ -199,12 +199,12 @@
|
|||
End Select
|
||||
|
||||
If i = quitIndex Then
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture(mainTexture, New Rectangle(0, 48, 48, 48)), 2, New Rectangle(CInt(Core.ScreenSize.Width / 2) - 180 + x, 320, 320, 64), True)
|
||||
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
|
||||
Canvas.DrawImageBorder(TextureManager.GetTexture(mainTexture, New Rectangle(0, 0, 48, 48)), 2, New Rectangle(CInt(Core.ScreenSize.Width / 2) - 180 + x, 320, 320, 64), True)
|
||||
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.ScreenSize.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), 356), Color.Black)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
@ -223,7 +223,7 @@
|
|||
x = 200
|
||||
End If
|
||||
|
||||
If Core.ScaleScreenRec(New Rectangle(CInt(Core.ScreenSize.Width / 2) - 180 + x, 320, 320 + 32, 64 + 32)).Contains(MouseHandler.MousePosition) = True Then
|
||||
If Core.ScaleScreenRec(New Rectangle(CInt(Core.windowSize.Width / 2) - 180 + x, 320, 320 + 32, 64 + 32)).Contains(MouseHandler.MousePosition) = True Then
|
||||
Me.quitIndex = i
|
||||
|
||||
If Controls.Accept(True, False) = True Then
|
||||
|
|
|
@ -110,7 +110,6 @@ Public Class PressStartScreen
|
|||
End Sub
|
||||
|
||||
Public Overrides Sub Update()
|
||||
|
||||
For i = 0 To _entities.Count - 1
|
||||
If i < _entities.Count Then
|
||||
_entities(i).Update()
|
||||
|
@ -191,7 +190,7 @@ Public Class PressStartScreen
|
|||
|
||||
_backgroundRenderer.Begin()
|
||||
Dim blurred = _blurHandler.Perform(target)
|
||||
_backgroundRenderer.Draw(blurred, New Rectangle(0, 0, ScreenSize.Width, ScreenSize.Height), Color.White)
|
||||
_backgroundRenderer.Draw(blurred, New Rectangle(0, 0, windowSize.Width, windowSize.Height), Color.White)
|
||||
|
||||
'_backgroundRenderer.Draw(target, New Rectangle(0, 0, ScreenSize.Width, ScreenSize.Height), Color.White)
|
||||
_backgroundRenderer.End()
|
||||
|
@ -203,8 +202,10 @@ Public Class PressStartScreen
|
|||
End If
|
||||
_shineRenderer.Begin(SpriteSortMode.Texture, BlendState.Additive)
|
||||
|
||||
_logoRenderer.Draw(_logoTexture, New Rectangle(CInt(ScreenSize.Width / 2) - 350, CInt(160 * _fadeInMain), 700, 300), New Color(255, 255, 255, CInt(255 * _logoFade)))
|
||||
_shineRenderer.Draw(_shineTexture, New Rectangle(CInt(ScreenSize.Width / 2 - 250 + Math.Sin(tempF) * 240.0F), CInt(-100 + Math.Sin(tempG) * 10.0F + CInt(160 * _fadeInMain)), 512, 512), New Color(255, 255, 255, CInt(255 * _logoFade)))
|
||||
_logoRenderer.Draw(_logoTexture, New Rectangle(CInt(windowSize.Width / 2 - 350 * SpriteBatch.InterfaceScale), CInt(160 * _fadeInMain + 64),
|
||||
CInt(700 * SpriteBatch.InterfaceScale), CInt(300 * SpriteBatch.InterfaceScale)), New Color(255, 255, 255, CInt(255 * _logoFade)))
|
||||
_shineRenderer.Draw(_shineTexture, New Rectangle(CInt(windowSize.Width / 2 - 250 * SpriteBatch.InterfaceScale + Math.Sin(tempF) * 240.0F), CInt(-100 + Math.Sin(tempG) * 10.0F + CInt(160 * _fadeInMain + 64)),
|
||||
CInt(512 * SpriteBatch.InterfaceScale), CInt(512 * SpriteBatch.InterfaceScale)), New Color(255, 255, 255, CInt(255 * _logoFade)))
|
||||
|
||||
If _fadeInMain = 0F Then
|
||||
If IsCurrentScreen() And Core.GameOptions.ShowGUI Then ' Want to implement fading of text, but core doesn't seem to support this.
|
||||
|
@ -218,11 +219,11 @@ Public Class PressStartScreen
|
|||
|
||||
Dim textSize As Vector2 = FontManager.InGameFont.MeasureString(text)
|
||||
|
||||
GetFontRenderer().DrawString(FontManager.InGameFont, text, New Vector2(ScreenSize.Width / 2.0F - textSize.X / 2.0F,
|
||||
ScreenSize.Height - textSize.Y - 50), _textColor)
|
||||
GetFontRenderer().DrawString(FontManager.InGameFont, text, New Vector2(CInt(windowSize.Width / 2.0F - textSize.X / 2.0F),
|
||||
CInt(windowSize.Height - textSize.Y - 50)), _textColor)
|
||||
|
||||
If ControllerHandler.IsConnected() Then
|
||||
SpriteBatch.Draw(TextureManager.GetTexture("GUI\GamePad\xboxControllerButtonA"), New Rectangle(CInt(ScreenSize.Width / 2 - textSize.X / 2 + FontManager.InGameFont.MeasureString("Press" & " ").X + 2), CInt(ScreenSize.Height - textSize.Y - 58), 40, 40), Color.White)
|
||||
SpriteBatch.Draw(TextureManager.GetTexture("GUI\GamePad\xboxControllerButtonA"), New Rectangle(CInt(windowSize.Width / 2 - textSize.X / 2 + FontManager.InGameFont.MeasureString("Press" & " ").X + 2), CInt(ScreenSize.Height - textSize.Y - 58), 40, 40), Color.White)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
@ -230,7 +231,7 @@ Public Class PressStartScreen
|
|||
_logoRenderer.End()
|
||||
_shineRenderer.End()
|
||||
|
||||
Canvas.DrawRectangle(ScreenSize, New Color(0, 0, 0, CInt(255 * _fadeInMain)))
|
||||
Canvas.DrawRectangle(windowSize, New Color(0, 0, 0, CInt(255 * _fadeInMain)))
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub ChangeTo()
|
||||
|
@ -628,7 +629,7 @@ Public Class NewMainMenuScreen
|
|||
End Sub
|
||||
|
||||
Private Sub UpdateScreenOffset()
|
||||
_screenOrigin = New Vector2(CSng(ScreenSize.Width / 2 - 80 - 180), CSng(ScreenSize.Height / 2 - 80))
|
||||
_screenOrigin = New Vector2(CSng((windowSize.Width / 2 - 80 - 180) * SpriteBatch.InterfaceScale), CSng((windowSize.Height / 2 - 80)))
|
||||
If _screenOffset.X > _screenOffsetTarget.X Then
|
||||
_screenOffset.X = MathHelper.Lerp(_screenOffsetTarget.X, _screenOffset.X, 0.93F)
|
||||
If _screenOffset.X - 0.01F <= _screenOffsetTarget.X Then
|
||||
|
|
Loading…
Reference in New Issue