Skip to content

Commit

Permalink
Add menu toggle option
Browse files Browse the repository at this point in the history
Add menu toggle option
  • Loading branch information
Chadnaut committed Jan 13, 2025
1 parent b697b87 commit c72ceeb
Show file tree
Hide file tree
Showing 18 changed files with 192 additions and 78 deletions.
2 changes: 2 additions & 0 deletions config/language/cn.msg
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Manufacturer;制造商
Menu Colour;菜单颜色
Menu Prompt;标题
Menu Style / Layout;主题
Menu Toggle;菜单切换
Mouse Threshold;鼠标的阈值
Movie Volume;视频音量
Name;名称
Expand Down Expand Up @@ -419,6 +420,7 @@ _help_joystick_map;Map the frontend's joystick slots to specifically named joyst
_help_joystick_threshold;The threshold for registering joystick moves, from 1 to 100 (100=least sensitive)
_help_language;Select the language to use in Attract-Mode's user interface
_help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use
_help_menu_toggle;Enable single-button menu toggling, and switching between open menus
_help_misc;Configure general settings
_help_mouse_threshold;The threshold for registering mouse moves, from 1 to 100 (100=least sensitive)
_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games
Expand Down
2 changes: 2 additions & 0 deletions config/language/de.msg
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ _help_input_add;Dieser Aktion ein neues Steuerungs-Mapping zuordnen
_help_input_delete;Dieses Steuerungs-Mapping löschen
_help_intro;Intro konfigurieren
_help_joystick_threshold;Der Schwellwert um Joystick-Bewegungen noch zu erkennen, von 1 bis 100 (100=am wenigsten empfindlich)
_help_menu_toggle;Aktivieren Sie das Umschalten von Menüs mit nur einer Taste und das Wechseln zwischen geöffneten Menüs
_help_misc;Konfiguriere sonstige Einstellungen
_help_mouse_threshold;Der Schwellwert um Maus-Bewegungen noch zu erkennen, von 1 bis 100 (100=am wenigsten empfindlich)
_help_plugin_command;Die ausführbare Datei, welche mit diesem Plug-in verknüpft ist
Expand Down Expand Up @@ -370,6 +371,7 @@ Layout File;Themendatei
Menu Colour;Menüfarbe
Menu Prompt;Eingabeaufforderung
Menu Style / Layout;Menüstil / Thema
Menu Toggle;Menü umschalten
Next Game;nächstes Spiel
Non-Blocking Mode Wait;Klippo-Modus Wartezeit
Overview;Übersicht
Expand Down
1 change: 1 addition & 0 deletions config/language/en.msg
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ _help_joystick_map;Map the frontend's joystick slots to specifically named joyst
_help_joystick_threshold;The threshold for registering joystick moves, from 1 to 100 (100=least sensitive)
_help_language;Select the language to use in Attract-Mode's user interface
_help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use
_help_menu_toggle;Enable single-button menu toggling, and switching between open menus
_help_misc;Configure general settings
_help_mouse_threshold;The threshold for registering mouse moves, from 1 to 100 (100=least sensitive)
_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games
Expand Down
2 changes: 2 additions & 0 deletions config/language/es.msg
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ _help_input_add;Agrega una nueva asignación de controles para esta acción
_help_input_delete;Remover esta asignación de controles
_help_intro;Configure intro
_help_joystick_threshold;Umbral para los movimientos de palanca registrados, de 1 a 100 (100=menos sensible)
_help_menu_toggle;Habilite el cambio de menú con un solo botón y el cambio entre menús abiertos
_help_misc;Configuraciones varias
_help_mouse_threshold;Umbral para los movimientos del ratón, de 1 a 100 (100=menos sensible)
_help_plugin_command;Ejecutable asociado a este plugin
Expand Down Expand Up @@ -381,6 +382,7 @@ Layout File;Layout File
Menu Colour;Color del menú
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Menu Toggle;Alternar menú
Next Game;Next Game
Non-Blocking Mode Wait;Non-Blocking Mode Wait
Overview;Overview
Expand Down
2 changes: 2 additions & 0 deletions config/language/fr.msg
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@ _help_input_delete;Enlever ce contrôle
_help_intro;Configurer l'intro
_help_joystick_threshold;Seuil d'amplitude des mouvements du joystick, de 1 à 100 (100=moins sensible)
_help_language;Sélectionner la langue
_help_menu_toggle;Activer le basculement de menu à l'aide d'un seul bouton et la commutation entre les menus ouverts
_help_misc;Configurations diverses
_help_mouse_threshold;Seuil d'amplitude des mouvements de la souris, de 1 à 100 (100=moins sensible)
_help_plugin_command;Exécutable associé à ce plug-in
Expand Down Expand Up @@ -372,6 +373,7 @@ Layout File;Layout File
Menu Colour;Couleur des menus
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Menu Toggle;Basculement de menu
Next Game;Next Game
Non-Blocking Mode Wait;Non-Blocking Mode Wait
Overview;Overview
Expand Down
2 changes: 2 additions & 0 deletions config/language/it.msg
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ Manufacturer;Produttore
Menu Colour;Colore del menù
Menu Prompt;Titolo del menù
Menu Style / Layout;Tema del menù
Menu Toggle;Menu Alterna
Mouse Threshold;Soglia del mouse
Movie Volume;Volume dei video
Name;Nome
Expand Down Expand Up @@ -353,6 +354,7 @@ _help_input_delete;Cancella questa associazione dei tasti
_help_intro;Configura il video di introduzione
_help_joystick_threshold;Umbral para los movimientos de palanca registrados, de 1 a 100 (100=menos sensible)
_help_language;Seleziona la lingua dell'interfaccia di Attract-Mode
_help_menu_toggle;Abilita la commutazione dei menu con un solo pulsante e il passaggio tra i menu aperti
_help_misc;Configurazioni varie
_help_mouse_threshold;Sogla per il riconoscimento dei movimenti del mouse, accetta un valore da 1 a 100 (100 = meno sensibile)
_help_multiple_monitors;Abilita l'utilizzo di monitor multipli
Expand Down
2 changes: 2 additions & 0 deletions config/language/jp.msg
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ _help_input_add;入力キーを追加します
_help_input_delete;入力キーを削除します
_help_joystick_threshold;ジョイスティックの感度を設定します. (1から100まで), 高いほど鈍感です
_help_language;言語を設定します
_help_menu_toggle;シングルボタンのメニュー切り替えと、開いているメニュー間の切り替えを有効にする
_help_misc;その他を設定します
_help_mouse_threshold;マウスの感度を設定します. (1から100まで), 高いほど鈍感です
_help_plugin_command;プラグインのコマンドを設定します
Expand Down Expand Up @@ -372,6 +373,7 @@ Layout File;Layout File
Menu Colour;メニューの色
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Menu Toggle;メニュートグル
Next Game;Next Game
Next Page;Next Page
Non-Blocking Mode Wait;Non-Blocking Mode Wait
Expand Down
2 changes: 2 additions & 0 deletions config/language/kr.msg
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Manufacturer;제작사(Manufacturer)
Menu Colour;메뉴 색상
Menu Prompt;화면에 표시할 메뉴 이름
Menu Style / Layout;메뉴 스타일 / 레이아웃
Menu Toggle;메뉴 토글
Mouse Threshold;마우스 민감도
Movie Volume;동영상 음량
Name;이름
Expand Down Expand Up @@ -364,6 +365,7 @@ _help_input_delete;해당 입력 키를 삭제합니다
_help_intro;인트로 영상을 설정합니다
_help_joystick_threshold;조이스틱 입력 민감도를 설정합니다. 1에서 100까지이며, 클수록 덜 민감합니다
_help_language;언어를 설정합니다
_help_menu_toggle;단일 버튼 메뉴 전환 및 열린 메뉴 간 전환 활성화
_help_misc;그 외 여러 가지 설정을 변경합니다
_help_mouse_threshold;마우스 입력 민감도를 설정합니다. 1 에서 100까지이며, 클수록 덜 민감합니다
_help_multiple_monitors;다중 모니터 환경을 사용할 지 여부를 설정합니다
Expand Down
2 changes: 2 additions & 0 deletions config/language/msg_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ Manufacturer;Manufacturer
Menu Colour;Menu Colour
Menu Prompt;Menu Prompt
Menu Style / Layout;Menu Style / Layout
Menu Toggle;Menu Toggle
Mouse Threshold;Mouse Threshold
Movie Volume;Movie Volume
Name;Name
Expand Down Expand Up @@ -388,6 +389,7 @@ _help_joystick_map;Map the frontend's joystick slots to specifically named joyst
_help_joystick_threshold;The threshold for registering joystick moves, from 1 to 100 (100=least sensitive)
_help_language;Select the language to use in Attract-Mode's user interface
_help_layout_file;Some layouts provide multiple layout*.nut files. Select which layout file to use
_help_menu_toggle;Enable single-button menu toggling, and switching between open menus
_help_misc;Configure miscellaneous settings
_help_mouse_threshold;The threshold for registering mouse moves, from 1 to 100 (100=least sensitive)
_help_multiple_monitors;Enable the use of multiple monitors by Attract-Mode. Setting this to 'No' may reduce screen flicker when launching games
Expand Down
2 changes: 2 additions & 0 deletions config/language/tw.msg
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ Manufacturer;製作廠商
Menu Colour;選單顏色
Menu Prompt;選單提示
Menu Style / Layout;選單樣式 / 畫面佈局
Menu Toggle;選單切換
Mouse Threshold;滑鼠靈敏度
Movie Volume;影片音量
Name;檔案名稱
Expand Down Expand Up @@ -381,6 +382,7 @@ _help_joystick_map;指定電腦的搖桿裝置在 Attract-Mode 裡的搖桿順
_help_joystick_threshold;這個設定用來定位搖桿移動的靈敏度,數值從 1 到 100 (100 為最大值)。
_help_language;選擇 Attract-Mode 使用者介面所要使用的語言
_help_layout_file;一些畫面佈局主題提供多個 layout*.nut 檔案,須選擇要使用的畫面佈局檔案。
_help_menu_toggle;啟用單按鈕選單切換以及在開啟的選單之間切換
_help_misc;設定一般設定
_help_mouse_threshold;這個設定用來定位滑鼠移動的靈敏度,數值從 1 到 100 (100 為最大值)。
_help_multiple_monitors;為 Attract-Mode 啟用多螢幕支援 (設定為「否」可能減少執行遊戲時的螢幕閃爍問題)
Expand Down
9 changes: 9 additions & 0 deletions src/fe_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,12 @@ void FeMiscMenu::get_options( FeConfigContext &ctx )
ctx.fe_settings.get_translation( "Yes", bool_opts[0] );
ctx.fe_settings.get_translation( "No", bool_opts[1] );

ctx.add_optl( Opt::LIST,
"Menu Toggle",
ctx.fe_settings.get_info_bool( FeSettings::MenuToggle ) ? bool_opts[0] : bool_opts[1],
"_help_menu_toggle" );
ctx.back_opt().append_vlist( bool_opts );

ctx.add_optl( Opt::LIST,
"Track Usage",
ctx.fe_settings.get_info_bool( FeSettings::TrackUsage ) ? bool_opts[0] : bool_opts[1],
Expand Down Expand Up @@ -2177,6 +2183,9 @@ bool FeMiscMenu::save( FeConfigContext &ctx )
ctx.fe_settings.set_info( FeSettings::StartupMode,
FeSettings::startupTokens[ ctx.opt_list[i++].get_vindex() ] );

ctx.fe_settings.set_info( FeSettings::MenuToggle,
ctx.opt_list[i++].get_vindex() == 0 ? FE_CFG_YES_STR : FE_CFG_NO_STR );

ctx.fe_settings.set_info( FeSettings::TrackUsage,
ctx.opt_list[i++].get_vindex() == 0 ? FE_CFG_YES_STR : FE_CFG_NO_STR );

Expand Down
Loading

0 comments on commit c72ceeb

Please sign in to comment.