Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gm/ObjectCreationView] Allow filtering/sorting ship lists #1932

Open
oznogon opened this issue Mar 4, 2023 · 2 comments
Open

[gm/ObjectCreationView] Allow filtering/sorting ship lists #1932

oznogon opened this issue Mar 4, 2023 · 2 comments

Comments

@oznogon
Copy link
Contributor

oznogon commented Mar 4, 2023

Splitting from #1926.

@hemmond:

Second idea: When spawning ships in GM interface, could we have more filters than just NPC/Player ships? For example by class? Science database has it, but in GM screen I need to remember every ship in the list by heart or skip most of them and just use that few I remember.

@oznogon:

The two current splits are keyed by ship type as defined in the template. Keeping CPU and Player ship lists separate while adding another criteria requires a multi-dimensional approach to cycling the ship list.

Alternatively, we can optionally change the ship list order. It's currently hardcoded to alphabetical on ship template locale name, but there's not much reason we can't add a control to include additional sort parameters, such as by class.

@oznogon
Copy link
Contributor Author

oznogon commented Mar 4, 2023

So sorting the list by class and subclass is indeed pretty straightforward, by fetching the class and subclass along with the template name and then extending the sort to sort by class first, then subclass, then alphabetically:

image

But the interface for the sorted result isn't as straightforward. Those "headings" are fake entries that create the next listed ship. GuiListbox doesn't provide headings or separators. Without the fake headings, the list is even harder to parse than when it's sorted only alphabetically, unless you already know what the classes are (in which case, you don't need to sort by class).

So the question is, is it better to use one list and make sorting more flexible - which could retain the default behavior for those who want it, but also requires extending GuiListbox to allow headings, which might also help with #1925's problem of organizing ships in the science DB - or is it better to make the ship list paged using a GuiSelector, which would add more clicks/taps each time the GM wants to add a ship?

@hemmond
Copy link
Contributor

hemmond commented Mar 8, 2023

Not sure if this is possible: What about "sorting" selector under CPU/player ship selector, which will enable sorting: Alphabetical sort (current behaviour), Sort by class (Only # # CLASS fake headers and all ships of class sorted alphabetically), Sort by sub-class (as seen on the screenshot: # # CLASS: SUB-CLASS fake headers). Default on GM screen start-up could be Alphabetical sort and it could remember the sorting option GM set. That would eliminate some of the clicks overhead for GM when spawning a ship.

Extending GuiListbox with headings could be nice. There would be then potential to extend functionality with collapse/expand option (that will collapse/expand all items under this heading up to next heading). That could also be useful in science DB (collapsing sub-classes that are useless to science officer for quick analysis of possibilities might be nice).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants