summaryrefslogtreecommitdiffstats
path: root/src/ui/edit.cpp
diff options
context:
space:
mode:
authorZaba999 <qrwfw5rp>2012-10-11 23:09:29 +0200
committerZaba999 <qrwfw5rp>2012-10-11 23:09:29 +0200
commit8a932fed3e5700af283017deab3cb1da11cb0dce (patch)
tree892d7a4068c843cb41bd202f078b042027a0a3d0 /src/ui/edit.cpp
parent3f7f013168e62693601ab57108d329ffaa924439 (diff)
downloadcolobot-8a932fed3e5700af283017deab3cb1da11cb0dce.tar.gz
colobot-8a932fed3e5700af283017deab3cb1da11cb0dce.tar.bz2
colobot-8a932fed3e5700af283017deab3cb1da11cb0dce.zip
Added saving user scripts on game save. Fixed bug in writing script to file.
Diffstat (limited to 'src/ui/edit.cpp')
-rw-r--r--src/ui/edit.cpp5
1 files changed, 2 insertions, 3 deletions
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;