Author Topic: Displays menu // Filter displays or use several lists ?  (Read 948 times)

Zdouf

  • Newbie
  • *
  • Posts: 6
    • View Profile
Displays menu // Filter displays or use several lists ?
« on: August 27, 2023, 03:18:36 AM »
Hello,

From the DISPLAY MENU (not a "regular" display), I'd like to be able to choose between :
- systems (CPS1, CPS2, MVS...),
- manufacturers (ADK,Capcom, Cave...) or
- genre (Shmups, VS fighters...)
with a SpinWheel . There's no filter possible in "displays" menu. Even adding a display as a favorite cannot be usable (not saved anywhere I think).

"fe.list" is the list of displays. My displays are sorted in this order :
If "fe.list.index <= 10" , there are "systems",
if "fe.list.index > 10 && fe.list.index <= 20" , there are "manufacturers"...

So I'd like to reach my goal using this order. My questions :
- Is it a good idea to reach my goal this way ?
- Is it possible to code for a "jump_to" function to a specific name (ADK, my first manufacturers name for example)? I see I can jump to next letter from options but dunno if I can do it with code to a specific name.
- Is it possible to create 3 lists from fe.list and feed the SpinWheel with one of those lists (overpass fe.list.index) and switch between 3 lists with a signal ( function on_signal( sig ).... for example) ?
- Is it possible to feed a SpinWheel with a range of fe.list (for example indexes from 10 to 20) ?
- Is there a plugin, a module or a setting I haven't seen to easily reach my goal ?
- Create 3 "regular" filtered displays ("Systems", "manufacturers" & "genres") that launch one of the target displays instead of "displays menu" is possible with a script ?
- Any idea ?

Have a nice day.
Johann
« Last Edit: August 27, 2023, 04:55:01 AM by Zdouf »

Zdouf

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Displays menu // Filter displays or use several lists ?
« Reply #1 on: August 27, 2023, 06:42:12 AM »
Ok, just found a simple solution.
In this example, pressing left will reach the first Display of the previous category of the current display:

function on_signal( sig )
{      
    switch ( sig )
    {
        case "left":
           
         if (fe.list.index <10) fe.list.index = 20
         else if (fe.list.index >= 10 && fe.list.index < 20)fe.list.index = 0
         else if (fe.list.index >= 20) fe.list.index = 10;
         return false;

---

Sorry again for asking ;(
Johann