Beispiel #1
0
bool CPlayMusicButton::FrameMsg(CFrameMsg *msg) {
	if (_flag && !CMusicRoom::_musicHandler->isBusy()) {
		CMusicRoom *musicRoom = getMusicRoom();
		musicRoom->stopMusic();
		stopMovie();
		loadFrame(0);
		_flag = false;
	}

	return true;
}
Beispiel #2
0
bool CPlayMusicButton::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
	CMusicRoom *musicRoom = getMusicRoom();
	if (_flag) {
		musicRoom->stopMusic();
		stopMovie();
		loadFrame(0);
		_flag = false;
	} else {
		musicRoom->startMusic(100);
		playMovie(MOVIE_REPEAT);
		_ticks = getTicksCount();
		_flag = true;
	}

	return true;
}