Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

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

More than 5 years have passed since last update.
  • .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

iotlt
IoT縛りの勉強会です。 毎月イベントを実施しているので是非遊びに来てください! 登壇者を中心にQiitaでも情報発信していきます。 https://iotlt.connpass.com
https://iotlt.connpass.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away