LANCommander/LANCommander.Launcher/UI/Components/ActionSelectorDialog/ActionSelectorDialog.razor

21 lines
622 B
Text
Raw Permalink Normal View History

2024-05-25 22:21:04 -05:00
@using System.Diagnostics
@using LANCommander.Launcher.Data.Models
@using LANCommander.Launcher.Models
@namespace LANCommander.Launcher.UI
2024-05-25 22:21:04 -05:00
@inherits FeedbackComponent<ActionSelectorDialogOptions, Process>
@inject GameService GameService
2024-05-25 22:21:04 -05:00
<AntList DataSource="Options.Actions" TItem="SDK.Models.Manifest.Action" Class="ant-list-clickable" Size="ListSize.Small">
2024-06-01 22:47:56 -05:00
<ListItem OnClick="() => Run(Options.Game, context)">
2024-05-25 22:21:04 -05:00
@context.Name
</ListItem>
</AntList>
@code {
void Run(Game game, SDK.Models.Manifest.Action action)
2024-05-25 22:21:04 -05:00
{
GameService.Run(game, action);
2024-05-25 22:21:04 -05:00
CloseFeedbackAsync();
}
}