soxzer Posted January 10, 2019 Posted January 10, 2019 (edited) Hello, i was working on an inventory system and wanted to use drag'n'drop like RPG inventory system, it's working on firefox, but doesn't work in game do you know how to do a drag'n'drop or tell me if i forgot something. i included <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="js/main.js"></script> and just started a sortable with refreshSortableInventoryList(); function refreshSortableInventoryList() { $('.item-cell').sortable({ connectWith: '.item-cell', placeholder: '.item-sortable-placeholder', receive: function(event, ui) { the rest of the code won't be interesting for debug. Edited January 10, 2019 by soxzer
Pilatus Posted January 13, 2019 Posted January 13, 2019 It wont work this way, something to do with direct X. You can still do it by coding the drag and drop system yourself, by catching the mouse position and moving the object accordingly
soxzer Posted January 13, 2019 Author Posted January 13, 2019 Do you know what i have to do with direct X and if i can or if it needed to be done by Direct X themselve. Have u got an example for a drag'n'drop without any JS drag event ? should i just do something like On click -> take item under mouse pos -> follow mouse pos each clock -> at click on another case -> drop current clicked item in the case
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