hey guys
ive recently started making an RPG and i dont know how many of you have played diablo, but thats the kind of inventory i am going for. its a basic drag and drop kind of inventory except that while some items do only take up one inventory spot, most take up more. the potions and that kind of small stuff arent an issue but when you get the swords and the armor, that require a number of spots, i ran into an issue. i will try to post a screenshot to indicate what i mean.
ok, now i can get all the items to move around nicely and all that. my problem is (and youll probably need to look at the screenshot to get past my bad explanation) that you can grab the item at say the bottom right, and so when the drag box appears, the cursor is always at its bottom right. when u let go of the item, it appears in your inventory with the items top left corner being where the mouse was, instead of where the top left corner of the drag box was. anybody have any ideas that may help? all ideas will be greatly apreciated.
matt
edit: attachment troubles
Last edited by asilaydying; Jun 22nd, 2006 at 11:20 PM.
Reason: sorry jpeg was unreadable.. replaced with bmp i think
offsetY = Y - Ypositionofitem. Then take this value away from the mouse position to get the top left of the item. Do this calculation in the mouse down event.
Rich
A)bort, R)etry, I)nfluence with large hammer.
Please take a moment to rate useful posts.
thanks alot Rich. it was just a matter of finding the right way about it because mousedown didnt register unless it was a rightclicked. something to do with my drag drop system maybe? but its all sorted now.
on a completely unrelated note, is it possible to run my application in full screen mode? or does visual basic not support this?
yeah just find the form property to remove the bluebar at the top, i can never remeber what its called something like control box then you can just maxize it and it will cover the whole screen.
Rich
A)bort, R)etry, I)nfluence with large hammer.
Please take a moment to rate useful posts.