Skip to content

Commit e6fb59e

Browse files
committed
Add ToggleGameMode to system commands
1 parent 2c965b1 commit e6fb59e

File tree

27 files changed

+71
-1
lines changed

27 files changed

+71
-1
lines changed

Flow.Launcher.Plugin/Interfaces/IPublicAPI.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,5 +274,22 @@ public interface IPublicAPI
274274
/// Non-C# plugins should use this method
275275
/// </summary>
276276
public void OpenAppUri(string appUri);
277+
278+
/// <summary>
279+
/// Toggles Game Mode. off -> on and backwards
280+
/// </summary>
281+
public void ToggleGameMode();
282+
283+
/// <summary>
284+
/// Switches Game Mode to given value
285+
/// </summary>
286+
/// <param name="value">New Game Mode status</param>
287+
public void SetGameMode(bool value);
288+
289+
/// <summary>
290+
/// Representing Game Mode status
291+
/// </summary>
292+
/// <returns></returns>
293+
public bool IsGameModeOn();
277294
}
278295
}

Flow.Launcher/PublicAPIInstance.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,22 @@ public void OpenAppUri(Uri appUri)
294294
OpenUri(appUri);
295295
}
296296

297+
public void ToggleGameMode()
298+
{
299+
_mainVM.ToggleGameMode();
300+
}
301+
302+
public void SetGameMode(bool value)
303+
{
304+
_mainVM.GameModeStatus = value;
305+
}
306+
307+
public bool IsGameModeOn()
308+
{
309+
return _mainVM.GameModeStatus;
310+
}
311+
312+
297313
private readonly List<Func<int, int, SpecialKeyState, bool>> _globalKeyboardHandlers = new();
298314

299315
public void RegisterGlobalKeyboardCallback(Func<int, int, SpecialKeyState, bool> callback) => _globalKeyboardHandlers.Add(callback);

Plugins/Flow.Launcher.Plugin.Sys/Languages/ar.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Check for new Flow Launcher update</system:String>
2525
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Visit Flow Launcher's documentation for more help and how to use tips</system:String>
2626
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Open the location where Flow Launcher's settings are stored</system:String>
27+
<system:String x:Key="flowlauncher_plugin_sys_toggle_game_mode">Toggle Game Mode</system:String>
2728

2829
<!-- Dialogs -->
2930
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Success</system:String>

Plugins/Flow.Launcher.Plugin.Sys/Languages/cs.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Zkontrolovat aktualizace Flow Launcheru</system:String>
2525
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Další nápovědu a tipy k jeho používání najdete v dokumentaci ke službě Flow Launcher</system:String>
2626
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Otevře místo, kde jsou uložena nastavení Flow Launcher</system:String>
27+
<system:String x:Key="flowlauncher_plugin_sys_toggle_game_mode">Toggle Game Mode</system:String>
2728

2829
<!-- Dialogs -->
2930
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Úspěšné</system:String>

Plugins/Flow.Launcher.Plugin.Sys/Languages/da.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Check for new Flow Launcher update</system:String>
2525
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Visit Flow Launcher's documentation for more help and how to use tips</system:String>
2626
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Open the location where Flow Launcher's settings are stored</system:String>
27+
<system:String x:Key="flowlauncher_plugin_sys_toggle_game_mode">Toggle Game Mode</system:String>
2728

2829
<!-- Dialogs -->
2930
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Fortsæt</system:String>

Plugins/Flow.Launcher.Plugin.Sys/Languages/de.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Check for new Flow Launcher update</system:String>
2525
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Visit Flow Launcher's documentation for more help and how to use tips</system:String>
2626
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Open the location where Flow Launcher's settings are stored</system:String>
27+
<system:String x:Key="flowlauncher_plugin_sys_toggle_game_mode">Toggle Game Mode</system:String>
2728

2829
<!-- Dialogs -->
2930
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Erfolgreich</system:String>

Plugins/Flow.Launcher.Plugin.Sys/Languages/en.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Check for new Flow Launcher update</system:String>
2727
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Visit Flow Launcher's documentation for more help and how to use tips</system:String>
2828
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Open the location where Flow Launcher's settings are stored</system:String>
29+
<system:String x:Key="flowlauncher_plugin_sys_toggle_game_mode">Toggle Game Mode</system:String>
2930

30-
<!-- Dialogs -->
31+
<!-- Dialogs -->
3132
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Success</system:String>
3233
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_all_settings_saved">All Flow Launcher settings saved</system:String>
3334
<system:String x:Key="flowlauncher_plugin_sys_dlgtext_all_applicableplugins_reloaded">Reloaded all applicable plugin data</system:String>

Plugins/Flow.Launcher.Plugin.Sys/Languages/es-419.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Check for new Flow Launcher update</system:String>
2525
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Visit Flow Launcher's documentation for more help and how to use tips</system:String>
2626
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Open the location where Flow Launcher's settings are stored</system:String>
27+
<system:String x:Key="flowlauncher_plugin_sys_toggle_game_mode">Toggle Game Mode</system:String>
2728

2829
<!-- Dialogs -->
2930
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Success</system:String>

Plugins/Flow.Launcher.Plugin.Sys/Languages/es.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Busca actualizaciones de Flow Launcher</system:String>
2525
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Accede a la documentación de Flow Launcher para más ayuda y consejos de uso</system:String>
2626
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Abre la ubicación donde se almacena la configuración de Flow Launcher</system:String>
27+
<system:String x:Key="flowlauncher_plugin_sys_toggle_game_mode">Toggle Game Mode</system:String>
2728

2829
<!-- Dialogs -->
2930
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Correcto</system:String>

Plugins/Flow.Launcher.Plugin.Sys/Languages/fr.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
<system:String x:Key="flowlauncher_plugin_sys_check_for_update">Vérifier de nouvelles mises à jour Flow Launcher</system:String>
2525
<system:String x:Key="flowlauncher_plugin_sys_open_docs_tips">Consultez la documentation de Flow Launcher pour plus d'aide et comment utiliser les conseils.</system:String>
2626
<system:String x:Key="flowlauncher_plugin_sys_open_userdata_location">Ouvrez l'emplacement où les paramètres de Flow Launcher sont stockés</system:String>
27+
<system:String x:Key="flowlauncher_plugin_sys_toggle_game_mode">Toggle Game Mode</system:String>
2728

2829
<!-- Dialogs -->
2930
<system:String x:Key="flowlauncher_plugin_sys_dlgtitle_success">Ajouté avec succès</system:String>

0 commit comments

Comments
 (0)