diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-18 17:52:36 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-09-18 17:52:36 +0200 |
commit | da5d4edeb3a41462ec987cb4994a6897823f3f76 (patch) | |
tree | 64f213a687681373bee28eb5283fc9023bee6b2b /src/ui/list.cpp | |
parent | 4b67386a697c27186b6eb4809bea9547372dacd7 (diff) | |
download | colobot-da5d4edeb3a41462ec987cb4994a6897823f3f76.tar.gz colobot-da5d4edeb3a41462ec987cb4994a6897823f3f76.tar.bz2 colobot-da5d4edeb3a41462ec987cb4994a6897823f3f76.zip |
Fixed invalid text alignment
Diffstat (limited to 'src/ui/list.cpp')
-rw-r--r-- | src/ui/list.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/list.cpp b/src/ui/list.cpp index 80609d7..7bebb81 100644 --- a/src/ui/list.cpp +++ b/src/ui/list.cpp @@ -43,7 +43,7 @@ CList::CList() : CControl() for (int i = 0; i < 10; i++) { m_tabs[i] = 0.0f; - m_justifs[i] = Gfx::TEXT_ALIGN_RIGHT; + m_justifs[i] = Gfx::TEXT_ALIGN_LEFT; } m_totalLine = 0; @@ -128,7 +128,7 @@ bool CList::MoveAdjust() for (int i = 0; i < m_displayLine; i++) { m_button[i] = new CButton(); m_button[i]->Create(ppos, ddim, -1, EVENT_NULL); - m_button[i]->SetTextAlign(Gfx::TEXT_ALIGN_RIGHT); + m_button[i]->SetTextAlign(Gfx::TEXT_ALIGN_LEFT); m_button[i]->SetState(STATE_SIMPLY); m_button[i]->SetFontType(m_fontType); m_button[i]->SetFontSize(m_fontSize); @@ -414,7 +414,7 @@ void CList::Draw() ppos.y = pos.y + dim.y * 0.5f; ppos.y -= m_engine->GetText()->GetHeight(m_fontType, m_fontSize) / 2.0f; ddim.x = dim.x-dim.y; - DrawCase(m_text[i + m_firstLine], ppos, ddim.x, Gfx::TEXT_ALIGN_RIGHT); + DrawCase(m_text[i + m_firstLine], ppos, ddim.x, Gfx::TEXT_ALIGN_LEFT); } else { ppos.x = pos.x + dim.y * 0.5f; ppos.y = pos.y + dim.y * 0.5f; @@ -504,7 +504,7 @@ void CList::DrawCase(char *text, Math::Point pos, float width, Gfx::TextAlign ju { if (justif == Gfx::TEXT_ALIGN_CENTER) pos.x += width / 2.0f; - else if (justif == Gfx::TEXT_ALIGN_LEFT) + else if (justif == Gfx::TEXT_ALIGN_RIGHT) pos.x += width; m_engine->GetText()->DrawText(std::string(text), m_fontType, m_fontSize, pos, width, justif, 0); } |