summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 21:59:21 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-03-23 22:00:09 +0100
commit99e8a3fd77b63a029fe02dcf771b6af1aad252ed (patch)
tree03c296d1f89859aae35336dfe2f58df09d256fd3 /src/gui/chat.cpp
parentfa8a4bf49100c0a1d5b96e00803f43bbbb861100 (diff)
parent347452b9b69ef3af29c577b7751082822e900c01 (diff)
downloadMana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.gz
Mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.bz2
Mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.tar.xz
Mana-99e8a3fd77b63a029fe02dcf771b6af1aad252ed.zip
Merge branch 'aethyra/master'
Conflicts: Many files.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 55bc2696..94a554e8 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -54,7 +54,7 @@ Window(""), mNetwork(network), mTmpVisible(false)
setWindowName("Chat");
setResizable(true);
- setDefaultSize(0, windowContainer->getHeight() - 123, 600, 123);
+ setDefaultSize(600, 123, ImageRect::LOWER_LEFT);
setMinWidth(150);
setMinHeight(90);
@@ -112,6 +112,12 @@ ChatWindow::~ChatWindow()
delete mParty;
}
+void ChatWindow::resetToDefaultSize()
+{
+ mRecorder->resetToDefaultSize();
+ Window::resetToDefaultSize();
+}
+
void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
{
// Trim whitespace
@@ -142,12 +148,12 @@ void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
// *implements actions in a backwards compatible way*
if (own == BY_PLAYER &&
- tmp.text.at(0) == '*' &&
- tmp.text.at(tmp.text.length()-1) == '*')
+ tmp.text.at(0) == '*' &&
+ tmp.text.at(tmp.text.length()-1) == '*')
{
- tmp.text[0] = ' ';
- tmp.text.erase(tmp.text.length() - 1);
- own = ACT_IS;
+ tmp.text[0] = ' ';
+ tmp.text.erase(tmp.text.length() - 1);
+ own = ACT_IS;
}
std::string lineColor = "##C";
@@ -629,9 +635,9 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
}
else if (command == "me")
{
- std::stringstream actionStr;
- actionStr << "*" << msg << "*";
- chatSend(player_node->getName(), actionStr.str());
+ std::stringstream actionStr;
+ actionStr << "*" << msg << "*";
+ chatSend(player_node->getName(), actionStr.str());
}
else
{