DICE PACKS BUNDLE

Thread: Sorting powers

  1. #1

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    407

    Sorting powers

    I'm trying to implement sorting for powers. I've implemented a onInit function in record_char_powers.xml, windowlist powers, like so:

    Code:
    function onInit()
            if super and super.onInit then
                    super.onInit()
    	end
    	applySort();
    	return true;
    end
    and I also added a "applySort" function call to onDrop, but nothing happens, so either I must do something more or do it in another way. Any pointers would be appreciated.

  2. #2
    The windowlist itself will need either a <sortby> tag or a onSortCompare(w1, w2) function within the windowlist control itself. applySort() just forces it to run through either option I provided earlier.
    Dominic Morta
    Ruleset Developer
    Smiteworks

    How to zip up your campaign if the Developers ask for it-How to zip up your campaign if the Developers ask for it

    How to provide an Unity Connection issue?-Connection Issues and What to Provide

    Unity Updater issue?-Updater Issues

    Classic and Unity Port Forwarding?-Fantasy Grounds Connections Explained

    Comcast or Cox ISP User?-Comcast XFinity and Cox Users

    Have a suggestion?-Feature Request

  3. #3

    Join Date
    Mar 2009
    Location
    Lidingö, Sweden, Europe
    Posts
    407
    Thanks, that did solve the issue. I now got powers sorted by their names.

Thread Information

Users Browsing this Thread

There are currently 3 users browsing this thread. (1 members and 2 guests)

  1. peterb

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Fantasy Grounds Merchandise

Log in

Log in