More mess in pas2c:
- Store rendered type declaration of identifier
- Convert 'for' cycles properly (well, not sure, but I tried :P) into 'do .. while()'
#include <QMessageBox>
#include <QDir>
#include "qpushbuttonwithsound.h"
#include "DataManager.h"
#include "SDLInteraction.h"
#include "hwform.h"
#include "gameuiconfig.h"
QPushButtonWithSound::QPushButtonWithSound(QWidget *parent) :
QPushButton(parent),
isSoundEnabled(true)
{
connect(this, SIGNAL(clicked()), this, SLOT(buttonClicked()));
}
void QPushButtonWithSound::buttonClicked()
{
if ( !isSoundEnabled || !HWForm::config->isFrontendSoundEnabled())
return;
DataManager & dataMgr = DataManager::instance();
if (this->isEnabled())
SDLInteraction::instance().playSoundFile(dataMgr.findFileForRead("Sounds/roperelease.ogg"));
}