Allow Skins to load their own fonts (#507)
Can be loaded via. name of the font (must be installed first) or can use file directory
This commit is contained in:
parent
42a128d76a
commit
49be86d49f
@ -79,6 +79,11 @@ namespace FDK
|
||||
}
|
||||
}
|
||||
|
||||
public static bool FontExists(string fontpath)
|
||||
{
|
||||
return SKFontManager.Default.FontFamilies.Contains(fontpath) || File.Exists(fontpath);
|
||||
}
|
||||
|
||||
#region [ コンストラクタ ]
|
||||
public CFontRenderer(string fontpath, int pt, FontStyle style)
|
||||
{
|
||||
|
@ -1105,6 +1105,22 @@ namespace TJAPlayer3
|
||||
Resolution[i] = int.Parse(strSplit[i]);
|
||||
}
|
||||
}
|
||||
else if (strCommand == "FontName")
|
||||
{
|
||||
strParam = strParam.Replace('/', System.IO.Path.DirectorySeparatorChar);
|
||||
strParam = strParam.Replace('\\', System.IO.Path.DirectorySeparatorChar);
|
||||
if (HPrivateFastFont.FontExists(strParam)) FontName = strParam;
|
||||
strParam = Path(strParam);
|
||||
if (HPrivateFastFont.FontExists(strParam)) FontName = strParam;
|
||||
}
|
||||
else if (strCommand == "BoxFontName")
|
||||
{
|
||||
strParam = strParam.Replace('/', System.IO.Path.DirectorySeparatorChar);
|
||||
strParam = strParam.Replace('\\', System.IO.Path.DirectorySeparatorChar);
|
||||
if (HPrivateFastFont.FontExists(strParam)) BoxFontName = strParam;
|
||||
strParam = Path(strParam);
|
||||
if (HPrivateFastFont.FontExists(Path(strParam))) BoxFontName = strParam;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region [Background Scroll]
|
||||
@ -8343,6 +8359,8 @@ namespace TJAPlayer3
|
||||
public string Skin_Version = "Unknown";
|
||||
public string Skin_Creator = "Unknown";
|
||||
public int[] Resolution = new int[] { 1280, 720 };
|
||||
public string FontName = TJAPlayer3.ConfigIni.FontName;
|
||||
public string BoxFontName = TJAPlayer3.ConfigIni.BoxFontName;
|
||||
#endregion
|
||||
|
||||
#region Config
|
||||
|
@ -164,20 +164,10 @@ namespace TJAPlayer3
|
||||
&& _pfModalTitleFull != null)
|
||||
return;
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
_pfModalContentHalf = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Modal_Font_ModalContentHalf_Size);
|
||||
_pfModalTitleHalf = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Modal_Font_ModalTitleHalf_Size);
|
||||
_pfModalContentFull = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Modal_Font_ModalContentFull_Size);
|
||||
_pfModalTitleFull = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Modal_Font_ModalTitleFull_Size);
|
||||
}
|
||||
else
|
||||
{
|
||||
_pfModalContentHalf = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Modal_Font_ModalContentHalf_Size);
|
||||
_pfModalTitleHalf = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Modal_Font_ModalTitleHalf_Size);
|
||||
_pfModalContentFull = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Modal_Font_ModalContentFull_Size);
|
||||
_pfModalTitleFull = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Modal_Font_ModalTitleFull_Size);
|
||||
}
|
||||
_pfModalContentHalf = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Modal_Font_ModalContentHalf_Size);
|
||||
_pfModalTitleHalf = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Modal_Font_ModalTitleHalf_Size);
|
||||
_pfModalContentFull = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Modal_Font_ModalContentFull_Size);
|
||||
_pfModalTitleFull = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Modal_Font_ModalTitleFull_Size);
|
||||
}
|
||||
|
||||
#region [Enum definitions]
|
||||
|
@ -12,21 +12,26 @@ namespace TJAPlayer3
|
||||
{
|
||||
static string DefaultFont = CFontRenderer.DefaultFontName;
|
||||
|
||||
public static bool FontExists(string fontpath)
|
||||
{
|
||||
return CFontRenderer.FontExists(fontpath);
|
||||
}
|
||||
|
||||
public static CCachedFontRenderer tInstantiateFont(string fontName, int scale)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(fontName))
|
||||
if (FontExists(fontName))
|
||||
return (new CCachedFontRenderer(fontName, scale));
|
||||
return (new CCachedFontRenderer(DefaultFont, scale));
|
||||
}
|
||||
|
||||
public static CCachedFontRenderer tInstantiateMainFont(int scale)
|
||||
{
|
||||
return tInstantiateFont(TJAPlayer3.ConfigIni.FontName, scale);
|
||||
return tInstantiateFont(TJAPlayer3.Skin.FontName, scale);
|
||||
}
|
||||
|
||||
public static CCachedFontRenderer tInstantiateBoxFont(int scale)
|
||||
{
|
||||
return tInstantiateFont(TJAPlayer3.ConfigIni.BoxFontName, scale);
|
||||
return tInstantiateFont(TJAPlayer3.Skin.BoxFontName, scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,15 +113,8 @@ namespace TJAPlayer3
|
||||
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
this.pfMenuTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[0]);
|
||||
else
|
||||
this.pfMenuTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[0]);
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.BoxFontName))
|
||||
this.pfBoxText = new CCachedFontRenderer(TJAPlayer3.ConfigIni.BoxFontName, TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[1]);
|
||||
else
|
||||
this.pfBoxText = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[1]);
|
||||
this.pfMenuTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[0]);
|
||||
this.pfBoxText = HPrivateFastFont.tInstantiateBoxFont(TJAPlayer3.Skin.Title_ModeSelect_Title_Scale[1]);
|
||||
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
|
@ -1002,10 +1002,7 @@ namespace TJAPlayer3
|
||||
}
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
if ( !string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
this.prvFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Config_Font_Scale); // t項目リストの設定 の前に必要
|
||||
else
|
||||
this.prvFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Config_Font_Scale);
|
||||
this.prvFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Config_Font_Scale); // t項目リストの設定 の前に必要
|
||||
|
||||
//this.tx通常項目行パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_itembox.png" ), false );
|
||||
//this.txその他項目行パネル = CDTXMania.tテクスチャの生成( CSkin.Path( @"Graphics\4_itembox other.png" ), false );
|
||||
|
@ -146,7 +146,7 @@ namespace TJAPlayer3
|
||||
|
||||
txMenuItemLeft = new CTexture[strMenuItem.Length, 2];
|
||||
|
||||
using (var prvFont = new CCachedFontRenderer(string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName) ? CFontRenderer.DefaultFontName : TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Config_Font_Scale))
|
||||
using (var prvFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Config_Font_Scale))
|
||||
{
|
||||
for (int i = 0; i < strMenuItem.Length; i++)
|
||||
{
|
||||
@ -172,9 +172,9 @@ namespace TJAPlayer3
|
||||
|
||||
public override void CreateManagedResource() // OPTIONと画像以外共通
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
if (HPrivateFastFont.FontExists(TJAPlayer3.Skin.FontName))
|
||||
{
|
||||
this.ftフォント = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, (int)TJAPlayer3.Skin.Config_Font_Scale_Description, CFontRenderer.FontStyle.Bold);
|
||||
this.ftフォント = new CCachedFontRenderer(TJAPlayer3.Skin.FontName, (int)TJAPlayer3.Skin.Config_Font_Scale_Description, CFontRenderer.FontStyle.Bold);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -73,15 +73,8 @@ namespace TJAPlayer3
|
||||
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
pfDanSong = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DaniSelect_Font_DanSong_Size);
|
||||
else
|
||||
pfDanSong = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.DaniSelect_Font_DanSong_Size);
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
this.pfExamFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DaniSelect_Font_Exam_Size);
|
||||
else
|
||||
this.pfExamFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.DaniSelect_Font_Exam_Size);
|
||||
this.pfDanSong = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DaniSelect_Font_DanSong_Size);
|
||||
this.pfExamFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DaniSelect_Font_Exam_Size);
|
||||
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
@ -337,7 +330,7 @@ namespace TJAPlayer3
|
||||
));
|
||||
|
||||
if (pfDanPlateTitle == null)
|
||||
pfDanPlateTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DaniSelect_DanPlateTitle_Size);
|
||||
pfDanPlateTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DaniSelect_DanPlateTitle_Size);
|
||||
|
||||
string titleTmp = "";
|
||||
|
||||
@ -358,7 +351,7 @@ namespace TJAPlayer3
|
||||
public static void tDisplayDanIcon(int count, float x, float y, int opacity, float scale, bool showFade = false)
|
||||
{
|
||||
if (pfDanIconTitle == null)
|
||||
pfDanIconTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DaniSelect_DanIconTitle_Size);
|
||||
pfDanIconTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DaniSelect_DanIconTitle_Size);
|
||||
|
||||
string ex = "th";
|
||||
switch (count)
|
||||
|
@ -140,7 +140,7 @@ namespace TJAPlayer3
|
||||
}
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
OptionFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_Option_Font_Scale);
|
||||
OptionFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_Option_Font_Scale);
|
||||
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
|
@ -45,16 +45,8 @@ namespace TJAPlayer3
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
// Ressource allocation
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
pfTitleFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_DanInfo_Title_Size);
|
||||
else
|
||||
pfTitleFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongSelect_DanInfo_Title_Size);
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
pfExamFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_DanInfo_Exam_Size);
|
||||
else
|
||||
pfExamFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongSelect_DanInfo_Exam_Size);
|
||||
pfTitleFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_DanInfo_Title_Size);
|
||||
pfExamFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_DanInfo_Exam_Size);
|
||||
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
|
@ -96,10 +96,7 @@ namespace TJAPlayer3
|
||||
{
|
||||
if (prvFont == null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
prvFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.PopupMenu_Font_Size);
|
||||
else
|
||||
prvFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.PopupMenu_Font_Size);
|
||||
prvFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.PopupMenu_Font_Size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1008,8 +1008,7 @@ namespace TJAPlayer3
|
||||
}
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
CFontRenderer.FontStyle regular = CFontRenderer.FontStyle.Regular;
|
||||
this.ft曲リスト用フォント = new CCachedFontRenderer( TJAPlayer3.ConfigIni.FontName, 40, regular );
|
||||
this.ft曲リスト用フォント = HPrivateFastFont.tInstantiateMainFont(40);
|
||||
|
||||
int c = ( CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja" ) ? 0 : 1;
|
||||
|
||||
|
@ -151,16 +151,8 @@ namespace TJAPlayer3
|
||||
}
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
this.pfTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_MusicName_Scale);
|
||||
this.pfSubTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.SongSelect_Subtitle_Scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pfTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongSelect_MusicName_Scale);
|
||||
this.pfSubTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongSelect_Subtitle_Scale);
|
||||
}
|
||||
this.pfTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_MusicName_Scale);
|
||||
this.pfSubTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongSelect_Subtitle_Scale);
|
||||
|
||||
// this.soundSelectAnnounce = TJAPlayer3.Sound管理.tサウンドを生成する( CSkin.Path( @"Sounds{Path.DirectorySeparatorChar}DiffSelect.ogg" ), ESoundGroup.SoundEffect );
|
||||
|
||||
|
@ -181,27 +181,10 @@ namespace TJAPlayer3
|
||||
}
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
if( !string.IsNullOrEmpty( TJAPlayer3.ConfigIni.FontName ) )
|
||||
{
|
||||
this.pfTITLE = new CCachedFontRenderer( TJAPlayer3.ConfigIni.FontName , TJAPlayer3.Skin.SongLoading_Title_FontSize );
|
||||
this.pfSUBTITLE = new CCachedFontRenderer( TJAPlayer3.ConfigIni.FontName , TJAPlayer3.Skin.SongLoading_SubTitle_FontSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pfTITLE = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongLoading_Title_FontSize);
|
||||
this.pfSUBTITLE = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.SongLoading_SubTitle_FontSize);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
pfDanTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Game_DanC_Title_Size);
|
||||
pfDanSubTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Game_DanC_SubTitle_Size);
|
||||
}
|
||||
else
|
||||
{
|
||||
pfDanTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Game_DanC_Title_Size);
|
||||
pfDanSubTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Game_DanC_SubTitle_Size);
|
||||
}
|
||||
this.pfTITLE = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongLoading_Title_FontSize );
|
||||
this.pfSUBTITLE = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.SongLoading_SubTitle_FontSize);
|
||||
pfDanTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Game_DanC_Title_Size);
|
||||
pfDanSubTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Game_DanC_SubTitle_Size);
|
||||
|
||||
this.tx背景 = TJAPlayer3.tテクスチャの生成( this.strSTAGEFILE, false );
|
||||
//this.txSongnamePlate = CDTXMania.tテクスチャの生成( CSkin.Path( @$"Graphics{Path.DirectorySeparatorChar}6_SongnamePlate.png" ) );
|
||||
|
@ -147,10 +147,7 @@ namespace TJAPlayer3
|
||||
this.txGENRE.color4 = CConversion.ColorToColor4(stageColor);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
pfGENRE = new CCachedFontRenderer(TJAPlayer3.ConfigIni.BoxFontName, TJAPlayer3.Skin.Game_GenreText_FontSize);
|
||||
else
|
||||
pfGENRE = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Game_GenreText_FontSize);
|
||||
pfGENRE = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Game_GenreText_FontSize);
|
||||
|
||||
this.ttkGENRE = new TitleTextureKey(genreName, this.pfGENRE, Color.White, Color.Black, 1000);
|
||||
|
||||
|
@ -124,10 +124,7 @@ namespace TJAPlayer3
|
||||
this.ct虹アニメ = new CCounter(0, TJAPlayer3.Skin.Game_Gauge_Dan_Rainbow_Ptn - 1, 30, TJAPlayer3.Timer);
|
||||
this.ct虹透明度 = new CCounter(0, TJAPlayer3.Skin.Game_Gauge_Rainbow_Timer - 1, 1, TJAPlayer3.Timer);
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
this.pfExamFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Game_DanC_ExamFont_Size);
|
||||
else
|
||||
this.pfExamFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Game_DanC_ExamFont_Size);
|
||||
this.pfExamFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Game_DanC_ExamFont_Size);
|
||||
|
||||
this.ttkExams = new TitleTextureKey[(int)Exam.Type.Total];
|
||||
for (int i = 0; i < this.ttkExams.Length; i++)
|
||||
|
@ -284,8 +284,8 @@ namespace TJAPlayer3
|
||||
}
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
pfSpeechText = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Result_Speech_Text_Size);
|
||||
pfAISectionText = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Result_AIBattle_SectionText_Scale);
|
||||
pfSpeechText = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Result_Speech_Text_Size);
|
||||
pfAISectionText = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Result_AIBattle_SectionText_Scale);
|
||||
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
|
@ -60,14 +60,7 @@ namespace TJAPlayer3
|
||||
}
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
if( !string.IsNullOrEmpty( TJAPlayer3.ConfigIni.FontName) )
|
||||
{
|
||||
this.pfMusicName = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Result_MusicName_FontSize);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pfMusicName = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Result_MusicName_FontSize);
|
||||
}
|
||||
this.pfMusicName = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Result_MusicName_FontSize);
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
public override void ReleaseManagedResource()
|
||||
|
@ -869,27 +869,11 @@ namespace TJAPlayer3
|
||||
}
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
this.pfTowerText = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerResult_Font_TowerText);
|
||||
this.pfTowerText48 = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerResult_Font_TowerText48);
|
||||
this.pfTowerText72 = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerResult_Font_TowerText72);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pfTowerText = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerResult_Font_TowerText);
|
||||
this.pfTowerText48 = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerResult_Font_TowerText48);
|
||||
this.pfTowerText72 = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerResult_Font_TowerText72);
|
||||
}
|
||||
this.pfTowerText = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerResult_Font_TowerText);
|
||||
this.pfTowerText48 = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerResult_Font_TowerText48);
|
||||
this.pfTowerText72 = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerResult_Font_TowerText72);
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
this.pfDanTitles = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.DanResult_Font_DanTitles_Size);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pfDanTitles = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.DanResult_Font_DanTitles_Size);
|
||||
}
|
||||
this.pfDanTitles = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.DanResult_Font_DanTitles_Size);
|
||||
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
|
@ -41,11 +41,7 @@ namespace TJAPlayer3
|
||||
|
||||
bInSongPlayed = false;
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
this.pfHeyaFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Heya_Font_Scale);
|
||||
else
|
||||
this.pfHeyaFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Heya_Font_Scale);
|
||||
this.pfHeyaFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Heya_Font_Scale);
|
||||
|
||||
ScrollCounter = new CCounter(0, 1000, 0.15f, TJAPlayer3.Timer);
|
||||
|
||||
|
@ -119,17 +119,8 @@ namespace TJAPlayer3
|
||||
{
|
||||
// Ressource allocation
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
this.pfOLFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.OnlineLounge_Font_OLFont);
|
||||
this.pfOLFontLarge = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.OnlineLounge_Font_OLFontLarge);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pfOLFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.OnlineLounge_Font_OLFont);
|
||||
this.pfOLFontLarge = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.OnlineLounge_Font_OLFontLarge);
|
||||
}
|
||||
this.pfOLFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.OnlineLounge_Font_OLFont);
|
||||
this.pfOLFontLarge = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.OnlineLounge_Font_OLFontLarge);
|
||||
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
|
@ -59,15 +59,8 @@ namespace TJAPlayer3
|
||||
{
|
||||
// Ressource allocation
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
pfTitleFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerSelect_Title_Size);
|
||||
else
|
||||
pfTitleFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerSelect_Title_Size);
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
pfSubTitleFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.TowerSelect_SubTitle_Size);
|
||||
else
|
||||
pfSubTitleFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.TowerSelect_SubTitle_Size);
|
||||
pfTitleFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerSelect_Title_Size);
|
||||
pfSubTitleFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.TowerSelect_SubTitle_Size);
|
||||
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
|
@ -32,14 +32,7 @@ namespace TJAPlayer3
|
||||
private void tReloadFonts()
|
||||
{
|
||||
_pfEncyclopediaMenu?.Dispose();
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
_pfEncyclopediaMenu = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.OpenEncyclopedia_Font_EncyclopediaMenu_Size);
|
||||
}
|
||||
else
|
||||
{
|
||||
_pfEncyclopediaMenu = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.OpenEncyclopedia_Font_EncyclopediaMenu_Size);
|
||||
}
|
||||
_pfEncyclopediaMenu = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.OpenEncyclopedia_Font_EncyclopediaMenu_Size);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -218,11 +218,7 @@ namespace TJAPlayer3
|
||||
|
||||
public override void CreateManagedResource()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
this.MenuFont = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.Heya_Font_Scale);
|
||||
else
|
||||
this.MenuFont = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.Heya_Font_Scale);
|
||||
|
||||
this.MenuFont = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.Heya_Font_Scale);
|
||||
base.CreateManagedResource();
|
||||
}
|
||||
|
||||
|
@ -17,35 +17,17 @@ namespace TJAPlayer3
|
||||
{
|
||||
this.pfName[player]?.Dispose();
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
|
||||
this.pfName[player] = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
|
||||
this.pfName[player] = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
|
||||
else
|
||||
this.pfName[player] = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (TJAPlayer3.SaveFileInstances[player].data.Title == "" || TJAPlayer3.SaveFileInstances[player].data.Title == null)
|
||||
this.pfName[player] = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.NamePlate_Font_Name_Size_Normal);
|
||||
else
|
||||
this.pfName[player] = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
|
||||
}
|
||||
this.pfName[player] = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Name_Size_WithTitle);
|
||||
}
|
||||
|
||||
this.pfTitle?.Dispose();
|
||||
this.pfdan?.Dispose();
|
||||
|
||||
if (!string.IsNullOrEmpty(TJAPlayer3.ConfigIni.FontName))
|
||||
{
|
||||
this.pfTitle = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.NamePlate_Font_Title_Size);
|
||||
this.pfdan = new CCachedFontRenderer(TJAPlayer3.ConfigIni.FontName, TJAPlayer3.Skin.NamePlate_Font_Dan_Size);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.pfTitle = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.NamePlate_Font_Title_Size);
|
||||
this.pfdan = new CCachedFontRenderer(CFontRenderer.DefaultFontName, TJAPlayer3.Skin.NamePlate_Font_Dan_Size);
|
||||
}
|
||||
this.pfTitle = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Title_Size);
|
||||
this.pfdan = HPrivateFastFont.tInstantiateMainFont(TJAPlayer3.Skin.NamePlate_Font_Dan_Size);
|
||||
}
|
||||
|
||||
public CNamePlate()
|
||||
|
Loading…
Reference in New Issue
Block a user