CreativeGalleries true by default + special font for japanese

This commit is contained in:
Asval 2019-06-22 21:13:51 +02:00
parent 36ff6d2b60
commit bd4b65be6d
11 changed files with 35 additions and 15 deletions

View File

@ -140,7 +140,7 @@
<value />
</setting>
<setting name="createIconForCreativeGalleries" serializeAs="String">
<value>False</value>
<value>True</value>
</setting>
</FModel.Properties.Settings>
</userSettings>

View File

@ -253,6 +253,7 @@
<Content Include="DLLs\csharp-wick.dll" />
<Content Include="DLLs\ScintillaNET FindReplaceDialog.dll" />
<Content Include="FModel.ico" />
<None Include="Resources\BurbankBigCondensed-Black-vJapanese.otf" />
<None Include="Resources\reload64.png" />
<None Include="Resources\clipSize64.png" />
<None Include="Resources\LBolt64.png" />

View File

@ -1382,7 +1382,7 @@ namespace FModel
//BundleDesign.toDrawOn.DrawRectangle(new Pen(new SolidBrush(Color.Blue)), new Rectangle(107, BundleDesign.theY + 7, 2000, 75)); //rectangle the font needs to be fit with
//draw quest description
Font goodFont = FontUtilities.FindFont(BundleDesign.toDrawOn, BundleInfos.BundleData[i].questDescr, new Rectangle(107, BundleDesign.theY + 7, 2000, 93).Size, new Font(FontUtilities.pfc.Families[1], 50)); //size in "new Font()" is never check
Font goodFont = FontUtilities.FindFont(BundleDesign.toDrawOn, BundleInfos.BundleData[i].questDescr, new Rectangle(107, BundleDesign.theY + 7, 2000, 93).Size, new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 50)); //size in "new Font()" is never check
BundleDesign.toDrawOn.DrawString(BundleInfos.BundleData[i].questDescr, goodFont, new SolidBrush(Color.White), new Point(100, BundleDesign.theY));
//draw slider + quest count

View File

@ -57,12 +57,12 @@ namespace FModel
GraphicsPath p = new GraphicsPath();
Pen myPen = new Pen(ControlPaint.Light(BundleInfos.getSecondaryColor(myBundle), (float)0.2), 3);
myPen.LineJoin = LineJoin.Round; //needed to avoid spikes
p.AddString(BundleInfos.getLastFolder(BundlePath), FontUtilities.pfc.Families[1], (int)FontStyle.Regular, 55, new Point(342, 40), FontUtilities.leftString);
p.AddString(BundleInfos.getLastFolder(BundlePath), Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], (int)FontStyle.Regular, 55, new Point(342, 40), FontUtilities.leftString);
toDrawOn.DrawPath(myPen, p);
toDrawOn.FillPath(new SolidBrush(ControlPaint.Dark(BundleInfos.getSecondaryColor(myBundle), (float)0.05)), p);
//name
toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(325, 70));
toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(325, 70));
//image
string textureFile = Path.GetFileName(myBundle.DisplayStyle.DisplayImage.AssetPathName).Substring(0, Path.GetFileName(myBundle.DisplayStyle.DisplayImage.AssetPathName).LastIndexOf('.'));
@ -95,10 +95,10 @@ namespace FModel
toDrawOn.FillRectangle(new SolidBrush(ControlPaint.Dark(myBaseColor, (float)0.1)), new Rectangle(0, 271, myBitmap.Width, myBitmap.Height));
//last folder
toDrawOn.DrawString(BundleInfos.getLastFolder(BundlePath), new Font(FontUtilities.pfc.Families[1], 42), new SolidBrush(ControlPaint.Dark(myBaseColor, (float)0.05)), new Point(40, 40));
toDrawOn.DrawString(BundleInfos.getLastFolder(BundlePath), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 42), new SolidBrush(ControlPaint.Dark(myBaseColor, (float)0.05)), new Point(40, 40));
//name
toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(25, 70));
toDrawOn.DrawString(BundleInfos.getBundleDisplayName(myItem), new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 115), new SolidBrush(Color.White), new Point(25, 70));
}
}
@ -206,7 +206,7 @@ namespace FModel
break;
}
toDrawOn.DrawString(count == "-1" ? all : any, new Font(FontUtilities.pfc.Families[1], 50), new SolidBrush(Color.White), new Point(100, theY + 22));
toDrawOn.DrawString(count == "-1" ? all : any, new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[1], 50), new SolidBrush(Color.White), new Point(100, theY + 22));
}
/// <summary>

View File

@ -249,7 +249,7 @@ namespace FModel
if (theItem.DisplayName != null)
{
string text = SearchResource.getTextByKey(theItem.DisplayName.Key, theItem.DisplayName.SourceString);
myGraphic.DrawString(text, new Font(FontUtilities.pfc.Families[0], 35), new SolidBrush(Color.White), new Point(522 / 2, 395), FontUtilities.centeredString);
myGraphic.DrawString(text, new Font(Settings.Default.IconLanguage == "Japanese" ? FontUtilities.pfc.Families[2] : FontUtilities.pfc.Families[0], 35), new SolidBrush(Color.White), new Point(522 / 2, 395), FontUtilities.centeredString);
}
}

View File

@ -33,6 +33,12 @@ namespace FModel
Marshal.Copy(_fontdata, 0, weirdData2, _fontLength);
pfc.AddMemoryFont(weirdData2, _fontLength);
_fontLength = Resources.BurbankBigCondensed_Black_vJapanese.Length;
_fontdata = Resources.BurbankBigCondensed_Black_vJapanese;
IntPtr weirdData3 = Marshal.AllocCoTaskMem(_fontLength);
Marshal.Copy(_fontdata, 0, weirdData3, _fontLength);
pfc.AddMemoryFont(weirdData3, _fontLength);
centeredString.Alignment = StringAlignment.Center;
rightString.Alignment = StringAlignment.Far;
leftString.Alignment = StringAlignment.Near;

View File

@ -80,6 +80,16 @@ namespace FModel.Properties {
}
}
/// <summary>
/// Recherche une ressource localisée de type System.Byte[].
/// </summary>
internal static byte[] BurbankBigCondensed_Black_vJapanese {
get {
object obj = ResourceManager.GetObject("BurbankBigCondensed_Black_vJapanese", resourceCulture);
return ((byte[])(obj));
}
}
/// <summary>
/// Recherche une ressource localisée de type System.Byte[].
/// </summary>

View File

@ -220,4 +220,7 @@
<data name="reload64" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\reload64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="BurbankBigCondensed_Black_vJapanese" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\BurbankBigCondensed-Black-vJapanese.otf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>

View File

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
// Ce code a été généré par un outil.
// Version du runtime :4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// Les modifications apportées à ce fichier peuvent provoquer un comportement incorrect et seront perdues si
// le code est régénéré.
// </auto-generated>
//------------------------------------------------------------------------------
@ -12,7 +12,7 @@ namespace FModel.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
@ -541,7 +541,7 @@ namespace FModel.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool createIconForCreativeGalleries {
get {
return ((bool)(this["createIconForCreativeGalleries"]));

View File

@ -132,7 +132,7 @@
<Value Profile="(Default)" />
</Setting>
<Setting Name="createIconForCreativeGalleries" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>