WD RPG WD Posted January 10, 2011 Author Share Posted January 10, 2011 Alright. I havnt been here in a while..I cant remove the items from my bank. When I highlight an item in the bank the "information" pops up in front of the item and I cant click on it. Any advice on how to solve this problem?[![](http://s4.postimage.org/1qhkzhhwk/menusg.jpg)](http://postimage.org/image/1qhkzhhwk/) Link to comment Share on other sites More sharing options...
Robin Posted January 10, 2011 Share Posted January 10, 2011 Add an offset to the mouse over event. Link to comment Share on other sites More sharing options...
WD RPG WD Posted January 11, 2011 Author Share Posted January 11, 2011 >! ' bankPrivate Sub picbank_DblClick()Dim bankNum As Long>! DragBankSlotNum = 0>! bankNum = IsBankItem(BankX, BankY) If bankNum <> 0 Then If GetBankItemNum(bankNum) = ITEM_TYPE_NONE Then Exit Sub If Item(GetBankItemNum(bankNum)).Type = ITEM_TYPE_CURRENCY Then CurrencyMenu = 3 ' withdraw lblCurrency.Caption = "How many do you want to withdraw?" tmpCurrencyItem = bankNum txtCurrency.text = vbNullString picCurrency.Visible = True txtCurrency.SetFocus Exit Sub End If WithdrawItem bankNum, 0 Exit Sub End IfEnd Sub>! Private Sub picbank_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)Dim bankNum As Long bankNum = IsBankItem(x, y) If bankNum <> 0 Then If Button = 1 Then DragBankSlotNum = bankNum End If End IfEnd Sub>! Private Sub picbank_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)Dim i As LongDim rec_pos As RECT' TODO : Add sub to change bankslots client side first so there's no delay in switching If DragBankSlotNum > 0 Then For i = 1 To MAX_BANK With rec_pos .top = BankTop + ((BankOffsetY + 32) * ((i - 1) \ BankColumns)) .Bottom = .top + PIC_Y .left = BankLeft + ((BankOffsetX + 32) * (((i - 1) Mod BankColumns))) .Right = .left + PIC_X End With>! If x >= rec_pos.left And x <= rec_pos.Right Then If y >= rec_pos.top And y <= rec_pos.Bottom Then If DragBankSlotNum <> i Then ChangeBankSlots DragBankSlotNum, i Exit For End If End If End If Next End If>! DragBankSlotNum = 0 picTempBank.Visible = FalseEnd Sub>! Private Sub picbank_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)Dim bankNum As Long, itemnum As Long, ItemType As LongDim x2 As Long, y2 As Long>! BankX = x BankY = y If DragBankSlotNum > 0 Then Call BltBankItem(x + picBank.left, y + picBank.top) Else bankNum = IsBankItem(x, y) If bankNum <> 0 Then x2 = x + picBank.left + 2 y2 = y + picBank.top + 2 UpdateDescWindow Bank.Item(bankNum).num, Bank.Item(bankNum).Value, x2, y2 Exit Sub End If End If frmMain.picItemDesc.Visible = False LastBankDesc = 0End Sub>! Private Function IsBankItem(ByVal x As Single, ByVal y As Single) As LongDim tempRec As RECTDim i As Long>! IsBankItem = 0 For i = 1 To MAX_BANK If GetBankItemNum(i) > 0 And GetBankItemNum(i) <= MAX_ITEMS Then With tempRec .top = BankTop + ((BankOffsetY + 32) * ((i - 1) \ BankColumns)) .Bottom = .top + PIC_Y .left = BankLeft + ((BankOffsetX + 32) * (((i - 1) Mod BankColumns))) .Right = .left + PIC_X End With If x >= tempRec.left And x <= tempRec.Right Then If y >= tempRec.top And y <= tempRec.Bottom Then IsBankItem = iI assume it goes somewhere in here? I'm not much of a programmer so I'm not sure how I would do what you're saying. I've looked around and found very little help but I think I found where it goes. Link to comment Share on other sites More sharing options...
Robin Posted January 11, 2011 Share Posted January 11, 2011 ```x2 = x + picBank.left + 2y2 = y + picBank.top + 2```Add an offset to that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now