2016-09-07 18:50:38 +02:00
|
|
|
|
Namespace GameJolt
|
|
|
|
|
|
|
|
|
|
Public Class GTSInboxScreen
|
|
|
|
|
|
|
|
|
|
Inherits Screen
|
|
|
|
|
|
|
|
|
|
Dim InboxList As New List(Of GTSDataItem)
|
|
|
|
|
|
|
|
|
|
Dim Loaded As Boolean = False
|
|
|
|
|
Dim Selected As Integer = -1
|
|
|
|
|
Dim ScrollIndex As Integer = 0
|
|
|
|
|
Dim Emblem As Emblem = Nothing
|
|
|
|
|
|
|
|
|
|
Dim ResultsFound As Integer = 0
|
|
|
|
|
Dim ResultsLoaded As Integer = 0
|
|
|
|
|
Dim Searching As Boolean = False
|
|
|
|
|
Dim Loading As Boolean = False
|
|
|
|
|
|
|
|
|
|
Public Sub New(ByVal currentScreen As Screen)
|
|
|
|
|
Me.PreScreen = currentScreen
|
|
|
|
|
Me.Identification = Identifications.GTSInboxScreen
|
|
|
|
|
|
|
|
|
|
Me.CanBePaused = False
|
|
|
|
|
Me.CanChat = False
|
|
|
|
|
Me.CanDrawDebug = True
|
|
|
|
|
Me.CanMuteMusic = True
|
|
|
|
|
Me.CanTakeScreenshot = True
|
|
|
|
|
Me.MouseVisible = True
|
|
|
|
|
|
|
|
|
|
Me.Loading = True
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Overrides Sub Update()
|
|
|
|
|
For i = 0 To GTSMainScreen.Furrs.Count - 1
|
|
|
|
|
If i < GTSMainScreen.Furrs.Count Then
|
|
|
|
|
Dim f As Furr = GTSMainScreen.Furrs(i)
|
|
|
|
|
If f.IsOutOfBorder() = True Then
|
|
|
|
|
GTSMainScreen.Furrs.Remove(f)
|
|
|
|
|
i -= 1
|
|
|
|
|
Else
|
|
|
|
|
f.Update()
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
Next
|
|
|
|
|
|
|
|
|
|
If Searching = True And Loading = False Then
|
|
|
|
|
If ResultsFound = ResultsLoaded Then
|
|
|
|
|
Searching = False
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If Core.Random.Next(0, 100) = 0 Then
|
|
|
|
|
GTSMainScreen.Furrs.Add(New Furr())
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
InboxList = (From d As GTSDataItem In InboxList Order By CInt(d.TradeID) Ascending).ToList()
|
|
|
|
|
|
|
|
|
|
If Loaded = False Then
|
|
|
|
|
Dim APICall As New APICall(AddressOf GotKeys)
|
|
|
|
|
APICall.GetKeys(False, "GTSTradeV" & GTSMainScreen.GTSVersion & "|Got|*|" & Core.GameJoltSave.GameJoltID & "|*|*|Pokemon 3D|*|*")
|
|
|
|
|
Loaded = True
|
|
|
|
|
Loading = True
|
|
|
|
|
Else
|
|
|
|
|
If Me.InboxList.Count > 0 Then
|
|
|
|
|
For i = 0 To 5
|
|
|
|
|
If i < Me.InboxList.Count Then
|
|
|
|
|
If New Rectangle(116, 148 + i * 64, 64, 64).Contains(MouseHandler.MousePosition) = True Then
|
|
|
|
|
If Controls.Accept(True, True) = True Then
|
|
|
|
|
If Selected = i + ScrollIndex Then
|
|
|
|
|
Selected = -1
|
|
|
|
|
Else
|
|
|
|
|
Selected = i + ScrollIndex
|
Fix audio engine & contentpacks (#35)
* Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb)
Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues.
The game now directly loads .ogg files instead of the .wma/.xnb combination from before.
ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks).
To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen.
* Delete GameController.vb
* Add gamecontroller.vb back
* Fix sfx missing
* Battleintro doodle now doesn't loop anymore (for no trainer)
Changed the shutter sound (aka Large Door sound) to something more large door-y
Made the enter sound slightly louder
The enter sound now plays when going through any warp to or from an indoor map (including falling through holes)
The flying sound effect is played earlier in the animation after selecting a location
Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy"
The bump noise now also plays when bumping into something in first person
Fixed small gap between the end of the intro song and the start of the main song
Replaced some songs with better songs
* Fixed some more intro issues
* Forgot to change a thing
* Fixed an error where the main music would play, ignoring the muted musicmanager.
* fix indenting in musicmanager
* The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music.
* Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not.
* Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb.
* Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter.
* Added more music commands, added quite some menu select noises, will add more later
* More select sound effects!
* Fix music not resuming after soundeffect
* Trainer using item now plays the single_heal soundeffect
* Pokémon cries now sound louder
* Possibly fixing crash when playing Pokémon cry at volume higher than 0.71
* Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720.
* Sound effects now sound louder
* Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720."
This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea.
* Fixed the cause of why the title screen music plays even when the game is muted
* Tabs to spaces
* Revert
Co-authored-by: darkfire006 <blazer257@live.com>
Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com>
Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com>
Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
|
|
|
|
SoundManager.PlaySound("select")
|
2016-09-07 18:50:38 +02:00
|
|
|
|
Emblem = New Emblem(InboxList(Selected).FromUserID, 0)
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
Next
|
|
|
|
|
|
|
|
|
|
If InboxList.Count > 6 Then
|
|
|
|
|
If Controls.Up(True, True, True, True) = True Then
|
|
|
|
|
If Controls.ShiftDown() = True Then
|
|
|
|
|
Me.ScrollIndex -= 5
|
|
|
|
|
Else
|
|
|
|
|
Me.ScrollIndex -= 1
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
If Controls.Down(True, True, True, True) = True Then
|
|
|
|
|
If Controls.ShiftDown() = True Then
|
|
|
|
|
Me.ScrollIndex += 5
|
|
|
|
|
Else
|
|
|
|
|
Me.ScrollIndex += 1
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Me.ScrollIndex = ScrollIndex.Clamp(0, Me.InboxList.Count - 6)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If Selected > -1 Then
|
|
|
|
|
If New Rectangle(600, 440, 32 * 3 + 64, 32).Contains(MouseHandler.MousePosition) = True Then
|
|
|
|
|
If Controls.Accept(True, False) = True Then
|
|
|
|
|
If Core.Player.Pokemons.Count < 6 Then
|
Fix audio engine & contentpacks (#35)
* Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb)
Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues.
The game now directly loads .ogg files instead of the .wma/.xnb combination from before.
ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks).
To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen.
* Delete GameController.vb
* Add gamecontroller.vb back
* Fix sfx missing
* Battleintro doodle now doesn't loop anymore (for no trainer)
Changed the shutter sound (aka Large Door sound) to something more large door-y
Made the enter sound slightly louder
The enter sound now plays when going through any warp to or from an indoor map (including falling through holes)
The flying sound effect is played earlier in the animation after selecting a location
Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy"
The bump noise now also plays when bumping into something in first person
Fixed small gap between the end of the intro song and the start of the main song
Replaced some songs with better songs
* Fixed some more intro issues
* Forgot to change a thing
* Fixed an error where the main music would play, ignoring the muted musicmanager.
* fix indenting in musicmanager
* The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music.
* Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not.
* Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb.
* Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter.
* Added more music commands, added quite some menu select noises, will add more later
* More select sound effects!
* Fix music not resuming after soundeffect
* Trainer using item now plays the single_heal soundeffect
* Pokémon cries now sound louder
* Possibly fixing crash when playing Pokémon cry at volume higher than 0.71
* Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720.
* Sound effects now sound louder
* Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720."
This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea.
* Fixed the cause of why the title screen music plays even when the game is muted
* Tabs to spaces
* Revert
Co-authored-by: darkfire006 <blazer257@live.com>
Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com>
Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com>
Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
|
|
|
|
SoundManager.PlaySound("select")
|
2016-09-07 18:50:38 +02:00
|
|
|
|
WithdrawCurrent()
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If Controls.Dismiss(True, True) = True Then
|
|
|
|
|
If Selected > -1 Then
|
|
|
|
|
Selected = -1
|
|
|
|
|
Else
|
|
|
|
|
Core.SetScreen(Me.PreScreen)
|
|
|
|
|
End If
|
Fix audio engine & contentpacks (#35)
* Replaced existing Gen 2 SFX with better sounding ones (no ugly reverb)
Replaced MediaPlayer with NAudio(and NAudio.Vorbis) for playing music in order to fix random stopping issues.
The game now directly loads .ogg files instead of the .wma/.xnb combination from before.
ContentPacks are now able to replace Music and SFX again (I haven't added a menu yet for choosing ContentPacks).
To make older GameModes work with current versions, you can add the GameMode property EnterType and set it to "1", this will make the game use the older 2D NewGameScreen.
* Delete GameController.vb
* Add gamecontroller.vb back
* Fix sfx missing
* Battleintro doodle now doesn't loop anymore (for no trainer)
Changed the shutter sound (aka Large Door sound) to something more large door-y
Made the enter sound slightly louder
The enter sound now plays when going through any warp to or from an indoor map (including falling through holes)
The flying sound effect is played earlier in the animation after selecting a location
Changed played sound effect when using the Escape Rope to "teleport" instead of "destroy"
The bump noise now also plays when bumping into something in first person
Fixed small gap between the end of the intro song and the start of the main song
Replaced some songs with better songs
* Fixed some more intro issues
* Forgot to change a thing
* Fixed an error where the main music would play, ignoring the muted musicmanager.
* fix indenting in musicmanager
* The music player will now only start playback on a new song if the music player is not muted, fixed the end time calculation of the intro of a song after muting, Music can't be unmuted now as long as a sound effect plays that stops the music.
* Fixed league restplace position, fixed sound effects sharing the volume slider of the music, sound effects are now also muted when pressing M, changed music on/off popup to audio on/off, removed bump delay in first person, added more control on whether played songs should be looping or not.
* Fixed some more scripts that turn on thirdperson mode but don't check if it was on before or set it back to what it was before afterwards, also fixed a small error in creditsscreen.vb.
* Fixed indenting error in musicmanager.vb, fixed an error of mine where the loopsong parameter would be seen as the playintro parameter.
* Added more music commands, added quite some menu select noises, will add more later
* More select sound effects!
* Fix music not resuming after soundeffect
* Trainer using item now plays the single_heal soundeffect
* Pokémon cries now sound louder
* Possibly fixing crash when playing Pokémon cry at volume higher than 0.71
* Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720.
* Sound effects now sound louder
* Revert "Added better quality Pokémon cries, made random overworld cries slightly less loud, added cries for 719 and 720."
This reverts commit 8c9296ed1a82144d17f303a52c3f2e9e65a5bfea.
* Fixed the cause of why the title screen music plays even when the game is muted
* Tabs to spaces
* Revert
Co-authored-by: darkfire006 <blazer257@live.com>
Co-authored-by: JappaWakkaP3D <66885565+JappaWakkaP3D@users.noreply.github.com>
Co-authored-by: JappaWakkaP3D <jasper.speelman@outlook.com>
Co-authored-by: Vitaly Mikhailov <personal@aragas.org>
2020-07-09 19:59:42 +02:00
|
|
|
|
SoundManager.PlaySound("select")
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub WithdrawCurrent()
|
|
|
|
|
Dim APICall As New APICall(AddressOf WithdrawCompleted)
|
|
|
|
|
APICall.RemoveKey(Me.InboxList(Selected).Key, False)
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub WithdrawCompleted(ByVal result As String)
|
|
|
|
|
Dim l As List(Of API.JoltValue) = API.HandleData(result)
|
|
|
|
|
|
|
|
|
|
If CBool(l(0).Value) = True Then
|
|
|
|
|
Core.Player.Pokemons.Add(Me.InboxList(Selected).Pokemon)
|
|
|
|
|
|
|
|
|
|
Dim pokedexType As Integer = 2
|
|
|
|
|
If InboxList(Selected).Pokemon.IsShiny = True Then
|
|
|
|
|
pokedexType = 3
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If InboxList(Selected).Pokemon.IsEgg() = False Then
|
|
|
|
|
Core.Player.PokedexData = Pokedex.ChangeEntry(Core.Player.PokedexData, InboxList(Selected).Pokemon.Number, pokedexType)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Core.Player.SaveGame(False)
|
|
|
|
|
|
|
|
|
|
If Me.PreScreen.Identification = Identifications.GTSMainScreen Then
|
|
|
|
|
CType(Me.PreScreen, GTSMainScreen).PokemonGTSCount -= 1
|
|
|
|
|
CType(Me.PreScreen, GTSMainScreen).InboxPokemon -= 1
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Me.InboxList.RemoveAt(Selected)
|
|
|
|
|
|
|
|
|
|
Selected = -1
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub GotKeys(ByVal result As String)
|
|
|
|
|
Dim l As List(Of API.JoltValue) = API.HandleData(result)
|
|
|
|
|
|
|
|
|
|
If l(1).Value <> "" Then
|
|
|
|
|
ResultsLoaded = 0
|
|
|
|
|
ResultsFound = l.Count - 1
|
|
|
|
|
Searching = True
|
|
|
|
|
Loading = False
|
|
|
|
|
|
|
|
|
|
For Each Item As API.JoltValue In l
|
|
|
|
|
If Item.Name.ToLower() = "key" Then
|
|
|
|
|
Dim APICall As New APICall(AddressOf GotData)
|
|
|
|
|
APICall.GetStorageData(Item.Value, False)
|
|
|
|
|
End If
|
|
|
|
|
Next
|
|
|
|
|
Else
|
|
|
|
|
Searching = False
|
|
|
|
|
Loading = False
|
|
|
|
|
ResultsLoaded = 0
|
|
|
|
|
ResultsFound = 0
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub GotData(ByVal result As String)
|
|
|
|
|
Dim l As List(Of API.JoltValue) = API.HandleData(result)
|
|
|
|
|
|
|
|
|
|
Dim data As String = l(1).Value
|
|
|
|
|
|
|
|
|
|
Me.InboxList.Add(New GTSDataItem(data))
|
|
|
|
|
|
|
|
|
|
ResultsLoaded += 1
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub DrawStringC(ByVal t As String, ByVal p As Vector2)
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, t, New Vector2(p.X + 2, p.Y + 2), Color.Black)
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, t, p, Color.White)
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Overrides Sub Draw()
|
|
|
|
|
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\GTS"), Core.windowSize, New Rectangle(320, 176, 192, 160), Color.White)
|
|
|
|
|
|
|
|
|
|
For Each F As Furr In GTSMainScreen.Furrs
|
|
|
|
|
F.Draw()
|
|
|
|
|
Next
|
|
|
|
|
|
|
|
|
|
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\GTS"), New Rectangle(CInt(Core.windowSize.Width / 2 - 104), CInt(32), 208, 96), New Rectangle(304, 0, 208, 96), Color.White)
|
|
|
|
|
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.InGameFont, "Inbox", New Vector2(132, 100), Color.White)
|
|
|
|
|
|
|
|
|
|
If InboxList.Count > 0 Then
|
|
|
|
|
For i = ScrollIndex To ScrollIndex + 5
|
|
|
|
|
If i < InboxList.Count Then
|
|
|
|
|
Dim Y As Integer = 132 + (i - ScrollIndex) * 64
|
|
|
|
|
Dim D As GTSDataItem = InboxList(i)
|
|
|
|
|
Dim Touching As Boolean = New Rectangle(116, Y + 16, 64, 64).Contains(MouseHandler.MousePosition)
|
|
|
|
|
Dim C As Color = New Color(255, 255, 255, 150)
|
|
|
|
|
If i = Me.Selected Then
|
|
|
|
|
C = New Color(0, 217, 237)
|
|
|
|
|
End If
|
|
|
|
|
If Touching = True Then
|
|
|
|
|
C = Color.White
|
|
|
|
|
End If
|
|
|
|
|
If i = Me.Selected Then
|
|
|
|
|
Canvas.DrawRectangle(New Rectangle(142, Y + 32, 358, 32), C)
|
|
|
|
|
Else
|
|
|
|
|
Canvas.DrawRectangle(New Rectangle(142, Y + 32, 320, 32), C)
|
|
|
|
|
End If
|
|
|
|
|
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\GTS"), New Rectangle(100, Y, 96, 96), New Rectangle(320, 96, 48, 48), Color.White)
|
|
|
|
|
Core.SpriteBatch.Draw(D.Pokemon.GetMenuTexture(), New Rectangle(116, Y + 16, 64, 64), C)
|
|
|
|
|
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, D.Pokemon.GetDisplayName(), New Vector2(198, Y + 37), Color.Black)
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Lv. " & D.Pokemon.Level, New Vector2(360, Y + 37), Color.Black)
|
|
|
|
|
End If
|
|
|
|
|
Next
|
|
|
|
|
Else
|
|
|
|
|
If Searching = True Or Loading = True Then
|
|
|
|
|
DrawStringC("Please wait" & LoadingDots.Dots, New Vector2(132, 160))
|
|
|
|
|
Else
|
|
|
|
|
DrawStringC("There are no Pokémon in your inbox.", New Vector2(132, 160))
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If Selected > -1 Then
|
|
|
|
|
Dim D As GTSDataItem = Me.InboxList(Selected)
|
|
|
|
|
Canvas.DrawRectangle(New Rectangle(500, 164, 600, 352), New Color(255, 255, 255, 150))
|
|
|
|
|
|
|
|
|
|
If D.TradeID <> "" Then
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Transaction ID: " & D.TradeID, New Vector2(510, 166), Color.Black)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
'Pokemon image/data:
|
|
|
|
|
Core.SpriteBatch.Draw(D.Pokemon.GetTexture(True), New Rectangle(500, 164, 128, 128), Color.White)
|
|
|
|
|
|
|
|
|
|
If D.Pokemon.GetDisplayName() <> D.Pokemon.OriginalName Then
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MainFont, D.Pokemon.GetDisplayName(), New Vector2(630, 190), Color.Black)
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MainFont, "/" & D.Pokemon.OriginalName, New Vector2(640, 220), Color.Black)
|
|
|
|
|
Else
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MainFont, D.Pokemon.GetDisplayName(), New Vector2(630, 205), Color.Black)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Dim ItemString As String = "None"
|
|
|
|
|
If Not D.Pokemon.Item Is Nothing Then
|
|
|
|
|
ItemString = " " & D.Pokemon.Item.Name
|
|
|
|
|
Core.SpriteBatch.Draw(D.Pokemon.Item.Texture, New Rectangle(882, 314, 24, 24), Color.White)
|
|
|
|
|
End If
|
|
|
|
|
|
2018-01-07 18:01:32 +01:00
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Level: " & D.Pokemon.Level & Environment.NewLine & Environment.NewLine &
|
|
|
|
|
"Gender: " & D.Pokemon.Gender.ToString() & Environment.NewLine & Environment.NewLine &
|
|
|
|
|
"OT: " & D.Pokemon.CatchTrainerName & "/" & D.Pokemon.OT & Environment.NewLine & Environment.NewLine &
|
|
|
|
|
"Item: " & ItemString & Environment.NewLine & Environment.NewLine &
|
|
|
|
|
"Message: " & Environment.NewLine & D.Message, New Vector2(830, 200), Color.Black)
|
2016-09-07 18:50:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'Stars:
|
|
|
|
|
GTSMainScreen.DrawStars(D.Pokemon.TradeValue, New Vector2(630, 256))
|
|
|
|
|
|
|
|
|
|
'From:
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, "From:", New Vector2(516, 320), Color.Black)
|
|
|
|
|
If Not Emblem Is Nothing Then
|
|
|
|
|
If Emblem.DoneLoading = True Then
|
|
|
|
|
Dim SpriteSize As New Size(CInt(Emblem.SpriteTexture.Width / 3), CInt(Emblem.SpriteTexture.Height / 4))
|
|
|
|
|
Core.SpriteBatch.Draw(Emblem.SpriteTexture, New Rectangle(564, 310, 32, 32), New Rectangle(0, SpriteSize.Height * 2, SpriteSize.Width, SpriteSize.Height), Color.White)
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, Emblem.Username & " (" & Emblem.GameJoltID & ")", New Vector2(600, 320), Color.Black)
|
|
|
|
|
Else
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Loading" & LoadingDots.Dots, New Vector2(564, 320), Color.Black)
|
|
|
|
|
End If
|
|
|
|
|
Else
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Loading" & LoadingDots.Dots, New Vector2(564, 320), Color.Black)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
'To:
|
2018-01-07 18:01:32 +01:00
|
|
|
|
If Core.Player.IsGameJoltSave = True Then
|
2016-09-07 18:50:38 +02:00
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, "To:", New Vector2(516, 360), Color.Black)
|
|
|
|
|
Dim ownEmblem As Emblem = New Emblem(API.username, Core.GameJoltSave.GameJoltID, Core.GameJoltSave.Points, Core.GameJoltSave.Gender, Core.GameJoltSave.Emblem)
|
|
|
|
|
|
|
|
|
|
Dim SpriteSize As New Size(CInt(ownEmblem.SpriteTexture.Width / 3), CInt(ownEmblem.SpriteTexture.Height / 4))
|
|
|
|
|
Core.SpriteBatch.Draw(ownEmblem.SpriteTexture, New Rectangle(564, 350, 32, 32), New Rectangle(0, SpriteSize.Height * 2, SpriteSize.Width, SpriteSize.Height), Color.White)
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, ownEmblem.Username & " (" & ownEmblem.GameJoltID & ")", New Vector2(600, 360), Color.Black)
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
'Buttons:
|
|
|
|
|
If Core.Player.Pokemons.Count < 6 Then
|
|
|
|
|
DrawButton(New Vector2(600, 440), "Withdraw", 3)
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If Me.InboxList.Count > 6 Then
|
|
|
|
|
Canvas.DrawScrollBar(New Vector2(90, 96 + 54), Me.InboxList.Count, 6, ScrollIndex, New Size(6, 380), False, New Color(4, 84, 157), New Color(125, 214, 234))
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, "Version " & GTSMainScreen.GTSVersion, New Vector2(4, Core.windowSize.Height - 1 - FontManager.MiniFont.MeasureString("Version " & GTSMainScreen.GTSVersion).Y), Color.DarkGray)
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub DrawButton(ByVal Position As Vector2, ByVal Text As String, ByVal Size As Integer)
|
|
|
|
|
Dim t As Texture2D = TextureManager.GetTexture("GUI\Menus\GTS")
|
|
|
|
|
|
|
|
|
|
Dim touching As Boolean = New Rectangle(CInt(Position.X), CInt(Position.Y), 64 + Size * 32, 32).Contains(MouseHandler.MousePosition)
|
|
|
|
|
|
|
|
|
|
Dim Y As Integer = 0
|
|
|
|
|
If touching = True Then
|
|
|
|
|
Y = 16
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Core.SpriteBatch.Draw(t, New Rectangle(CInt(Position.X), CInt(Position.Y), 32, 32), New Rectangle(0, Y, 16, 16), Color.White)
|
|
|
|
|
|
|
|
|
|
For i = 1 To Size
|
|
|
|
|
Core.SpriteBatch.Draw(t, New Rectangle(CInt(Position.X + i * 32), CInt(Position.Y), 32, 32), New Rectangle(16, Y, 16, 16), Color.White)
|
|
|
|
|
Next
|
|
|
|
|
|
|
|
|
|
Core.SpriteBatch.Draw(t, New Rectangle(CInt(Position.X + Size * 32 + 32), CInt(Position.Y), 32, 32), New Rectangle(32, Y, 16, 16), Color.White)
|
|
|
|
|
|
|
|
|
|
Dim sizeX As Integer = Size * 32 + 64
|
|
|
|
|
Dim TextSizeX As Integer = CInt(FontManager.MiniFont.MeasureString(Text).X)
|
|
|
|
|
|
|
|
|
|
Core.SpriteBatch.DrawString(FontManager.MiniFont, Text, New Vector2(CSng(Position.X + sizeX / 2 - TextSizeX / 2 - 2), Position.Y + 4), Color.Black)
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Class
|
|
|
|
|
|
|
|
|
|
Public Class GTSDataItem
|
|
|
|
|
|
|
|
|
|
Public Enum SecurityCode
|
|
|
|
|
[Global]
|
|
|
|
|
[Private]
|
|
|
|
|
End Enum
|
|
|
|
|
|
|
|
|
|
Public Enum ActionSwitches
|
|
|
|
|
[Got]
|
|
|
|
|
[Set]
|
|
|
|
|
End Enum
|
|
|
|
|
|
|
|
|
|
Public Key As String
|
|
|
|
|
Public Data As String
|
|
|
|
|
|
|
|
|
|
Public FromUserID As String = ""
|
|
|
|
|
Public ToUserID As String = ""
|
|
|
|
|
Public RequestID As String = ""
|
|
|
|
|
Public RequestLevel As String = ""
|
|
|
|
|
Public RequestItemID As String = ""
|
|
|
|
|
Public RequestGender As String = ""
|
|
|
|
|
Public PokemonData As String = ""
|
|
|
|
|
Public GameMode As String = ""
|
|
|
|
|
Public Message As String = ""
|
|
|
|
|
Public SecurityArea As SecurityCode = SecurityCode.Global
|
|
|
|
|
Public ActionSwitch As ActionSwitches = ActionSwitches.Set
|
|
|
|
|
Public TradeID As String = ""
|
|
|
|
|
|
|
|
|
|
Public Pokemon As Pokemon = Nothing
|
|
|
|
|
|
|
|
|
|
Public Sub New(ByVal FromUserID As String, ByVal ToUserID As String, ByVal RequestID As String, ByVal RequestLevel As String, ByVal RequestItemID As String, ByVal RequestGender As String, ByVal PokemonData As String, ByVal GameMode As String, ByVal Message As String, ByVal SecurityArea As SecurityCode, ByVal ActionSwitch As ActionSwitches, ByVal TradeID As String)
|
|
|
|
|
Me.New(FromUserID & "|" & ToUserID & "|" & RequestID & "|" & RequestLevel & "|" & RequestItemID & "|" & RequestGender & "|" & PokemonData & "|" & GameMode & "|" & Message & "|" & SecurityArea.ToString() & "|" & ActionSwitch.ToString() & "|" & TradeID)
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Public Sub New(ByVal Data As String)
|
|
|
|
|
Me.Data = Data
|
|
|
|
|
Dim arr() As String = Data.Split(CChar("|"))
|
|
|
|
|
|
|
|
|
|
FromUserID = arr(0)
|
|
|
|
|
ToUserID = arr(1)
|
|
|
|
|
RequestID = arr(2)
|
|
|
|
|
RequestLevel = arr(3)
|
|
|
|
|
RequestItemID = arr(4)
|
|
|
|
|
RequestGender = arr(5)
|
|
|
|
|
PokemonData = arr(6).Replace("\""", """")
|
|
|
|
|
GameMode = arr(7).Replace("[ANDAND]", "&")
|
|
|
|
|
Message = arr(8).Replace("\""", """").Replace("[ANDAND]", "&")
|
|
|
|
|
|
|
|
|
|
Dim sec As String = arr(9)
|
|
|
|
|
If sec.ToLower() = "global" Then
|
|
|
|
|
SecurityArea = SecurityCode.Global
|
|
|
|
|
ElseIf sec.ToLower() = "private" Then
|
|
|
|
|
SecurityArea = SecurityCode.Private
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Dim ac As String = arr(10)
|
|
|
|
|
If ac.ToLower() = "got" Then
|
|
|
|
|
ActionSwitch = ActionSwitches.Got
|
|
|
|
|
ElseIf ac = "set" Then
|
|
|
|
|
ActionSwitch = ActionSwitches.Set
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
If PokemonData <> "" Then
|
|
|
|
|
PokemonData = PokemonData.Replace("[ANDAND]", "&")
|
|
|
|
|
|
|
|
|
|
If PokemonData.StartsWith("{") = True And PokemonData.EndsWith("}") = True Then
|
2018-02-21 16:34:06 +01:00
|
|
|
|
Me.Pokemon = P3D.Pokemon.GetPokemonByData(PokemonData)
|
2016-09-07 18:50:38 +02:00
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
TradeID = arr(11)
|
|
|
|
|
|
|
|
|
|
Dim PokemonNumber As Integer = 0
|
|
|
|
|
If Not Me.Pokemon Is Nothing Then
|
|
|
|
|
PokemonNumber = Me.Pokemon.Number
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Me.Key = "GTSTradeV" & GTSMainScreen.GTSVersion & "|" & arr(10) & "|" & arr(0) & "|" & arr(1) & "|" & PokemonNumber.ToString() & "|" & arr(2) & "|Pokemon 3D|" & arr(9) & "|" & TradeID
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
End Class
|
|
|
|
|
|
|
|
|
|
End Namespace
|