diff options
author | krzys-h <krzys_h@interia.pl> | 2014-07-24 22:17:49 +0200 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2014-07-24 22:17:49 +0200 |
commit | 7131abd385bb370328e7c59e8a6b70d160b2effc (patch) | |
tree | b2f4313fa45eefeda6cb1ee38bf48950584c5c71 /src/ui/edit.cpp | |
parent | 02ba358a892b9977250ea345c42f8226f89ba250 (diff) | |
download | colobot-7131abd385bb370328e7c59e8a6b70d160b2effc.tar.gz colobot-7131abd385bb370328e7c59e8a6b70d160b2effc.tar.bz2 colobot-7131abd385bb370328e7c59e8a6b70d160b2effc.zip |
Fixed SatCom image loading
Now LoadTexture/SetTexture functions require full path with "textures/" directory
Diffstat (limited to 'src/ui/edit.cpp')
-rw-r--r-- | src/ui/edit.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp index a0387bf..8f46e42 100644 --- a/src/ui/edit.cpp +++ b/src/ui/edit.cpp @@ -1146,7 +1146,6 @@ void CEdit::DrawImage(Math::Point pos, std::string name, float width, filename = name + ".png"; CRobotMain::InjectLevelDir(filename, "icons"); boost::replace_all(filename, "\\", "/"); //TODO: Fix this in files - filename = "../" + filename; m_engine->SetTexture(filename); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); @@ -1176,7 +1175,7 @@ void CEdit::DrawBack(Math::Point pos, Math::Point dim) if ( m_bGeneric ) return; - m_engine->SetTexture("interface/button2.png"); + m_engine->SetTexture("textures/interface/button2.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); if ( m_bMulti ) @@ -1226,7 +1225,7 @@ void CEdit::DrawPart(Math::Point pos, Math::Point dim, int icon) Math::Point uv1, uv2; float dp; - m_engine->SetTexture("interface/text.png"); + m_engine->SetTexture("textures/interface/text.png"); m_engine->SetState(Gfx::ENG_RSTATE_NORMAL); uv1.x = (16.0f/256.0f)*(icon%16); @@ -1437,7 +1436,7 @@ void CEdit::LoadImage(std::string name) filename = name + ".png"; CRobotMain::InjectLevelDir(filename, "icons"); boost::replace_all(filename, "\\", "/"); //TODO: Fix this in files - m_engine->LoadTexture("../"+filename); + m_engine->LoadTexture(filename); } // Read from a text file. |