Author Topic: Thoughts on a global search plugin  (Read 54 times)

j.e.f.f

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Thoughts on a global search plugin
« on: October 05, 2020, 02:21:22 AM »
Hello.  I'm. thinking about how I might create a plugin/module for Attract Mode that allows me to search for any game across all of my active games lists.  Generally I'd want it to work as follows:

  • Index all games lists that are currently active in AM (ideally without needing to create a separate "All Games" list for the purpose of searching)
  • Make search available anywhere (e.g., with a configurable custom hot key)
  • Search is operable by both an attached keyboard as well as with a game controller
  • Search automatically lists results as you type, no need to click on an explicit "search" button, and not by scrolling the current display.  I want to results list to be completely independent of any Display.
  • Results list is includes various information available, such as system, year rating, images, video, etc.
  • Game can be launched from results list OR associated display can be raised with the game preselected
  • Search is preserved as I navigate away from search and back.  What I mean by this is that if I search for, say, "MARIO," a number of results will be presented.  If selecting a result takes me to the game in its associated display, and it turns out not to be the one I was looking for, I'd like to return to the search with my previous search term, result list, and navigation position preserved.
  • Search is preserved, as above, even if I launch a game and return to AM.
  • Since all keyboard keys would be available to type in a search term, I'd want to make sure that other keyboard shortcuts are temporarily suppressed while search is active.[\li]
I'm not an expert in Squirrel, but pretty good with JavaScript and having created my own layout, I feel fairly comfortable attempting to code this myself. I'm more unsure about what is available and possible in AM's environment, in particular, indexing all games and preserving the search function's screen state as I navigate away from it and back.  Ideally I'd like it to be preserved for as long as AM is running, or until I take an action to explicitly clear it.

Before I jump in, does anyone have any thoughts on my points above and how I might approach this from a conceptual standpoint?

Of course, I'm more than willing to share this once it's working, as I believe this a feature many of us will want, and as always, any and all help is greatly appreciated.

Thanks!
 - Jeff