mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-25 23:05:24 +02:00
Fixed attack description outside box & sfx no stop
This commit is contained in:
parent
8a61b2ba14
commit
c695a8c57d
@ -120,26 +120,7 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
With Core.SpriteBatch
|
With Core.SpriteBatch
|
||||||
Dim fullText As String = A.Description
|
Dim Description As String = A.Description.Replace("’", "'").CropStringToWidth(FontManager.MainFont, 240)
|
||||||
Dim t As String = ""
|
|
||||||
Dim i As Integer = 0
|
|
||||||
Dim n As String = ""
|
|
||||||
For i = 0 To fullText.Length - 1
|
|
||||||
Dim c As Char = CChar(fullText(i).ToString().Replace("’", "'"))
|
|
||||||
|
|
||||||
If c = CChar(" ") Then
|
|
||||||
If FontManager.MainFont.MeasureString(n & c).X > 170 Then
|
|
||||||
t &= Environment.NewLine
|
|
||||||
n = ""
|
|
||||||
Else
|
|
||||||
t &= " "
|
|
||||||
n &= " "
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
t &= c
|
|
||||||
n &= c
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
|
|
||||||
Dim power As String = A.Power.ToString()
|
Dim power As String = A.Power.ToString()
|
||||||
If power = "0" Then
|
If power = "0" Then
|
||||||
@ -151,7 +132,7 @@
|
|||||||
acc = "-"
|
acc = "-"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
.DrawString(FontManager.MainFont, "Power: " & power & Environment.NewLine & "Accuracy: " & acc & Environment.NewLine & Environment.NewLine & t, New Vector2(CInt(p.X + 432 - 300 + AttackPos), p.Y + 40), Color.Black)
|
.DrawString(FontManager.MainFont, "Power: " & power & Environment.NewLine & "Accuracy: " & acc & Environment.NewLine & Environment.NewLine & Description, New Vector2(CInt(p.X + 432 - 300 + AttackPos), p.Y + 40), Color.Black)
|
||||||
.Draw(A.GetDamageCategoryImage(), New Rectangle(CInt(p.X + 432 - 144 + AttackPos + 24), CInt(p.Y + 40), 56, 28), Color.White)
|
.Draw(A.GetDamageCategoryImage(), New Rectangle(CInt(p.X + 432 - 144 + AttackPos + 24), CInt(p.Y + 40), 56, 28), Color.White)
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@ -304,7 +285,7 @@
|
|||||||
|
|
||||||
Private Sub FollowUpText()
|
Private Sub FollowUpText()
|
||||||
TextBox.Show("... " & Pokemon.GetDisplayName() & " learned~" & newAttack.Name & "!")
|
TextBox.Show("... " & Pokemon.GetDisplayName() & " learned~" & newAttack.Name & "!")
|
||||||
SoundManager.PlaySound("success_small", False)
|
SoundManager.PlaySound("success_small", True)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
Loading…
x
Reference in New Issue
Block a user