Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Another Visual Inventory
#9
Ligaman Wrote:It works ok but I cant click on the items displayed neither dbl click or right click to drop.The items are unselectable.
Some help?

Did you put the code in frmMirage ?

[code] Private Sub picVisInv_DblClick()
Dim i As Long
Dim InvNum As Long

InvNum = IsItem(InvPosX, InvPosY)

If InvNum 0 Then

If GetPlayerInvItemNum(MyIndex, InvNum) = ITEM_TYPE_NONE Then Exit Sub

Call SendUseItem(InvNum)
Exit Sub
End If

End Sub

Private Sub picVisInv_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Long
Dim InvNum As Long

If Button = 2 Then

InvNum = IsItem(X, Y)

If InvNum 0 Then

If Item(GetPlayerInvItemNum(MyIndex, InvNum)).Type = ITEM_TYPE_CURRENCY Then
frmDrop.Show vbModal
Else
Call SendDropItem(InvNum, 0)
End If
End If
End If
End Sub

Private Sub picVisInv_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim i As Long
Dim InvNum As Long
Dim ItemNum As Long

InvPosX = X
InvPosY = Y

InvNum = IsItem(X, Y)

If InvNum 0 Then

ItemNum = GetPlayerInvItemNum(MyIndex, InvNum)

lblItemName.Caption = Trim$(Item(ItemNum).Name)

picItemDesc.top = (Y + (picItemDesc.Height * 0.5)) + picVisInv.top + 5
picItemDesc.Left = (X - picItemDesc.Width) + picVisInv.Left

picItemDesc.Visible = True
Exit Sub
End If

picItemDesc.Visible = False
End Sub

Private Function IsItem(ByVal X As Single, ByVal Y As Single) As Long
Dim tempRec As RECT
Dim i As Long

For i = 1 To MAX_INV
If GetPlayerInvItemNum(MyIndex, i) > 0 And GetPlayerInvItemNum(MyIndex, i) = tempRec.Left And X = tempRec.top And Y
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)