summaryrefslogtreecommitdiffstats
path: root/src/ui/edit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/edit.cpp')
-rw-r--r--src/ui/edit.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp
index ca53a7a..e14b19d 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;
@@ -1796,7 +1794,7 @@ bool CEdit::ReadText(const char *filename, int addSize)
if ( SearchKey(buffer+i+5, slot) )
{
CRobotMain* main = CRobotMain::GetInstancePointer();
- res = main->GetInputBinding(slot).key;
+ res = main->GetInputBinding(slot).primary;
if ( res != 0 )
{
if ( GetResource(RES_KEY, res, iName) )
@@ -1815,7 +1813,7 @@ bool CEdit::ReadText(const char *filename, int addSize)
m_format[j] = font;
j ++;
- res = main->GetInputBinding(slot).joy;
+ res = main->GetInputBinding(slot).secondary;
if ( res != 0 )
{
if ( GetResource(RES_KEY, res, iName) )
@@ -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;