Exemplo n.º 1
0
void introScreen(){
	GLCD.ClearScreen(BLACK);
  GLCD.DrawBitmap(icon, 32,0); //draw the bitmap at the given x,y position
  countdown(3);
  GLCD.ClearScreen();
  GLCD.SelectFont(Arial_14); // you can also make your own fonts, see playground for details   
  GLCD.CursorToXY(GLCD.Width/2 - 44, 3);
  GLCD.print("GLCD version ");
  GLCD.print(GLCD_VERSION, DEC);
  GLCD.DrawRoundRect(8,0,GLCD.Width-19,17, 5);  // rounded rectangle around text area   
  countdown(3);  
  GLCD.ClearScreen(); 
  scribble(5000);  // run for 5 seconds
  moveBall(6000); // kick ball for 6 seconds
  GLCD.SelectFont(System5x7, BLACK);
  showCharacters((char*)"5x7 font:", System5x7);
  countdown(3);
  showCharacters((char*)"Arial_14:", Arial_14);
  countdown(3);
  textAreaDemo();
  scrollingDemo();
}
void E002_Base_P420_CompletePopup::showPicture()
{

    //    get data
    CJLMSResource resource = CJLMSContentInterface::getInstance()->getResFile(mCurrentDiary, eFileType_Extend);
//    //
//        CCLog("%d", resource.menuID);
//    CCLog("%s", resource.szBGImageName.c_str());
//        CCLog("%s", resource.szCaptureImageName.c_str());
//        CCLog("%s", resource.szExtendData.c_str());
//    
    
    CJSprite* diaryLayer = CJSprite::create(resource.szBGImageName.c_str());
    
	diaryLayer->setColor(ccWHITE);
	diaryLayer->setPosition(winCenter);
	addChild(diaryLayer, kDepth0_backImage, kTagPicture);

    std::string flashInfo = resource.szExtendData.c_str();
    
    if (flashInfo == "")
    {
        resizeScalePicture();
        return;
    }
    
    std::vector<std::string> characters = THStringUtil::split(flashInfo.c_str(), '%');
    
    for (int i = 0; i < characters.size(); i++ )
    {
        E002_Base_DiaryAnimationInfo *info = new E002_Base_DiaryAnimationInfo();
        
        std::vector<std::string> characterInfo = THStringUtil::split(characters.at(i).c_str(), '/');
    
        info->setAniName(characterInfo.at(0));
        info->setNumber(atoi(characterInfo.at(1).c_str()));
        info->setPositionX(atof(characterInfo.at(2).c_str()));
        info->setPositionY(atof(characterInfo.at(3).c_str()));
        
        mShowingAnimation->push_back(info);
    }
    
    showCharacters();
}