your own text in lobby-chat is colored now to easier seperate it from other messages. change internet game dialog maxlenght to 48.
This commit is contained in:
@@ -36,11 +36,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit">
|
<widget class="QLineEdit" name="lineEdit"/>
|
||||||
<property name="maxLength">
|
|
||||||
<number>12</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
@@ -49,6 +45,9 @@
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>in der Konfiguration speichern!</string>
|
<string>in der Konfiguration speichern!</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ changeContentDialogImpl::changeContentDialogImpl(QWidget *parent, ConfigFile *co
|
|||||||
label_Message->setText(tr("You cannot join Internet-Game-Lobby with \"Human Player\" as nickname.\nPlease choose another one."));
|
label_Message->setText(tr("You cannot join Internet-Game-Lobby with \"Human Player\" as nickname.\nPlease choose another one."));
|
||||||
label_lineLabel->setText(tr("Nick name:"));
|
label_lineLabel->setText(tr("Nick name:"));
|
||||||
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
|
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
|
||||||
|
lineEdit->setMaxLength(12);
|
||||||
checkBox->hide();
|
checkBox->hide();
|
||||||
this->setGeometry(this->x(), this->y(), this->width(), this->height()-20 );
|
this->setGeometry(this->x(), this->y(), this->width(), this->height()-20 );
|
||||||
}
|
}
|
||||||
@@ -45,18 +46,21 @@ changeContentDialogImpl::changeContentDialogImpl(QWidget *parent, ConfigFile *co
|
|||||||
label_Message->setText(tr("Your player name is already used by another player.\nPlease choose a different name."));
|
label_Message->setText(tr("Your player name is already used by another player.\nPlease choose a different name."));
|
||||||
label_lineLabel->setText(tr("Nick name:"));
|
label_lineLabel->setText(tr("Nick name:"));
|
||||||
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
|
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
|
||||||
|
lineEdit->setMaxLength(12);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CHANGE_NICK_INVALID: {
|
case CHANGE_NICK_INVALID: {
|
||||||
label_Message->setText(tr("The player name is too short, too long or invalid. Please choose another one."));
|
label_Message->setText(tr("The player name is too short, too long or invalid. Please choose another one."));
|
||||||
label_lineLabel->setText(tr("Nick name:"));
|
label_lineLabel->setText(tr("Nick name:"));
|
||||||
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
|
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("MyName").c_str()));
|
||||||
|
lineEdit->setMaxLength(12);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CHANGE_INET_GAME_NAME: {
|
case CHANGE_INET_GAME_NAME: {
|
||||||
label_Message->setText(tr("There is already a game with your choosen game name.\nPlease choose another one!"));
|
label_Message->setText(tr("There is already a game with your choosen game name.\nPlease choose another one!"));
|
||||||
label_lineLabel->setText(tr("Game name:"));
|
label_lineLabel->setText(tr("Game name:"));
|
||||||
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("InternetGameName").c_str()));
|
lineEdit->setText(QString::fromUtf8(myConfig->readConfigString("InternetGameName").c_str()));
|
||||||
|
lineEdit->setMaxLength(48);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ ChatTools::ChatTools(QLineEdit* l, ConfigFile *c, ChatType ct, QTextBrowser *b,
|
|||||||
{
|
{
|
||||||
myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str());
|
myNick = QString::fromUtf8(myConfig->readConfigString("MyName").c_str());
|
||||||
ignoreList = myConfig->readConfigStringList("PlayerIgnoreList");
|
ignoreList = myConfig->readConfigStringList("PlayerIgnoreList");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ChatTools::~ChatTools()
|
ChatTools::~ChatTools()
|
||||||
@@ -68,7 +69,7 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
|
|||||||
|
|
||||||
switch (myChatType) {
|
switch (myChatType) {
|
||||||
case INET_LOBBY_CHAT: {
|
case INET_LOBBY_CHAT: {
|
||||||
tempMsg = QString("<span style=\"font-weight:bold;\">"+message+"</span>");
|
tempMsg = QString("<span style=\"font-weight:bold; color:"+myLobby->palette().highlight().color().name()+";\">"+message+"</span>");
|
||||||
//play beep sound only in INET-lobby-chat
|
//play beep sound only in INET-lobby-chat
|
||||||
// TODO dont play when message is from yourself
|
// TODO dont play when message is from yourself
|
||||||
if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
|
if(myLobby->isVisible() && myConfig->readConfigInt("PlayLobbyChatNotification")) {
|
||||||
@@ -85,7 +86,7 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
switch (myChatType) {
|
switch (myChatType) {
|
||||||
case INET_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
|
case INET_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:normal; color:"+myLobby->palette().highlight().color().name()+";\">"+message+"</span>");
|
||||||
break;
|
break;
|
||||||
case LAN_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
|
case LAN_LOBBY_CHAT: tempMsg = QString("<span style=\"font-weight:normal;\">"+message+"</span>");
|
||||||
break;
|
break;
|
||||||
@@ -106,7 +107,7 @@ void ChatTools::receiveMessage(QString playerName, QString message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!nickFoundOnIgnoreList) {
|
if(!nickFoundOnIgnoreList) {
|
||||||
myTextBrowser->append(playerName + ": " + tempMsg);
|
myTextBrowser->append(playerName + ": " + tempMsg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,11 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLineEdit" name="lineEdit_gameName"/>
|
<widget class="QLineEdit" name="lineEdit_gameName">
|
||||||
|
<property name="maxLength">
|
||||||
|
<number>48</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
Reference in New Issue
Block a user