Solaire / GLC

Lightweight, console-based, tool which automatically detects installed games and displays them to the user.
GNU General Public License v3.0
16 stars 3 forks source link

In list mode, show small icons to left #32

Open Nutzzz opened 3 years ago

Nutzzz commented 3 years ago

This feature is partly implemented. To test the current state, set num_list_icons_max_size_in_characters to 2, and flag_single_column_list_is_default to True (for the latter, you can also use the ] or [ keys to switch between grid and list).

Unfortunately, it seems we need to redraw all icons below the currently chosen position when moving up and down the list. It can take a while for Windows to cache all the icons, but given that it (sometimes) works pretty well.

Current issues:

  1. Sometimes when going between platform and game, all or most icons aren't displayed. This often happens with paging up and down as well. Based on my experience with the larger selection icon, we might just need to throw in a short delay between clearing the screen and attempting to show the icons.
  2. It doesn't do the right thing If paging is disabled and items overflow the window.
  3. We should constrain the y-size to 1 and not try to maintain aspect ratio.
Nutzzz commented 3 years ago

Fixes for 1. and 3. above are in the latest commit to my fork.

I think for now I'll just disable these icons when paging is disabled (with more than one page of items) to address number 2. EDIT: Done

Add to that:

  1. [really just remnant of 1.] The first time an arrow key is pressed after a given page is shown, the icons that are below the entry point flash (clear and re-appear) [on the first run of UpdateMenu() ], but after that no more flashes occur until the page changes again. Hopefully I can fix that assuming it isn't necessary.
  2. Cancel background task if view changes (otherwise you might get icons from the previous view).