From d70d31acc1753a6edda69727448834e6e1a07886 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sat, 28 Sep 2013 11:13:45 +0200 Subject: Fix for #232 - Images in SatCom Only images, icons still don't work --- src/ui/edit.cpp | 8 ++++---- src/ui/edit.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/ui') diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp index 6fd1735..a187688 100644 --- a/src/ui/edit.cpp +++ b/src/ui/edit.cpp @@ -1144,7 +1144,7 @@ void CEdit::DrawImage(Math::Point pos, std::string name, float width, float dp; std::string filename; - filename = GetProfile().GetUserBasedPath(name, "diagram") + ".png"; + filename = GetProfile().GetUserBasedPath(name, "../icons") + ".png"; m_engine->SetTexture(filename); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); @@ -1426,7 +1426,7 @@ void CEdit::FreeImage() for (int i = 0 ; i < m_imageTotal; i++ ) { - filename = GetProfile().GetUserBasedPath(m_image[i].name, "diagram") + ".png"; + filename = GetProfile().GetUserBasedPath(m_image[i].name, "../icons") + ".png"; m_engine->DeleteTexture(filename); } } @@ -1436,7 +1436,7 @@ void CEdit::FreeImage() void CEdit::LoadImage(std::string name) { std::string filename; - filename = GetProfile().GetUserBasedPath(name, "diagram") + ".png"; + filename = GetProfile().GetUserBasedPath(name, "../icons") + ".png"; m_engine->LoadTexture(filename); } @@ -1653,7 +1653,7 @@ bool CEdit::ReadText(std::string filename, int addSize) m_image[iIndex].width = iWidth*0.75f; m_text[j] = static_cast(iIndex++); // as an index into m_image - m_format[j] = static_cast(Gfx::FONT_MASK_IMAGE); + m_format[j] = Gfx::FONT_MASK_IMAGE; j ++; } } diff --git a/src/ui/edit.h b/src/ui/edit.h index acdf72c..9484fc8 100644 --- a/src/ui/edit.h +++ b/src/ui/edit.h @@ -89,7 +89,7 @@ enum OperUndo struct ImageLine { - //! name of the image (without diagram \) + //! name of the image (without icons/) std::string name; //! vertical offset (v texture) float offset; @@ -101,7 +101,7 @@ struct ImageLine struct HyperLink { - //! text file name (without help \) + //! text file name (without help/) std::string name; //! name of the marker std::string marker; -- cgit v1.2.3-1-g7c22