LoginSignup
6
6

More than 5 years have passed since last update.

Windows 版でウィンドウサイズ指定方法

Last updated at Posted at 2014-09-05

Windows 版でウィンドウサイズを指定するには、"AppDalegate.cpp" の AppDelegate::applicationDidFinishLaunching() の中を以下のように修正し、createWithRect() をコールして、サイズを指定するといいぞ。

#define WIDTH 400
#define HEIGHT 640

bool AppDelegate::applicationDidFinishLaunching() {
  auto director = Director::getInstance();
  auto glview = director->getOpenGLView();
  if(!glview) {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
    glview = GLView::createWithRect("My Game", Rect(0, 0, WIDTH , HEIGHT ));
#else
    glview = GLView::create("My Game");
#endif
    director->setOpenGLView(glview);
  }
  :

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6