第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

c++調(diào)用了圖片,程序編譯通過了,運(yùn)行不了

c++調(diào)用了圖片,程序編譯通過了,運(yùn)行不了

1325558944 2017-06-24 22:22:43
#include?"clockLayer.h" ? bool?clockLayer::init() { ????Size?winSize?=?Director::getInstance()->getWinSize();//獲取窗口大小 ????MenuItemLabel?*?menuItem?=?MenuItemLabel::create(Label::createWithSystemFont ????????("back","",32),CC_CALLBACK_1(clockLayer::menuCallBack,this)); ????menuItem->setPosition(Vec2(winSize.width*0.9,winSize.height*0.9));//屏幕右上角 ????auto?menu?=?Menu::create(menuItem,NULL); ????menu->setPosition(Point::ZERO); ????this->addChild(menu); ? ????ahour?=?Sprite::create("resource\shi.png"); ????ahour->setPosition(Vec2(winSize.width/2,winSize.height/2)); ????ahour->setScale(0.5);//圖片較大,縮放成原來的0.5倍 ????this->addChild(ahour); ? ????aminute?=?Sprite::create("resource/fen.jpg"); ????aminute->setPosition(Vec2(winSize.width/2,winSize.height/2)); ????aminute->setScale(0.5);//圖片較大,縮放成原來的0.5倍 ????this->addChild(aminute); ? ????asecond?=?Sprite::create("resource/miao.jpg"); ????asecond->setPosition(Vec2(winSize.width/2,winSize.height/2)); ????asecond->setScale(0.5);//圖片較大,縮放成原來的0.5倍 ????this->addChild(asecond); ? ????abackground?=?Sprite::create("resource\background.jpg"); //??abackground?=?Sprite::createWithSpriteFrame("resource\background.jpg"); //??abackground?=?Sprite::create("Mygame\resource\HelloWorld.png"); ????abackground->setPosition(Vec2(winSize.width*0.5,winSize.height*0.5)); ????abackground->setScale(0.5);//圖片較大,縮放成原來的0.5倍 ????this->addChild(abackground,1); ? ????return?true; ? } ? void?clockLayer::menuCallBack(Ref?*pSender) { ? ? } void?clockLayer::timeUpdate(float?dt) { ? ? }
查看完整描述

1 回答

已采納
?
MR帽子先生

TA貢獻(xiàn)245條經(jīng)驗(yàn) 獲得超106個(gè)贊

代碼寫錯(cuò)了 你圖片地址寫錯(cuò)了,請(qǐng)仔細(xì)檢查一下?。?!

希望這對(duì)你有幫助,祝您學(xué)習(xí)愉快!

查看完整回答
反對(duì) 回復(fù) 2017-06-25
  • 1325558944
    1325558944
    圖片地址要寫源圖片地址嗎?我看視頻老師說添加進(jìn)來就可以直接使用了
  • 1325558944
    1325558944
    謝謝老師,可以了,是圖片沒有放到工程里
  • 1 回答
  • 0 關(guān)注
  • 1777 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)