4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cocos2dx 3.0系で初期画面の色を変更する

Last updated at Posted at 2014-09-07
  • .hファイルの修正

class HelloWorld : public cocos2d::Layerを下記に変更。

HelloWorldScene.h
class HelloWorld : public cocos2d::LayerColor
  • .cppファイルの修正
HelloWorldScene.cpp
bool HelloWorld::init()
{
    //////////////////////////////
    // 1. super init first
    if ( !Layer::init() )
    {
        return false;
    }
    
    if(!LayerColor::initWithColor(Color4B(255, 255, 255, 255)))
    {
        return false;
    }

できました。 :tada:
参考URL:http://stackoverflow.com/questions/12117250/how-to-set-background-color-of-layer-in-cocos2d-x

4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?