first colors and font sizes are skinnable now
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "chattools.h"
|
||||
#include "session.h"
|
||||
#include "configfile.h"
|
||||
#include "gametablestylereader.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
@@ -63,9 +64,11 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
|
||||
switch (myNotifyMode) {
|
||||
case 0: tempMsg = message;
|
||||
break;
|
||||
// lobby
|
||||
case 1: tempMsg = QString("<span style=\"font-weight:bold;\">"+message+"</span>");
|
||||
break;
|
||||
case 2: tempMsg = QString("<span style=\"color:#FFFF00;\">"+message+"</span>");
|
||||
// ingame
|
||||
case 2: tempMsg = QString("<span style=\"color:#"+myStyle->getChatTextNickNotifyColor()+";\">"+message+"</span>");
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
@@ -74,9 +77,11 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
|
||||
switch (myNotifyMode) {
|
||||
case 0: tempMsg = message;
|
||||
break;
|
||||
// lobby
|
||||
case 1: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
|
||||
break;
|
||||
case 2: tempMsg = QString("<span style=\"color:#FFFFFF;\">"+message+"</span>");
|
||||
// ingame
|
||||
case 2: tempMsg = QString("<span style=\"color:#"+myStyle->getChatTextColor()+";\">"+message+"</span>");
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
class Session;
|
||||
class ConfigFile;
|
||||
class GameTableStyleReader;
|
||||
|
||||
class ChatTools : public QObject
|
||||
{
|
||||
@@ -55,6 +56,8 @@ public slots:
|
||||
|
||||
void setPlayerNicksList(QStringList value) { myNickStringList = value; }
|
||||
void setMyNick ( const QString& theValue ) { myNick = theValue; }
|
||||
|
||||
void setMyStyle ( GameTableStyleReader* theValue ) { myStyle = theValue; }
|
||||
|
||||
|
||||
private:
|
||||
@@ -73,6 +76,8 @@ private:
|
||||
ConfigFile *myConfig;
|
||||
|
||||
QString myNick;
|
||||
|
||||
GameTableStyleReader *myStyle;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user