diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-09-13 22:56:29 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-09-13 22:56:29 +0000 |
commit | 3dc311a652d1fda1252903a974920395e56e5668 (patch) | |
tree | 7098d55015d28a4d973c5073d7c9e45ae03ec400 /src/gui/npc_text.cpp | |
parent | 78771718bf7af14273d7bb0090dccff97b00b397 (diff) | |
download | mana-3dc311a652d1fda1252903a974920395e56e5668.tar.gz mana-3dc311a652d1fda1252903a974920395e56e5668.tar.bz2 mana-3dc311a652d1fda1252903a974920395e56e5668.tar.xz mana-3dc311a652d1fda1252903a974920395e56e5668.zip |
Merged with SDL_NET_TEST branch.
Diffstat (limited to 'src/gui/npc_text.cpp')
-rw-r--r-- | src/gui/npc_text.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/npc_text.cpp b/src/gui/npc_text.cpp index 7fc59343..67a9e9a3 100644 --- a/src/gui/npc_text.cpp +++ b/src/gui/npc_text.cpp @@ -61,22 +61,24 @@ NpcTextDialog::~NpcTextDialog() delete scrollArea; } -void NpcTextDialog::setText(const char *text) +void +NpcTextDialog::setText(const char *text) { textBox->setText(text); } -void NpcTextDialog::addText(const char *text) +void +NpcTextDialog::addText(const std::string &text) { - textBox->setText( - textBox->getText() + std::string(text) + std::string("\n")); + textBox->setText(textBox->getText() + text + "\n"); } -void NpcTextDialog::action(const std::string& eventId) +void +NpcTextDialog::action(const std::string& eventId) { - WFIFOW(0) = net_w_value(0x00b9); - WFIFOL(2) = net_l_value(current_npc); - WFIFOSET(6); + writeWord(0, 0x00b9); + writeLong(2, current_npc); + writeSet(6); setText(""); setVisible(false); current_npc = 0; |