Use placeholder sprite for not-yet-affixed

ty matt
This commit is contained in:
Kurt 2023-04-01 17:46:10 -07:00
parent c3e51d414d
commit 37eb076bd4
4 changed files with 35 additions and 23 deletions

View file

@ -1786,20 +1786,19 @@ public sealed partial class PKMEditor : UserControl, IMainEditor
if (affixed != -1)
{
PB_Affixed.Image = RibbonSpriteUtil.GetRibbonSprite((RibbonIndex)affixed);
PB_Affixed.Visible = true;
// Update the tooltip with the ribbon name.
var name = RibbonStrings.GetName($"Ribbon{(RibbonIndex)affixed}");
AffixedTip.SetToolTip(PB_Affixed, name);
PB_Affixed.BorderStyle = BorderStyle.None;
return;
}
else
if (pk is IRibbonSetMarks { RibbonMarkCount: not 0 })
{
PB_Affixed.Image = null;
PB_Affixed.Image = Properties.Resources.ribbon_affix_none;
PB_Affixed.Visible = true;
AffixedTip.SetToolTip(PB_Affixed, "Ribbons / Marks available to affix.");
bool hasAny = pk is IRibbonSetMarks { RibbonMarkCount: not 0 };
PB_Affixed.BorderStyle = hasAny ? BorderStyle.FixedSingle : BorderStyle.None;
return;
}
PB_Affixed.Visible = true;
return;
}
PB_Affixed.Visible = false;
}

View file

@ -214,12 +214,13 @@ namespace PKHeX.WinForms.Properties {
/// Looks up a localized string similar to PKHeX - By Kaphotics
///http://projectpokemon.org/pkhex/
///
///22/09/13 - New Update:
/// - Legality: Fixed small regressions in move / ribbon / memory legality checks.
/// - Changed: RNG pidiv detection speed drastically improved. Not that you'd really notice since everything is already fast.
/// - Fixed: BW personal data API has been regenerated to fix previous corrupted return values.
/// - Fixed: Colosseum/XD playtime values now set the Hour value correctly.
/// - Fixed: Gen1 OT name now writes the final terminator 0x [rest of string was truncated]";.
///23/02/27 - New Update:
/// - Added: Support for S/V 1.2.0
/// - Added: SV style menu sprites for all species/forms. Thanks @sora10pls & @SciresM!
/// - Added: Gen5 Black/White City data can now be imported/exported, and Roamer status can be reset. Thanks @frefire!
/// - Added: Gen4/5 Geonet Location save file settings can now be viewed/changed. Thanks @abcboy101!
/// - Added: Gen4 Ranch now supports Toys from the Platinum game update. Thanks @Zazsona!
/// - Fixe [rest of string was truncated]";.
/// </summary>
public static string changelog {
get {
@ -638,7 +639,7 @@ namespace PKHeX.WinForms.Properties {
///KChart=KChart
///Main=PKHeX
///MemoryAmie=Editor de Memorias / Poké Recreo
///MoveShopEditor=Move Shop Editor
///MoveShopEditor=Editor de la Tienda de Movimientos
///RibbonEditor=Editor de Cintas
///SAV_Apricorn=Editor de Bonguri
///SAV_BerryField=Visor de Campos de Bayas
@ -647,8 +648,7 @@ namespace PKHeX.WinForms.Properties {
///SAV_BoxList=Visor de Almacenamiento
///SAV_Capture7GG=Editor de Récord de Captura
///SAV_CGearSkin=Editor de la apariencia C-Gear
///SAV_Database=Base de Datos
///SAV_E [rest of string was truncated]&quot;;.
///SAV_Database=Ba [rest of string was truncated]&quot;;.
/// </summary>
public static string lang_es {
get {
@ -658,12 +658,12 @@ namespace PKHeX.WinForms.Properties {
/// <summary>
/// Looks up a localized string similar to About=À propos
///BatchEditor=Éditeur Batch
///BatchEditor=Éditeur en vrac
///ErrorWindow=Erreur
///KChart=KChart
///Main=PKHeX
///MemoryAmie=Memory / Amie Editor
///MoveShopEditor=Move Shop Editor
///MoveShopEditor=Éditeur de capacités
///RibbonEditor=Rubans
///SAV_Apricorn=Noigrumes
///SAV_BerryField=Champs de Baies
@ -674,7 +674,7 @@ namespace PKHeX.WinForms.Properties {
///SAV_CGearSkin=Fonds C-Gear
///SAV_Database=Base de Données
///SAV_Encounters=Base de données
///SAV_EventFlags=Événement [rest of string was truncated]&quot;;.
///SAV_EventFlags=Évé [rest of string was truncated]&quot;;.
/// </summary>
public static string lang_fr {
get {
@ -694,13 +694,13 @@ namespace PKHeX.WinForms.Properties {
///SAV_Apricorn=Editor Ghicocche
///SAV_BerryField=Visualizzatore Campi di Bacche
///SAV_BlockDump8=Dump Blocchi di Salvataggio
///SAV_BoxLayout=Editor Disposizione dei Box
///SAV_BoxLayout=Editor Disposizione Box
///SAV_BoxList=Visualizzatore Storage
///SAV_Capture7GG=Editor Record di Catture
///SAV_CGearSkin=C-Gear Skin
///SAV_Database=Database
///SAV_Encounters=Database
///SA [rest of string was truncated]&quot;;.
///SAV_Ev [rest of string was truncated]&quot;;.
/// </summary>
public static string lang_it {
get {
@ -819,7 +819,7 @@ namespace PKHeX.WinForms.Properties {
///SAV_Capture7GG=捕獲記錄編輯
///SAV_CGearSkin=C裝置皮膚
///SAV_Database=資料庫
///SAV_Encounters=資料庫
///SAV_Encounters=遇見資料庫
///SAV_EventFlags=事件旗標編輯
///SAV_EventReset1=事件重置
///SAV_EventWork=事件標誌編輯器
@ -829,7 +829,7 @@ namespace PKHeX.WinForms.Properties {
///SAV_HallOfFame=名人堂
///SAV_HallOfFame7=名人堂
///SAV_HoneyTree=甜甜蜜樹編輯
///SA [rest of string was truncated]&quot;;.
/// [rest of string was truncated]&quot;;.
/// </summary>
public static string lang_zh2 {
get {
@ -1017,6 +1017,16 @@ namespace PKHeX.WinForms.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
public static System.Drawing.Bitmap ribbon_affix_none {
get {
object obj = ResourceManager.GetObject("ribbon_affix_none", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View file

@ -394,4 +394,7 @@
<data name="gen_sv" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\Markings\gen_sv.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ribbon_affix_none" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\img\Accents\ribbon_affix_none.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB