Merge branch 'main' of github.com:0auBSQ/TJAPlayer3-Develop-BSQ into main
This commit is contained in:
commit
7ff3b79ba2
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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,6 +2661,7 @@ 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
|
||||||
|
@ -1042,6 +1042,7 @@ namespace TJAPlayer3
|
|||||||
//-----------------------------
|
//-----------------------------
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
//-----------------------------
|
//-----------------------------
|
||||||
#endregion
|
#endregion
|
||||||
@ -2283,6 +2284,9 @@ for (int i = 0; i < 3; i++) {
|
|||||||
{
|
{
|
||||||
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,6 +3075,28 @@ for (int i = 0; i < 3; i++) {
|
|||||||
Trace.TraceInformation( this.listプラグイン.Count + " 個のプラグインを読み込みました。" );
|
Trace.TraceInformation( this.listプラグイン.Count + " 個のプラグインを読み込みました。" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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()
|
public void RefleshSkin()
|
||||||
{
|
{
|
||||||
Trace.TraceInformation("スキン変更:" + TJAPlayer3.Skin.GetCurrentSkinSubfolderFullName(false));
|
Trace.TraceInformation("スキン変更:" + TJAPlayer3.Skin.GetCurrentSkinSubfolderFullName(false));
|
||||||
@ -3081,8 +3107,10 @@ for (int i = 0; i < 3; i++) {
|
|||||||
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();
|
||||||
|
|
||||||
|
ChangeResolution(TJAPlayer3.Skin.Resolution[0], TJAPlayer3.Skin.Resolution[1]);
|
||||||
|
|
||||||
TJAPlayer3.Tx.LoadTexture();
|
TJAPlayer3.Tx.LoadTexture();
|
||||||
|
|
||||||
TJAPlayer3.act文字コンソール.On活性化();
|
TJAPlayer3.act文字コンソール.On活性化();
|
||||||
|
Loading…
Reference in New Issue
Block a user