From 36ff6d2b608512cf573e31f1d79cbab380f8cf5a Mon Sep 17 00:00:00 2001
From: MaikyM <51415805+MaikyM@users.noreply.github.com>
Date: Sat, 22 Jun 2019 08:08:35 -0600
Subject: [PATCH] Dropped getSecondsWithLanguage(), with getTextByKey() not is
unnecessary.
---
FModel/Methods/IconGenerator/DrawText.cs | 30 +-----------------------
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/FModel/Methods/IconGenerator/DrawText.cs b/FModel/Methods/IconGenerator/DrawText.cs
index 4df2e762..03d80a63 100644
--- a/FModel/Methods/IconGenerator/DrawText.cs
+++ b/FModel/Methods/IconGenerator/DrawText.cs
@@ -361,39 +361,11 @@ namespace FModel
Image reload = Resources.reload64;
myGraphic.DrawImage(ImageUtilities.ResizeImage(reload, 15, 15), new Point(50 + (statParsed.ClipSize.ToString().Length * 7) + 47, 500)); //50=clipsize text position | for each clipsize letter we add 7 to x | 47=difference between 2 icons
- myGraphic.DrawString(statParsed.ReloadTime + getSecondsWithLanguage(), new Font(FontUtilities.pfc.Families[0], 13), new SolidBrush(Color.White), new Point(64 + (statParsed.ClipSize.ToString().Length * 7) + 47, 500)); //64=50+icon size (-1 because that wasn't perfectly at the position i wanted)
+ myGraphic.DrawString(statParsed.ReloadTime + " " + SearchResource.getTextByKey("6BA53D764BA5CC13E821D2A807A72365", "seconds"), new Font(FontUtilities.pfc.Families[0], 13), new SolidBrush(Color.White), new Point(64 + (statParsed.ClipSize.ToString().Length * 7) + 47, 500)); //64=50+icon size (-1 because that wasn't perfectly at the position i wanted)
DrawToRight(weaponName, myGraphic);
}
}
- ///
- /// manual translation to improve speed and in case the key is deleted
- /// that's just 1 word so /shrug
- ///
- ///
- private static string getSecondsWithLanguage()
- {
- switch (Settings.Default.IconLanguage)
- {
- case "French":
- case "German":
- case "Italian":
- case "Spanish":
- case "Spanish (LA)":
- case "Arabic":
- case "Japanese":
- case "Korean":
- case "Polish":
- case "Portuguese (Brazil)":
- case "Russian":
- case "Turkish":
- case "Chinese (S)":
- case "Traditional Chinese":
- return " " + SearchResource.getTextByKey("6BA53D764BA5CC13E821D2A807A72365", "seconds");
- default:
- return " seconds";
- }
- }
///
/// this is only triggered for heroes and defenders