Skip to content

Commit

Permalink
Add tab icons, fix item sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey85 committed Nov 22, 2024
1 parent 8edb797 commit e3a6050
Show file tree
Hide file tree
Showing 18 changed files with 195 additions and 158 deletions.
325 changes: 170 additions & 155 deletions Pkmds.Web/Components/MainTabPages/BagTab.razor

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Pkmds.Web/Components/MainTabPages/BagTab.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ public partial class BagTab
[Parameter, EditorRequired]
public IReadOnlyList<InventoryPouch>? Inventory { get; set; }

private MudTabs? PouchTabs { get; set; }

private string[] ItemList { get; set; } = [];

private bool HasFreeSpace { get; set; }
Expand Down
22 changes: 22 additions & 0 deletions Pkmds.Web/SpriteHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,28 @@ public static string GetTypeSquareSpriteFileName(int type) =>
public static string GetTypeWideSpriteFileName(byte type) =>
$"{SpritesRoot}t/w/type_wide_{type:00}.png";

public static string GetBagPouchSpriteFileName(InventoryType type) =>
$"{SpritesRoot}bag/bag_{GetBagPouchSpriteName(type)}.png";

private static string GetBagPouchSpriteName(InventoryType type) => type switch
{
InventoryType.Items => "items",
InventoryType.KeyItems => "key",
InventoryType.TMHMs => "tech",
InventoryType.Medicine => "medicine",
InventoryType.Berries => "berries",
InventoryType.Balls => "balls",
InventoryType.BattleItems => "battle",
InventoryType.MailItems => "mail",
InventoryType.PCItems => "pcitems",
InventoryType.FreeSpace => "free",
InventoryType.ZCrystals => "z",
InventoryType.Candy => "candy",
InventoryType.Treasure => "treasure",
InventoryType.Ingredients => "ingredient",
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null),
};

// TODO: Implement
public static string GetMoveCategorySpriteFileName(int categoryId) =>
string.Empty;
Expand Down
4 changes: 1 addition & 3 deletions Pkmds.Web/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ pkm-sprite {
}

item-sprite {
width: 20px;
height: 20px;
align-self: center;
object-fit: contain;
}

.slot-fill :hover {
Expand Down
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Balls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Battle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Berries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Candy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Free.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Ingredient.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Mail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Medicine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_PCItems.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Treasure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/Bag_Z.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Pkmds.Web/wwwroot/sprites/bag/bag_tech.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e3a6050

Please sign in to comment.