-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Hidden Power dropdown to own component
- Loading branch information
1 parent
0f4d1b6
commit 4743eec
Showing
4 changed files
with
42 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@if (Pokemon is not null) | ||
{ | ||
<MudStack Spacing="1"> | ||
<MudAlert Severity="@MudBlazor.Severity.Info"> | ||
Changing Hidden Power type might change the IVs of the Pokémon. | ||
</MudAlert> | ||
<MudStack Row | ||
AlignItems="@AlignItems.Center"> | ||
<MudSelect Label="Hidden Power Type" | ||
Variant="@Variant.Outlined" | ||
@bind-Value="@Pokemon.HPType"> | ||
@foreach (var type in Util.GetCBList(GameInfo.Strings.Types.ToArray().AsSpan(1, 16)).DistinctBy(type => type.Value)) | ||
{ | ||
<MudSelectItem Value="@type.Value" | ||
@key="@type.Value"> | ||
<MudStack Row> | ||
<MudImage Src="@SpriteHelper.GetTypeSquareSpriteFileName(type.Value + 1)" | ||
Alt="@GameInfo.Strings.Types[type.Value + 1]" | ||
title="@GameInfo.Strings.Types[type.Value + 1]" | ||
ObjectFit="@ObjectFit.Contain" | ||
ObjectPosition="@ObjectPosition.Center" | ||
Width="30" /> | ||
<MudText> | ||
@type.Text | ||
</MudText> | ||
</MudStack> | ||
</MudSelectItem> | ||
} | ||
</MudSelect> | ||
<MudText> | ||
@Pokemon.HPPower | ||
</MudText> | ||
</MudStack> | ||
</MudStack> | ||
} | ||
|
||
@code { | ||
[Parameter] public PKM? Pokemon { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters