1
0
mirror of synced 2024-11-28 09:20:53 +01:00

Merge branch 'main' of github.com:0auBSQ/TJAPlayer3-Develop-BSQ into main

This commit is contained in:
0aubsq 2022-06-25 12:28:28 +02:00
commit 7ff3b79ba2
4 changed files with 61 additions and 12 deletions

View File

@ -293,8 +293,20 @@ namespace SampleFramework
#region #23510 2010.11.14 yyagi add: from http://www.vcskicks.com/maintain-aspect-ratio.php #region #23510 2010.11.14 yyagi add: from http://www.vcskicks.com/maintain-aspect-ratio.php
//double so division keeps decimal points //double so division keeps decimal points
const double widthRatio = SampleFramework.GameWindowSize.Width; double widthRatio
const double heightRatio = SampleFramework.GameWindowSize.Height; {
get
{
return SampleFramework.GameWindowSize.Width;
}
}
double heightRatio
{
get
{
return SampleFramework.GameWindowSize.Height;
}
}
const int WM_SIZING = 0x214; const int WM_SIZING = 0x214;
const int WMSZ_LEFT = 1; const int WMSZ_LEFT = 1;
const int WMSZ_RIGHT = 2; const int WMSZ_RIGHT = 2;

View File

@ -4,7 +4,7 @@ namespace SampleFramework
{ {
public static class GameWindowSize public static class GameWindowSize
{ {
public const int Width = 1280; public static int Width = 1280;
public const int Height = 720; public static int Height = 720;
} }
} }

View File

@ -1087,6 +1087,14 @@ namespace TJAPlayer3
{ {
this.Skin_Creator = strParam; this.Skin_Creator = strParam;
} }
/*else if (strCommand == "Resolution")
{
string[] strSplit = strParam.Split(',');
for (int i = 0; i < 2; i++)
{
Resolution[i] = int.Parse(strSplit[i]);
}
}*/
#endregion #endregion
#region [Background Scroll] #region [Background Scroll]
@ -2653,10 +2661,11 @@ namespace TJAPlayer3
public string Skin_Name = "Unknown"; public string Skin_Name = "Unknown";
public string Skin_Version = "Unknown"; public string Skin_Version = "Unknown";
public string Skin_Creator = "Unknown"; public string Skin_Creator = "Unknown";
public int[] Resolution = new int[] { 1280, 720 };
#endregion #endregion
#region Config #region Config
public int Config_ItemText_Correction_X = 0; public int Config_ItemText_Correction_X = 0;
public int Config_ItemText_Correction_Y = 0; public int Config_ItemText_Correction_Y = 0;

View File

@ -1042,6 +1042,7 @@ namespace TJAPlayer3
//----------------------------- //-----------------------------
#endregion #endregion
} }
return;
} }
//----------------------------- //-----------------------------
#endregion #endregion
@ -2282,7 +2283,10 @@ for (int i = 0; i < 3; i++) {
try try
{ {
Skin = new CSkin( TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName, false); Skin = new CSkin( TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName, false);
TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName = TJAPlayer3.Skin.GetCurrentSkinSubfolderFullName( true ); // 旧指定のSkinフォルダが消滅していた場合に備える TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName = TJAPlayer3.Skin.GetCurrentSkinSubfolderFullName( true ); // 旧指定のSkinフォルダが消滅していた場合に備える
ChangeResolution(TJAPlayer3.Skin.Resolution[0], TJAPlayer3.Skin.Resolution[1]);
Trace.TraceInformation( "スキンの初期化を完了しました。" ); Trace.TraceInformation( "スキンの初期化を完了しました。" );
} }
catch (Exception e) catch (Exception e)
@ -3071,7 +3075,29 @@ for (int i = 0; i < 3; i++) {
Trace.TraceInformation( this.listプラグイン.Count + " 個のプラグインを読み込みました。" ); Trace.TraceInformation( this.listプラグイン.Count + " 個のプラグインを読み込みました。" );
} }
public void RefleshSkin() private void ChangeResolution(int nWidth, int nHeight)
{
if (base.GraphicsDeviceManager.CurrentSettings.BackBufferWidth == nWidth ||
base.GraphicsDeviceManager.CurrentSettings.BackBufferHeight == nHeight)
return;
currentClientSize = this.Window.ClientSize;
var state = base.Window.WindowState;
SampleFramework.GameWindowSize.Width = nWidth;
SampleFramework.GameWindowSize.Height = nHeight;
base.GraphicsDeviceManager.CurrentSettings.BackBufferWidth = nWidth;
base.GraphicsDeviceManager.CurrentSettings.BackBufferHeight = nHeight;
base.GraphicsDeviceManager.ChangeDevice(base.GraphicsDeviceManager.CurrentSettings);
base.Window.ClientSize = new Size(currentClientSize.Width, currentClientSize.Height);
base.Window.WindowState = state;
}
public void RefleshSkin()
{ {
Trace.TraceInformation("スキン変更:" + TJAPlayer3.Skin.GetCurrentSkinSubfolderFullName(false)); Trace.TraceInformation("スキン変更:" + TJAPlayer3.Skin.GetCurrentSkinSubfolderFullName(false));
@ -3080,10 +3106,12 @@ for (int i = 0; i < 3; i++) {
TJAPlayer3.Skin.Dispose(); TJAPlayer3.Skin.Dispose();
TJAPlayer3.Skin = null; TJAPlayer3.Skin = null;
TJAPlayer3.Skin = new CSkin(TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName, false); TJAPlayer3.Skin = new CSkin(TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName, false);
TJAPlayer3.Tx.DisposeTexture();
TJAPlayer3.Tx.DisposeTexture();
TJAPlayer3.Tx.LoadTexture(); ChangeResolution(TJAPlayer3.Skin.Resolution[0], TJAPlayer3.Skin.Resolution[1]);
TJAPlayer3.Tx.LoadTexture();
TJAPlayer3.act文字コンソール.On活性化(); TJAPlayer3.act文字コンソール.On活性化();
} }