Jeff Posted July 17, 2011 Author Share Posted July 17, 2011 so, I had a nice and dandy system for moving the little inventory, character, spell, etc menus around on the screen. I used this tutorial: http://www.touchofdeathforums.com/smf/index.php/topic,67261.0.htmlHowever I noticed that using this system, it is a pain to put spells in the hotbar, and whenever you click on an item in a menu that's draggable it also moves the menu. So I came up with a system like this:```Sub picCharacter_MouseDownIf Y < picCharacter.height - 258 Then XM1 = X YM1 = Y cb = 1 End If``````Sub picCharacter_MouseMoveIf Button = 1 Then If cb = 1 Then picCharacter.Left = picCharacter.Left + X - XM1 picCharacter.top = picCharacter.top + Y - YM1 End If End If``````Private Sub picCharacter_MouseUpcb = 0```this code makes it so only the top part of the menu is draggable, but the problem is that it only responds sometimes, as if cb would sometimes equal zero.Why is this?Thanks! :D 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