1
0
mirror of synced 2024-11-28 00:20:53 +01:00

Prepare to add name field

This commit is contained in:
shiibe 2022-09-05 17:00:41 -04:00
parent 2c45dde2e3
commit 5925950d16

View File

@ -10,9 +10,38 @@
{
<MudGrid>
<MudItem xs="12" md="8">
<MudPaper Class="py-8 px-8 my-8">
<MudPaper Class="py-8 px-8 my-8" Outlined="true">
<MudStack Spacing="6">
<h2>Profile Options</h2>
<MudTextField @bind-Value="name" Label="Name" Variant="Variant.Outlined"></MudTextField>
<MudSelect @bind-Value="@response.IsDisplayAchievement"
Label="Is Display Achievement Panel">
<MudSelectItem Value="@true">On</MudSelectItem>
<MudSelectItem Value="@false">Off</MudSelectItem>
</MudSelect>
<MudSelect @bind-Value="@response.IsDisplayDanOnNamePlate"
Label="Display Dan on Name Plate">
<MudSelectItem Value="@true">On</MudSelectItem>
<MudSelectItem Value="@false">Off</MudSelectItem>
</MudSelect>
<MudSelect @bind-Value="@response.AchievementDisplayDifficulty"
Label="Difficulty Used on Achievement Panel">
@foreach (var item in Enum.GetValues<Difficulty>())
{
<MudSelectItem Value="@item" />
}
</MudSelect>
</MudStack>
</MudPaper>
<MudPaper Class="py-8 px-8 my-8" Outlined="true">
<MudStack Spacing="6">
<h2>Song Options</h2>
<MudGrid>
<MudItem xs="12" md="4">
<MudStack Spacing="6">
<MudSwitch @bind-Checked="@response.PlaySetting.IsVanishOn" Label="Vanish" Color="Color.Primary" />
@ -22,7 +51,9 @@
<MudSwitch @bind-Checked="@response.IsVoiceOn" Label="Voice" Color="Color.Primary" />
</MudStack>
</MudItem>
<MudItem xs="12" md="8">
<MudStack Spacing="6">
<MudSelect @bind-Value="@response.PlaySetting.Speed" Label="Speed">
@for (uint i = 0; i < 15; i++)
{
@ -42,25 +73,9 @@
<MudSlider Class="mb-8" @bind-Value="@response.NotesPosition" Size="Size.Medium" Min="-5" Max="5" Step="1" TickMarks="true" TickMarkLabels="@notePositionStrings">
<MudText Typo="Typo.caption">Notes Position</MudText>
</MudSlider>
<MudSelect @bind-Value="@response.IsDisplayAchievement"
Label="Is Display Achievement Panel">
<MudSelectItem Value="@true">On</MudSelectItem>
<MudSelectItem Value="@false">Off</MudSelectItem>
</MudSelect>
<MudSelect @bind-Value="@response.IsDisplayDanOnNamePlate"
Label="Should Dan be Displayed On Name Plate">
<MudSelectItem Value="@true">On</MudSelectItem>
<MudSelectItem Value="@false">Off</MudSelectItem>
</MudSelect>
<MudSelect @bind-Value="@response.AchievementDisplayDifficulty"
Label="Difficulty Used on Achievement Panel">
@foreach (var item in Enum.GetValues<Difficulty>())
{
<MudSelectItem Value="@item"/>
}
</MudSelect>
</MudStack>
</MudItem>
</MudGrid>
</MudStack>
</MudPaper>
</MudItem>
@ -77,7 +92,7 @@
}
else
{
<MudIcon Icon="@Icons.Filled.Save"></MudIcon>
<MudIcon Icon="@Icons.Filled.Save" Class="mx-2"></MudIcon>
<MudText>Save</MudText>
}
</MudButton>
@ -95,10 +110,12 @@
private bool isSavingOptions;
private string name = "DON-Chan";
private readonly string[] speedStrings = { "1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9",
"2.0", "2.5", "3.0", "3.5", "4.0"};
private readonly string[] notePositionStrings = new string[] { "-5", "-4", "-3", "-2", "-1", "0", "1", "2", "3", "4", "5"};
private readonly string[] notePositionStrings = new string[] { "-5", "-4", "-3", "-2", "-1", "0", "+1", "+2", "+3", "+4", "+5"};
protected override async Task OnInitializedAsync()
{