Add smoother resized type icons

Not as sharp as before, but this doesn't massively distort some type icons like Normal or Psychic
This commit is contained in:
sora10pls 2024-01-04 16:41:38 -05:00
parent 5ef8cfaf2e
commit 0777b9fbf8
26 changed files with 258 additions and 4 deletions

View file

@ -4940,6 +4940,196 @@ namespace PKHeX.Drawing.Misc.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_00 {
get {
object obj = ResourceManager.GetObject("type_icon_s_00", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_01 {
get {
object obj = ResourceManager.GetObject("type_icon_s_01", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_02 {
get {
object obj = ResourceManager.GetObject("type_icon_s_02", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_03 {
get {
object obj = ResourceManager.GetObject("type_icon_s_03", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_04 {
get {
object obj = ResourceManager.GetObject("type_icon_s_04", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_05 {
get {
object obj = ResourceManager.GetObject("type_icon_s_05", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_06 {
get {
object obj = ResourceManager.GetObject("type_icon_s_06", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_07 {
get {
object obj = ResourceManager.GetObject("type_icon_s_07", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_08 {
get {
object obj = ResourceManager.GetObject("type_icon_s_08", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_09 {
get {
object obj = ResourceManager.GetObject("type_icon_s_09", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_10 {
get {
object obj = ResourceManager.GetObject("type_icon_s_10", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_11 {
get {
object obj = ResourceManager.GetObject("type_icon_s_11", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_12 {
get {
object obj = ResourceManager.GetObject("type_icon_s_12", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_13 {
get {
object obj = ResourceManager.GetObject("type_icon_s_13", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_14 {
get {
object obj = ResourceManager.GetObject("type_icon_s_14", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_15 {
get {
object obj = ResourceManager.GetObject("type_icon_s_15", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_16 {
get {
object obj = ResourceManager.GetObject("type_icon_s_16", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_17 {
get {
object obj = ResourceManager.GetObject("type_icon_s_17", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap type_icon_s_99 {
get {
object obj = ResourceManager.GetObject("type_icon_s_99", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View file

@ -1582,6 +1582,63 @@
<data name="type_icon_99" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square\type_icon_99.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_00" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_00.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_01" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_01.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_02" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_02.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_03" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_03.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_04" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_04.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_05" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_05.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_06" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_06.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_07" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_07.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_08" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_08.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_09" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_09.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_10" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_10.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_11" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_11.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_12" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_12.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_13" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_13.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_14" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_14.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_15" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_15.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_17" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_17.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_icon_s_99" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\square_s\type_icon_s_99.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="type_wide_00" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\types\wide\type_wide_00.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 809 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 872 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 712 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -22,6 +22,13 @@ public static class TypeSpriteUtil
return Get($"type_icon_{type:00}");
}
public static Bitmap? GetTypeSpriteIconSmall(byte type, int generation = PKX.Generation)
{
if (generation <= 2)
type = (byte)((MoveType)type).GetMoveTypeGeneration(generation);
return Get($"type_icon_s_{type:00}");
}
public static Bitmap? GetTypeSpriteGem(byte type)
{
return Get($"gem_{type:00}");

View file

@ -30,7 +30,7 @@ public partial class MoveChoice : UserControl
}
var type = MoveInfo.GetType((ushort)value, Context);
PB_Type.Image = TypeSpriteUtil.GetTypeSpriteIcon(type);
PB_Type.Image = TypeSpriteUtil.GetTypeSpriteIconSmall(type);
}
private static void LoadClamp(ComboBox cb, int value)

View file

@ -30,7 +30,7 @@ public partial class MoveDisplay : UserControl
var size = PokePreview.MeasureSize(name, L_Move.Font);
var ctrlWidth = PB_Type.Width + PB_Type.Margin.Horizontal + size.Width + L_Move.Margin.Horizontal;
PB_Type.Image = TypeSpriteUtil.GetTypeSpriteIcon(type);
PB_Type.Image = TypeSpriteUtil.GetTypeSpriteIconSmall(type);
L_Move.Text = name;
if (valid)
L_Move.ResetForeColor();

View file

@ -159,7 +159,7 @@ public partial class MoveShopEditor : Form
}
row.Cells[ColumnIndex].Value = $"{i + Bias:00}";
row.Cells[ColumnType].Value = type.ToString("00") + (isValid ? 0 : 1) + names[move]; // type -> valid -> name sorting
row.Cells[ColumnTypeIcon].Value = TypeSpriteUtil.GetTypeSpriteIcon(type);
row.Cells[ColumnTypeIcon].Value = TypeSpriteUtil.GetTypeSpriteIconSmall(type);
row.Cells[ColumnName].Value = names[indexes[i]];
}
}

View file

@ -59,7 +59,7 @@ public partial class TechRecordEditor : Form
row.Cells[ColumnName].Style.BackColor = Color.LightBlue;
row.Cells[ColumnIndex].Value = i.ToString("000");
row.Cells[ColumnTypeIcon].Value = TypeSpriteUtil.GetTypeSpriteIcon(type);
row.Cells[ColumnTypeIcon].Value = TypeSpriteUtil.GetTypeSpriteIconSmall(type);
row.Cells[ColumnType].Value = type.ToString("00") + (isValid ? 0 : 1) + names[move]; // type -> valid -> name sorting
row.Cells[ColumnName].Value = names[move];
}