From 8a932fed3e5700af283017deab3cb1da11cb0dce Mon Sep 17 00:00:00 2001 From: Zaba999 Date: Thu, 11 Oct 2012 23:09:29 +0200 Subject: Added saving user scripts on game save. Fixed bug in writing script to file. --- src/ui/edit.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ui/edit.cpp') diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp index ca53a7a..547e73a 100644 --- a/src/ui/edit.cpp +++ b/src/ui/edit.cpp @@ -71,8 +71,6 @@ bool IsSep(int character) //! Object's constructor. - -//CEdit::CEdit(CInstanceManager* iMan) : CControl(iMan) CEdit::CEdit () : CControl () { Math::Point pos; @@ -3081,7 +3079,7 @@ void CEdit::Justif() if ( m_format.size() == 0 ) { // TODO check if good - + i += m_engine->GetText()->Justify(m_text+i, m_fontType, m_fontSize, width); } @@ -3137,6 +3135,7 @@ void CEdit::Justif() } if ( m_lineTotal >= EDITLINEMAX-2 ) break; } + if ( m_len > 0 && m_text[m_len-1] == '\n' ) { m_lineOffset[m_lineTotal] = m_len; -- cgit v1.2.3-1-g7c22