2013-01-25 10:29:39 +08:00
|
|
|
#include "MainSceneHelper.h"
|
|
|
|
|
|
|
|
CCMenuItemImage * CCBHelper::mBtnRun = NULL;
|
|
|
|
CCMenuItemImage * CCBHelper::mBtnPair = NULL;
|
|
|
|
CCMenuItemImage * CCBHelper::mBtnReset = NULL;
|
|
|
|
|
2013-04-18 08:24:59 +08:00
|
|
|
std::string CCBHelper::mLblStatus_prev = "";
|
|
|
|
std::string CCBHelper::mLblStatus_str = "";
|
|
|
|
std::string CCBHelper::mLblInstructions_prev= "";
|
|
|
|
std::string CCBHelper::mLblInstructions_str= "";
|
|
|
|
std::string CCBHelper::mLblPair_prev = "";
|
|
|
|
std::string CCBHelper::mLblPair_str = "";
|
|
|
|
bool CCBHelper::gameAvailable = false;
|
2013-01-25 10:29:39 +08:00
|
|
|
|
|
|
|
void CCBHelper::setStatusMessage(std::string str) {
|
2013-04-18 08:24:59 +08:00
|
|
|
if(mLblStatus_prev.compare(str) != 0) {
|
|
|
|
mLblStatus_prev = str;
|
|
|
|
mLblStatus_str = str;
|
|
|
|
}
|
2013-01-25 10:29:39 +08:00
|
|
|
}
|
|
|
|
|
2013-04-18 08:24:59 +08:00
|
|
|
void CCBHelper::setInstructionsMessage(std::string str) {
|
|
|
|
if(mLblInstructions_prev.compare(str) != 0) {
|
|
|
|
mLblInstructions_prev = str;
|
|
|
|
mLblInstructions_str = str;
|
|
|
|
}
|
2013-01-25 10:29:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-04-18 08:24:59 +08:00
|
|
|
void CCBHelper::setPairMessage(std::string str) {
|
|
|
|
if(mLblPair_prev.compare(str) != 0) {
|
|
|
|
mLblPair_prev = str;
|
|
|
|
mLblPair_str = str;
|
|
|
|
}
|
2013-01-25 10:29:39 +08:00
|
|
|
}
|
|
|
|
|
2013-04-18 08:24:59 +08:00
|
|
|
bool CCBHelper::checkIsMainJSPresent() {
|
|
|
|
gameAvailable = CCFileUtils::sharedFileUtils()->isFileExist(CCFileUtils::sharedFileUtils()->fullPathForFilename("main.js"));
|
2013-01-25 10:29:39 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
bool CCBHelper::isMainJSPresent() {
|
2013-04-18 08:24:59 +08:00
|
|
|
return gameAvailable;
|
2013-01-25 10:29:39 +08:00
|
|
|
}
|
|
|
|
|