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
|
||||
//double so division keeps decimal points
|
||||
const double widthRatio = SampleFramework.GameWindowSize.Width;
|
||||
const double heightRatio = SampleFramework.GameWindowSize.Height;
|
||||
double widthRatio
|
||||
{
|
||||
get
|
||||
{
|
||||
return SampleFramework.GameWindowSize.Width;
|
||||
}
|
||||
}
|
||||
double heightRatio
|
||||
{
|
||||
get
|
||||
{
|
||||
return SampleFramework.GameWindowSize.Height;
|
||||
}
|
||||
}
|
||||
const int WM_SIZING = 0x214;
|
||||
const int WMSZ_LEFT = 1;
|
||||
const int WMSZ_RIGHT = 2;
|
||||
|
@ -4,7 +4,7 @@ namespace SampleFramework
|
||||
{
|
||||
public static class GameWindowSize
|
||||
{
|
||||
public const int Width = 1280;
|
||||
public const int Height = 720;
|
||||
public static int Width = 1280;
|
||||
public static int Height = 720;
|
||||
}
|
||||
}
|
||||
|
@ -1087,6 +1087,14 @@ namespace TJAPlayer3
|
||||
{
|
||||
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
|
||||
|
||||
#region [Background Scroll]
|
||||
@ -2653,6 +2661,7 @@ namespace TJAPlayer3
|
||||
public string Skin_Name = "Unknown";
|
||||
public string Skin_Version = "Unknown";
|
||||
public string Skin_Creator = "Unknown";
|
||||
public int[] Resolution = new int[] { 1280, 720 };
|
||||
#endregion
|
||||
|
||||
#region Config
|
||||
|
@ -1042,6 +1042,7 @@ namespace TJAPlayer3
|
||||
//-----------------------------
|
||||
#endregion
|
||||
}
|
||||
return;
|
||||
}
|
||||
//-----------------------------
|
||||
#endregion
|
||||
@ -2283,6 +2284,9 @@ for (int i = 0; i < 3; i++) {
|
||||
{
|
||||
Skin = new CSkin( TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName, false);
|
||||
TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName = TJAPlayer3.Skin.GetCurrentSkinSubfolderFullName( true ); // 旧指定のSkinフォルダが消滅していた場合に備える
|
||||
|
||||
ChangeResolution(TJAPlayer3.Skin.Resolution[0], TJAPlayer3.Skin.Resolution[1]);
|
||||
|
||||
Trace.TraceInformation( "スキンの初期化を完了しました。" );
|
||||
}
|
||||
catch (Exception e)
|
||||
@ -3071,6 +3075,28 @@ for (int i = 0; i < 3; i++) {
|
||||
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()
|
||||
{
|
||||
Trace.TraceInformation("スキン変更:" + TJAPlayer3.Skin.GetCurrentSkinSubfolderFullName(false));
|
||||
@ -3081,8 +3107,10 @@ for (int i = 0; i < 3; i++) {
|
||||
TJAPlayer3.Skin = null;
|
||||
TJAPlayer3.Skin = new CSkin(TJAPlayer3.ConfigIni.strSystemSkinSubfolderFullName, false);
|
||||
|
||||
|
||||
TJAPlayer3.Tx.DisposeTexture();
|
||||
|
||||
ChangeResolution(TJAPlayer3.Skin.Resolution[0], TJAPlayer3.Skin.Resolution[1]);
|
||||
|
||||
TJAPlayer3.Tx.LoadTexture();
|
||||
|
||||
TJAPlayer3.act文字コンソール.On活性化();
|
||||
|
Loading…
Reference in New Issue
Block a user