ThibautSF / ParadoxosModManager

Software to manage mods for recent Paradox games
36 stars 6 forks source link

[Minor] Order the configurations #8

Open NicolasGrosjean opened 7 years ago

NicolasGrosjean commented 7 years ago

The configurations are ordered by their creation date. We can imagine to sort them according

Or we can simply let the user choose the order with arrows.

ThibautSF commented 6 years ago

We can let the user choose a weight (integer) when he create/modify a list. It will need a default value (for previous lists or if user don't choose a weight), and symbolize infinity weight (new lists with no weight set will be at the end)

ModLists will be ordered by weight→name→nbOfMods Add arrows next tableview to up/down weight

NicolasGrosjean commented 6 years ago

Put some weights is not user friendly because it is manual and so add more configuration to do, contrary to automatic ordering by frequency usage.

Arrows in columns names of the new table view is more user friendly because very intuitive.

NicolasGrosjean commented 6 years ago

Arrows work only for the last column : image

ThibautSF commented 6 years ago

It's because i forgot to disable the column when i added it... image

Because in previous versions, sort options caused selection bugs.

ThibautSF commented 6 years ago

Now it looks like to work, except sort is bad : image

image

NicolasGrosjean commented 6 years ago

Sorting is according to ASCII code so the non letters character give a non natural order.

We can maybe add a comparator which doesn't care about non-alphanumeric characters.

ThibautSF commented 6 years ago

From : https://docs.oracle.com/javase/8/javafx/api/javafx/scene/control/TableColumnBase.html#setComparator-java.util.Comparator- http://blog.professional-webworkx.de/javafx8-add-a-custom-comparator-to-the-tableviews-column/

// add a new Comparator to the eMail-Column
eMailCol.setComparator((email1, email2) -> email1.compareToIgnoreCase(email2));
personTable.getColumns().addAll(firstNameCol, lastNameCol, eMailCol);

For ModList order (in ListManager) i also found those drag&drop example : https://gist.github.com/jewelsea/7821196 https://stackoverflow.com/questions/12353576/drag-drop-in-javafx-table

NicolasGrosjean commented 6 years ago

Someone in the Discord asked to sort the modlist