Je te remercie amplement pour ce code source, je pense l'utiliser pour mon bot "Linabot" je ferai bien entendu une petite dédicace sur le bot.
Je dois cependant le rendre moins lourd, car il consomme énormément pour afficher les cases.
En tout cas grâce à vous, il sera plus simple pour les utilisateurs d'utiliser les maps =)
Pour ceux qui aimerai éviter de perdre les couleurs quand vous passez la souris sur une case, il suffit juste de faire ça :
Private Sub renderCell(left As Point, top As Point, right As Point, down As Point, count As Integer, color As Color)
Dim cell As New DiamondPictureBox()
cell.BackColor = color
cell.Size = New Size(36, 18)
cell.Location = left
cell.Name = count
AddHandler cell.Click, Sub(e_sender, eventargs)
MsgBox(e_sender.Name)
End Sub
AddHandler cell.MouseMove, Sub(e_sender, eventargs)
cell.BackColor = Color.Teal
End Sub
AddHandler cell.MouseLeave, Sub(e_sender, eventargs)
If color = Color.DimGray Then
cell.BackColor = Color.DimGray
Else
cell.BackColor = Color.DarkGray
End If
End Sub
IsometricGrid.Controls.Add(cell)
End Sub