Jump to content
RAGE Multiplayer Community

Drag'n'drop bug in CEF with JqueryUi sortable


soxzer
 Share

Recommended Posts

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 by soxzer
Link to comment
Share on other sites

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
 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...