LANCommander/LANCommander.Launcher/UI/Components/ActionSelectorDialog.razor
Pat Hartl e3b238e3f0 Refactor game launching
Changes to game launching:
- Games can now be launched using the SDK
- Games can be stopped by the SDK
- Running games are tracked by the SDK
- Game state in play buttons are now tracked by polling SDK game service
- Library service no longer controls any launching/stopping/tracking
- Actions now are keyed in the manifest
- Game launching occurs in a GameExecutionContext
- Game launching variables have been consolidated
2024-08-26 20:18:54 -05:00

20 lines
No EOL
562 B
Text

@using System.Diagnostics
@using LANCommander.Launcher.Data.Models
@using LANCommander.Launcher.Models
@inherits FeedbackComponent<ActionSelectorDialogOptions, Process>
@inject GameService GameService
<AntList DataSource="Options.Actions" TItem="SDK.Models.Action" Class="ant-list-clickable" Size="small">
<ListItem OnClick="() => Run(Options.Game, context)">
@context.Name
</ListItem>
</AntList>
@code {
void Run(Game game, SDK.Models.Action action)
{
GameService.Run(game, action.Id);
CloseFeedbackAsync();
}
}