# HG changeset patch # User unc0rr # Date 1355645132 -14400 # Node ID 1f81bcce3ee636be28f429605562fa9754111fa0 # Parent 734b069a418eccbc69990847aa47c3f09b362f91 Implement some more callbacks diff -r 734b069a418e -r 1f81bcce3ee6 QTfrontend/game.cpp --- a/QTfrontend/game.cpp Fri Dec 14 00:12:00 2012 +0400 +++ b/QTfrontend/game.cpp Sun Dec 16 12:05:32 2012 +0400 @@ -435,6 +435,11 @@ void HWGame::onChat(void* context, const char *msg, bool teamchat) { HWGame * game = (HWGame *) context; + + if(teamchat) + emit game->SendTeamMessage(QString::fromUtf8(msg)); + else + emit game->SendChat(QString::fromUtf8(msg)); } void HWGame::onConnect(void* context) @@ -477,6 +482,8 @@ void HWGame::onErrorMessage(void* context, const char *msg) { HWGame * game = (HWGame *) context; + + emit game->ErrorMessage(QString("Last two engine messages:\n%1").arg(QString::fromUtf8(msg))); } void HWGame::onGameRecorded(void *context, const uint8_t *record, size_t size, bool isSavegame) diff -r 734b069a418e -r 1f81bcce3ee6 QTfrontend/ui/widget/selectWeapon.cpp --- a/QTfrontend/ui/widget/selectWeapon.cpp Fri Dec 14 00:12:00 2012 +0400 +++ b/QTfrontend/ui/widget/selectWeapon.cpp Sun Dec 16 12:05:32 2012 +0400 @@ -84,7 +84,7 @@ QFrame(parent), m_numItems(numItems) { - wconf = new QSettings(cfgdir->absolutePath() + "/weapons.ini", QSettings::IniFormat, this); + wconf = new QSettings("physfs://weapons.ini", QSettings::IniFormat, this); for(int i = 0; i < cDefaultAmmos.size(); ++i) wconf->setValue(cDefaultAmmos[i].first, cDefaultAmmos[i].second);