KoogleApp/KoogleApp/Components/Controls/ParticipantsModeSelect.razor

22 lines
704 B
Plaintext

@using KoogleApp.Store.Game.Setup
@using KoogleApp.Store.Game.ThrowPanel
@inject IDispatcher Dispatcher
<EnumSelect Label="Spieler-Modus"
TEnum="@ParticipantsMode" TState="SetupState" HelperText="Wie wird der nächste Spieler bestimmt"
ValueSelector="@(state => state.ParticipantsMode)"
OnValueChanged="@(value => Dispatcher.Dispatch(new SetParticipantsModeAction(value)))"
EnumValues="_values" />
@code {
Dictionary<ParticipantsMode, string> _values = new()
{
{ ParticipantsMode.FreeToChoose, "frei wählbar" },
{ ParticipantsMode.GameLogic, "automatisch / rotierend" },
{ ParticipantsMode.Random, "zufällig" }
};
}