Skip to content

Commit

Permalink
Added customized layouts for the diplays menu/system selection menu
Browse files Browse the repository at this point in the history
- Added new configuration screen: config->Display->Display Menu Options
- Any layout can now be configured as the layout to use for the displays
  menu.  If no layout is configured, then the menu is displayed using the
  default built-in menu
  • Loading branch information
mickelson committed Nov 1, 2016
1 parent 57e7f26 commit 4e8cc1b
Show file tree
Hide file tree
Showing 20 changed files with 397 additions and 104 deletions.
4 changes: 3 additions & 1 deletion Layouts.md
Expand Up @@ -1182,8 +1182,10 @@ otherwise instantiated in a script.
Properties:

* `name` - Get the name of the current display.
* `display_index` - Gett the index of the current display. Use the
* `display_index` - Get the index of the current display. Use the
`fe.set_display()` function if you want to change the current display.
If this value is less than 0, then the 'Displays Menu' (with a custom
layout) is currently showing.
* `filter_index` - Get/set the index of the currently selected filter.
(see `fe.filters` for the list of available filters).
* `index` - Get/set the index of the currently selected game.
Expand Down
7 changes: 7 additions & 0 deletions config/language/de.msg
Expand Up @@ -322,11 +322,13 @@ _help_autolaunch_last_game;Beim Hochfahren automatisch das zuletzt gespielte Spi
Add '$1' to Favourites?;Add '$1' to Favourites?
Add Exception;Add Exception
Add tag: '$1';Add tag: '$1'
Configure / Displays Menu;Configure / Displays Menu
Configure Intro;Configure Intro
Configure Layout;Configure Layout
Create new tag;Create new tag
Custom Arguments;Custom Arguments
Custom Executable;Custom Executable
Default;Default
Default Action;Default Action
Delete game '$1'?;Delete game '$1'?
Delete this Game;Delete this Game
Expand All @@ -340,6 +342,8 @@ Exception Edit;Exception Edit
FileIsAvailable;FileIsAvailable
Intro;Intro
Launch Last Game;Launch Last Game
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Next Game;Next Game
Previous Game;Previous Game
Remove '$1' from Favourites?;Remove '$1' from Favourites?
Expand Down Expand Up @@ -367,6 +371,9 @@ _help_control_prev_game;Set the control(s) that move to the previous game
_help_control_right;Set the control(s) that move the selection right
_help_display_in_cycle;Include this display in the "Previous Display"/"Next Display" cycle?
_help_display_in_menu;Include this display in the "Displays Menu"?
_help_displays_menu;Configure options for the "Displays Menu"
_help_displays_menu_layout;The layout to use for the 'Displays Menu'. Set to 'Default' to use the frontend's built-in menu
_help_displays_menu_prompt;The 'Displays Menu' prompt (i.e. "Select System")
_help_emu_sel_gen_romlist;Generate a Collection/Romlist containing games for multiple emulators
_help_filter_add_exception;Add an exception to this filter. If a game matches an exception (and wasn't filtered out by an earlier rule) it will be listed in the filter
_help_filter_exception;Configure this filter exception. If a game matches an exception it will be listed in the filter. Rules and exceptions get applied in the order that they are listed
Expand Down
3 changes: 3 additions & 0 deletions config/language/en.msg
Expand Up @@ -70,7 +70,10 @@ _help_display_name;The title for this display
_help_display_romlist;The collection/rom list to use for this display
_help_display_sel;Configure display
_help_displays;Configure the romlist/layout groupings (a.k.a. "Displays") that are available to be cycled through in Attract-Mode
_help_displays_menu;Configure options for the "Displays Menu"
_help_displays_menu_exit;Configure whether an Exit option should be provided in the"Displays Menu"
_help_displays_menu_layout;The layout to use for the 'Displays Menu'. Set to 'Default' to use the frontend's built-in menu
_help_displays_menu_prompt;The 'Displays Menu' prompt (i.e. "Select System")
_help_emu_add;Add a new emulator
_help_emu_args;The command line arguments for this emulator. The following get substituted appropriately: [name], [romext], [rompath], [emulator], [romfilename], [system], [systemn]
_help_emu_delete;Delete the entry for this emulator
Expand Down
7 changes: 7 additions & 0 deletions config/language/es.msg
Expand Up @@ -323,11 +323,13 @@ _help_autolaunch_last_game;Lanza automaticamente el útlito juego jugado en el i
Add '$1' to Favourites?;Add '$1' to Favourites?
Add Exception;Add Exception
Add tag: '$1';Add tag: '$1'
Configure / Displays Menu;Configure / Displays Menu
Configure Intro;Configure Intro
Configure Layout;Configure Layout
Create new tag;Create new tag
Custom Arguments;Custom Arguments
Custom Executable;Custom Executable
Default;Default
Default Action;Default Action
Delete game '$1'?;Delete game '$1'?
Delete this Game;Delete this Game
Expand All @@ -341,6 +343,8 @@ Exception Edit;Exception Edit
FileIsAvailable;FileIsAvailable
Intro;Intro
Launch Last Game;Launch Last Game
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Next Game;Next Game
Previous Game;Previous Game
Remove '$1' from Favourites?;Remove '$1' from Favourites?
Expand Down Expand Up @@ -368,6 +372,9 @@ _help_control_prev_game;Set the control(s) that move to the previous game
_help_control_right;Set the control(s) that move the selection right
_help_display_in_cycle;Include this display in the "Previous Display"/"Next Display" cycle?
_help_display_in_menu;Include this display in the "Displays Menu"?
_help_displays_menu;Configure options for the "Displays Menu"
_help_displays_menu_layout;The layout to use for the 'Displays Menu'. Set to 'Default' to use the frontend's built-in menu
_help_displays_menu_prompt;The 'Displays Menu' prompt (i.e. "Select System")
_help_emu_sel_gen_romlist;Generate a Collection/Romlist containing games for multiple emulators
_help_filter_add_exception;Add an exception to this filter. If a game matches an exception (and wasn't filtered out by an earlier rule) it will be listed in the filter
_help_filter_exception;Configure this filter exception. If a game matches an exception it will be listed in the filter. Rules and exceptions get applied in the order that they are listed
Expand Down
7 changes: 7 additions & 0 deletions config/language/fr.msg
Expand Up @@ -327,11 +327,13 @@ $1 Rule(s);$1 Rule(s)
Add '$1' to Favourites?;Add '$1' to Favourites?
Add Exception;Add Exception
Add tag: '$1';Add tag: '$1'
Configure / Displays Menu;Configure / Displays Menu
Configure Intro;Configure Intro
Configure Layout;Configure Layout
Create new tag;Create new tag
Custom Arguments;Custom Arguments
Custom Executable;Custom Executable
Default;Default
Default Action;Default Action
Delete game '$1'?;Delete game '$1'?
Delete this Game;Delete this Game
Expand All @@ -345,6 +347,8 @@ Exception Edit;Exception Edit
FileIsAvailable;FileIsAvailable
Intro;Intro
Launch Last Game;Launch Last Game
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Next Game;Next Game
Play Sound;Play Sound
Previous Game;Previous Game
Expand All @@ -371,6 +375,9 @@ _help_control_prev_page;Set the control(s) that move the selection down one page
_help_control_right;Set the control(s) that move the selection right
_help_display_in_cycle;Include this display in the "Previous Display"/"Next Display" cycle?
_help_display_in_menu;Include this display in the "Displays Menu"?
_help_displays_menu;Configure options for the "Displays Menu"
_help_displays_menu_layout;The layout to use for the 'Displays Menu'. Set to 'Default' to use the frontend's built-in menu
_help_displays_menu_prompt;The 'Displays Menu' prompt (i.e. "Select System")
_help_emu_sel_gen_romlist;Generate a Collection/Romlist containing games for multiple emulators
_help_filter_add_exception;Add an exception to this filter. If a game matches an exception (and wasn't filtered out by an earlier rule) it will be listed in the filter
_help_filter_exception;Configure this filter exception. If a game matches an exception it will be listed in the filter. Rules and exceptions get applied in the order that they are listed
Expand Down
7 changes: 7 additions & 0 deletions config/language/it.msg
Expand Up @@ -389,10 +389,17 @@ _help_control_page_up;Configura i controlli che muovono la selezione una pagina
#
# Strings still needing translation
#
Configure / Displays Menu;Configure / Displays Menu
Configure Layout;Configure Layout
Default;Default
Enter Romlist Name;Enter Romlist Name
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Window (No Border);Window (No Border)
multi;multi
_help_displays_menu;Configure options for the "Displays Menu"
_help_displays_menu_layout;The layout to use for the 'Displays Menu'. Set to 'Default' to use the frontend's built-in menu
_help_displays_menu_prompt;The 'Displays Menu' prompt (i.e. "Select System")
_help_emu_sel_gen_romlist;Generate a Collection/Romlist containing games for multiple emulators
_help_generator_build;Generate romlist with the selected emulator(s)
_help_generator_opt;Set whether this emulator is to be included in the generated romlist
7 changes: 7 additions & 0 deletions config/language/jp.msg
Expand Up @@ -317,11 +317,13 @@ $1 Rule(s);$1 Rule(s)
Add '$1' to Favourites?;Add '$1' to Favourites?
Add Exception;Add Exception
Add tag: '$1';Add tag: '$1'
Configure / Displays Menu;Configure / Displays Menu
Configure Intro;Configure Intro
Configure Layout;Configure Layout
Create new tag;Create new tag
Custom Arguments;Custom Arguments
Custom Executable;Custom Executable
Default;Default
Default Action;Default Action
Delete game '$1'?;Delete game '$1'?
Delete this Game;Delete this Game
Expand All @@ -334,6 +336,8 @@ Exception;Exception
Exception Edit;Exception Edit
Intro;Intro
Launch Last Game;Launch Last Game
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Next Game;Next Game
Next Page;Next Page
Play Sound;Play Sound
Expand Down Expand Up @@ -368,6 +372,9 @@ _help_control_prev_page;Set the control(s) that move the selection down one page
_help_control_right;Set the control(s) that move the selection right
_help_display_in_cycle;Include this display in the "Previous Display"/"Next Display" cycle?
_help_display_in_menu;Include this display in the "Displays Menu"?
_help_displays_menu;Configure options for the "Displays Menu"
_help_displays_menu_layout;The layout to use for the 'Displays Menu'. Set to 'Default' to use the frontend's built-in menu
_help_displays_menu_prompt;The 'Displays Menu' prompt (i.e. "Select System")
_help_emu_sel_gen_romlist;Generate a Collection/Romlist containing games for multiple emulators
_help_filter_add_exception;Add an exception to this filter. If a game matches an exception (and wasn't filtered out by an earlier rule) it will be listed in the filter
_help_filter_exception;Configure this filter exception. If a game matches an exception it will be listed in the filter. Rules and exceptions get applied in the order that they are listed
Expand Down
7 changes: 7 additions & 0 deletions config/language/kr.msg
Expand Up @@ -317,11 +317,13 @@ $1 Rule(s);$1 Rule(s)
Add '$1' to Favourites?;Add '$1' to Favourites?
Add Exception;Add Exception
Add tag: '$1';Add tag: '$1'
Configure / Displays Menu;Configure / Displays Menu
Configure Intro;Configure Intro
Configure Layout;Configure Layout
Create new tag;Create new tag
Custom Arguments;Custom Arguments
Custom Executable;Custom Executable
Default;Default
Default Action;Default Action
Delete game '$1'?;Delete game '$1'?
Delete this Game;Delete this Game
Expand All @@ -334,6 +336,8 @@ Exception;Exception
Exception Edit;Exception Edit
Intro;Intro
Launch Last Game;Launch Last Game
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Next Game;Next Game
Next Page;Next Page
Play Sound;Play Sound
Expand Down Expand Up @@ -368,6 +372,9 @@ _help_control_prev_page;Set the control(s) that move the selection down one page
_help_control_right;Set the control(s) that move the selection right
_help_display_in_cycle;Include this display in the "Previous Display"/"Next Display" cycle?
_help_display_in_menu;Include this display in the "Displays Menu"?
_help_displays_menu;Configure options for the "Displays Menu"
_help_displays_menu_layout;The layout to use for the 'Displays Menu'. Set to 'Default' to use the frontend's built-in menu
_help_displays_menu_prompt;The 'Displays Menu' prompt (i.e. "Select System")
_help_emu_sel_gen_romlist;Generate a Collection/Romlist containing games for multiple emulators
_help_filter_add_exception;Add an exception to this filter. If a game matches an exception (and wasn't filtered out by an earlier rule) it will be listed in the filter
_help_filter_exception;Configure this filter exception. If a game matches an exception it will be listed in the filter. Rules and exceptions get applied in the order that they are listed
Expand Down
7 changes: 7 additions & 0 deletions config/language/msg_template.txt
Expand Up @@ -33,6 +33,7 @@ Comparison;Comparison
Configure;Configure
Configure / Controls;Configure / Controls
Configure / Displays;Configure / Displays
Configure / Displays Menu;Configure / Displays Menu
Configure / Emulators;Configure / Emulators
Configure / Miscellaneous;Configure / Miscellaneous
Configure / Plug-ins;Configure / Plug-ins
Expand All @@ -54,6 +55,7 @@ Custom3;Custom3
Custom4;Custom4
Custom5;Custom5
Custom6;Custom6
Default;Default
Default Action;Default Action
Default Font;Default Font
Delete display '$1'?;Delete display '$1'?
Expand Down Expand Up @@ -126,6 +128,8 @@ Layout Options;Layout Options
Left;Left
List Limit;List Limit
Manufacturer;Manufacturer
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Minimum Run Time;Minimum Run Time
Mouse Threshold;Mouse Threshold
Movie Volume;Movie Volume
Expand Down Expand Up @@ -284,7 +288,10 @@ _help_display_name;The title for this display
_help_display_romlist;The collection/rom list to use for this display
_help_display_sel;Configure display
_help_displays;Configure the romlist/layout groupings (a.k.a. "Displays") that are available to be cycled through in Attract-Mode
_help_displays_menu;Configure options for the "Displays Menu"
_help_displays_menu_exit;Configure whether an Exit option should be provided in the"Displays Menu"
_help_displays_menu_layout;The layout to use for the 'Displays Menu'. Set to 'Default' to use the frontend's built-in menu
_help_displays_menu_prompt;The 'Displays Menu' prompt (i.e. "Select System")
_help_emu_add;Add a new emulator
_help_emu_args;The command line arguments for this emulator. The following get substituted appropriately: [name], [romext], [rompath], [emulator], [romfilename], [system], [systemn]
_help_emu_delete;Delete the entry for this emulator
Expand Down
19 changes: 12 additions & 7 deletions config/layouts/Basic/layout.nut
Expand Up @@ -10,18 +10,24 @@ t.trigger = Transition.EndNavigation;
t = fe.add_artwork( "marquee", 348, 64, 262, 72 );
t.trigger = Transition.EndNavigation;

local l = fe.add_listbox( 32, 64, 262, 352 );
l.charsize = 16;
l.set_selbg_rgb( 255, 255, 255 );
l.set_sel_rgb( 0, 0, 0 );
l.sel_style = Style.Bold;
local lb = fe.add_listbox( 32, 64, 262, 352 );
lb.charsize = 16;
lb.set_selbg_rgb( 255, 255, 255 );
lb.set_sel_rgb( 0, 0, 0 );
lb.sel_style = Style.Bold;

fe.add_image( "bg.png", 0, 0 );

l = fe.add_text( "[DisplayName]", 0, 15, 640, 30 );
local l = fe.add_text( "[DisplayName]", 0, 15, 640, 30 );
l.set_rgb( 200, 200, 70 );
l.style = Style.Bold;

// The following function tells the frontend to use our title
// text and listbox (created above) for any menus (exit menu,
// etc...
//
fe.overlay.set_custom_controls( l, lb );

// Left side:

l = fe.add_text( "[Title]", 30, 424, 320, 16 );
Expand All @@ -45,4 +51,3 @@ l.align = Align.Right;
l = fe.add_text( "[FilterName]", 320, 441, 290, 16 );
l.set_rgb( 200, 200, 70 );
l.align = Align.Right;

17 changes: 15 additions & 2 deletions config/loader/hyperspin.nut
Expand Up @@ -58,7 +58,7 @@ class UserConfig </ help="Hyperspin Layout: " + fe.script_dir + ::file_to_load /
show_prompts="yes";

</ label="Animation Speed", help="Set animation speed", order=7, options="default,2X,4X" />
speed="default";
speed="4X";
};

local my_config = fe.get_config();
Expand Down Expand Up @@ -205,13 +205,22 @@ function get_system_match_map( idx=-1 )
{
local i = idx;
if ( i == -1 )
{
i = fe.list.display_index;
if ( i<0 )
i=0;
}

local smm = [];
smm.push( fe.displays[i].name.tolower() );

if ( idx < 0 )
{
if ( fe.list.display_index < 0 ) // this means we are showing the 'displays menu' w/ custom layout
smm.push( fe.game_info( Info.AltRomname ) );
else
smm.push( fe.game_info( Info.Emulator ) );

foreach ( t in split( fe.game_info( Info.System), ";" ) )
smm.push( t );
}
Expand Down Expand Up @@ -296,7 +305,7 @@ function get_theme_file( theme_d, match_map )
if ( default_theme.len() < 1 )
{
print( "Couldn't find hyperspin theme or default: "
+ fe.game_info( Info.Name ) + "\n" );
+ fe.game_info( Info.Name ) + " (" + theme_d + ")\n" );
}

theme = default_theme;
Expand Down Expand Up @@ -825,6 +834,10 @@ function hs_transition( ttype, var, ttime )

setup_prompts( false );
local hs_sys = get_hs_system_dir();

if ( fe.list.display_index < 0 ) // this means we are showing the 'displays menu' w/ custom layout
hs_sys = work_d + "Main Menu/";

local mm = get_match_map();

if ( override_lag_ms <= 0 )
Expand Down
Binary file added config/menu-art/wheel/mess-genesis.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/menu-art/wheel/mess-snes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added config/menu-art/wheel/nestopia.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

1 comment on commit 4e8cc1b

@fbs777
Copy link

@fbs777 fbs777 commented on 4e8cc1b Nov 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way to add this feature to Filters Menu?

Please sign in to comment.