From f7c1149be85d90f05d55bc2c975432a6d9d6012e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 15 Feb 2011 04:25:14 +0200 Subject: Add auto wrap and lines limit for npc dialogs. --- src/gui/npcdialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/npcdialog.cpp b/src/gui/npcdialog.cpp index 1859329ab..6f4fcc037 100644 --- a/src/gui/npcdialog.cpp +++ b/src/gui/npcdialog.cpp @@ -74,8 +74,9 @@ NpcDialog::NpcDialog(int npcId) mItemLinkHandler = new ItemLinkHandler; // Setup output text box - mTextBox = new BrowserBox; + mTextBox = new BrowserBox(BrowserBox::AUTO_WRAP); mTextBox->setOpaque(false); + mTextBox->setMaxRow((int) config.getIntValue("ChatLogLength")); mTextBox->setLinkHandler(mItemLinkHandler); mScrollArea = new ScrollArea(mTextBox); -- cgit v1.2.3-60-g2f50