Commit 2ef38969 authored by kenan's avatar kenan

x,y

parent 74b70f52
...@@ -64,8 +64,9 @@ bool Game::Initialize() { ...@@ -64,8 +64,9 @@ bool Game::Initialize() {
int w = 1024.0*xScale; int w = 1024.0*xScale;
int h = 640.0*yScale; int h = 640.0*yScale;
params.WindowSize = irr::core::dimension2d<u32>(0, 0); params.WindowSize = irr::core::dimension2d<u32>(0, 0);
params.WindowLeft = (screenH - w)/2.0; //每一个元素得left和top都需要改
params.WindowTop = (screenW - h)/2.0; xStart = (screenH - w)/2.0;
yStart = (screenW - h)/2.0;
#else #else
if(gameConf.use_d3d) if(gameConf.use_d3d)
params.DriverType = irr::video::EDT_DIRECT3D9; params.DriverType = irr::video::EDT_DIRECT3D9;
...@@ -95,7 +96,7 @@ bool Game::Initialize() { ...@@ -95,7 +96,7 @@ bool Game::Initialize() {
* yScale = android::getScreenHeight(app) / 640.0; * yScale = android::getScreenHeight(app) / 640.0;
* }//start ygocore when mobile is in landscape mode, or using Android tablets or TV.*/ * }//start ygocore when mobile is in landscape mode, or using Android tablets or TV.*/
char log_scale[256] = {0}; char log_scale[256] = {0};
sprintf(log_scale, "xScale = %f, yScale = %f", xScale, yScale); sprintf(log_scale, "xScale = %f, yScale = %f, xStart=%f, yStart=%f", xScale, yScale, xStart, yStart);
Printer::log(log_scale); Printer::log(log_scale);
//io::path databaseDir = options->getDBDir(); //io::path databaseDir = options->getDBDir();
io::path workingDir = options->getWorkDir(); io::path workingDir = options->getWorkDir();
......
...@@ -528,7 +528,9 @@ public: ...@@ -528,7 +528,9 @@ public:
//cancel or finish //cancel or finish
irr::gui::IGUIButton* btnCancelOrFinish; irr::gui::IGUIButton* btnCancelOrFinish;
float xScale; float xScale;
float yScale; float yScale;
float xStart;
float yStart;
IYGOSoundEffectPlayer* soundEffectPlayer; IYGOSoundEffectPlayer* soundEffectPlayer;
#ifdef _IRR_ANDROID_PLATFORM_ #ifdef _IRR_ANDROID_PLATFORM_
ANDROID_APP appMain; ANDROID_APP appMain;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment