Skip to content

Commit fa2d514

Browse files
Merge pull request #34 from KrystianLesniak/develop
Release: 1.5.0
2 parents d6dadb5 + eb2882a commit fa2d514

14 files changed

Lines changed: 186 additions & 26 deletions

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,18 @@ You can disable specific platforms via settings menu.
4343
### Custom shortcuts
4444
If you have retail games (or on an unsupported platform) you can add your own shortcuts files (.lnk / .uri) to the plugin games list.
4545

46-
To do this, go to Settings -> Plugins -> GamesLauncher -> Open Custom Shortcuts Directory
46+
To do this, go to `Settings -> Plugins -> GamesLauncher -> Open Custom Shortcuts Directory`
4747

4848
Place your shortcut in the opened directory and... That's it! You can now `Reload Plugin Data` to update your library.
4949

5050
### Update library
5151
If you have (un)installed a game, you can update the plugin without restarting Flow Launcher by using the `Reload Plugin Data` command.
5252

5353
![Reload](docs/reload.png)
54+
55+
### Hide an item
56+
You can hide a specific game from the plugin list by accessing the context menu (`right arrow`) and using the `Hide` command.
57+
58+
![Hide Game](docs/hide.png)
59+
60+
The game can be unhidden later from the settings menu.

docs/hide.png

4.71 KB
Loading

docs/settings.png

1.42 KB
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
namespace GamesLauncher.Common.Settings
2+
{
3+
public class HiddenGames
4+
{
5+
public List<HiddenGame> Items { get; set; } = new List<HiddenGame>() //This property and class needs to be public to be retrieved by FL Settings
6+
{
7+
new HiddenGame
8+
{
9+
InternalGameId = "Steam_Steamworks Common Redistributables",
10+
Platform = "Steam",
11+
Title = "Steamworks Common Redistributables"
12+
}
13+
};
14+
15+
public void Hide(string title, string platform, string internalGameId)
16+
{
17+
if (!Items.Any(x => x.InternalGameId == internalGameId))
18+
{
19+
Items.Add(new HiddenGame
20+
{
21+
InternalGameId = internalGameId,
22+
Platform = platform,
23+
Title = title
24+
});
25+
}
26+
}
27+
28+
public void Unhide(HiddenGame hiddenGame)
29+
{
30+
Items.Remove(hiddenGame);
31+
}
32+
33+
public bool IsHidden(string internalGameId)
34+
{
35+
return Items.Any(x => x.InternalGameId == internalGameId);
36+
}
37+
}
38+
39+
public class HiddenGame
40+
{
41+
public string Title { get; set; } = string.Empty;
42+
public string Platform { get; set; } = string.Empty;
43+
public string InternalGameId { get; set; } = string.Empty;
44+
}
45+
46+
}

src/GamesLauncher.Platforms/PlatformsManager.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public IEnumerable<Game> GetSynchronizedGames()
3030
return Games;
3131
}
3232

33+
public Game? GetGame(string title, string platform)
34+
{
35+
return Games.FirstOrDefault(x=> x.Title == title && x.Platform == platform);
36+
}
37+
3338
private IEnumerable<ISyncEngine> InitializeEngines(MainSettings settings)
3439
{
3540
var engines = new List<ISyncEngine>();

src/GamesLauncher.Platforms/SyncEngines/Steam/SteamGamesConsts.cs

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/GamesLauncher.Platforms/SyncEngines/Steam/SteamSyncEngine.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ public SteamSyncEngine(IPublicAPI publicApi)
2121
public async IAsyncEnumerable<Game> GetGames()
2222
{
2323
var result = handler.FindAllGames();
24-
var games = result.Where(x => x.IsGame()).Select(x => x.AsGame())
25-
.Where(x => SteamGamesConsts.AppIdsToIgnore.Contains(x.AppId.Value) == false);
24+
var games = result.Where(x => x.IsGame()).Select(x => x.AsGame());
2625

2726
foreach (var game in games)
2827
{

src/GamesLauncher.Platforms/SyncEngines/XboxSyncEngine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ private Func<ActionContext, ValueTask<bool>> GetGameRunTask(string cmd)
7070
if (bitmapSource == null || bitmapSource.CanFreeze == false)
7171
return null;
7272

73-
bitmapSource.Freeze();
73+
bitmapSource.Freeze(); //This is needed. Otherwise FL throws exception for some users.
7474

7575
return delegate ()
7676
{

src/GamesLauncher/GamesLauncher.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,13 @@
4545
<None Update="icon.png">
4646
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
4747
</None>
48+
<None Update="Images\excludeindexpath.png">
49+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
50+
</None>
51+
</ItemGroup>
52+
53+
<ItemGroup>
54+
<Folder Include="Images\" />
4855
</ItemGroup>
4956

5057
</Project>
2.74 KB
Loading

0 commit comments

Comments
 (0)