summaryrefslogtreecommitdiffstats
path: root/src/ui/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/image.cpp')
-rw-r--r--src/ui/image.cpp42
1 files changed, 23 insertions, 19 deletions
diff --git a/src/ui/image.cpp b/src/ui/image.cpp
index 8f9b5ca..89e1fd2 100644
--- a/src/ui/image.cpp
+++ b/src/ui/image.cpp
@@ -1,19 +1,21 @@
-// * This file is part of the COLOBOT source code
-// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
-// * Copyright (C) 2012, Polish Portal of Colobot (PPC)
-// *
-// * This program is free software: you can redistribute it and/or modify
-// * it under the terms of the GNU General Public License as published by
-// * the Free Software Foundation, either version 3 of the License, or
-// * (at your option) any later version.
-// *
-// * This program is distributed in the hope that it will be useful,
-// * but WITHOUT ANY WARRANTY; without even the implied warranty of
-// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// * GNU General Public License for more details.
-// *
-// * You should have received a copy of the GNU General Public License
-// * along with this program. If not, see http://www.gnu.org/licenses/.
+/*
+ * This file is part of the Colobot: Gold Edition source code
+ * Copyright (C) 2001-2014, Daniel Roux, EPSITEC SA & TerranovaTeam
+ * http://epsiteс.ch; http://colobot.info; http://github.com/colobot
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ * See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see http://gnu.org/licenses
+ */
#include "ui/image.h"
@@ -110,7 +112,7 @@ void CImage::Draw()
if ( m_icon == 0 ) // hollow frame?
{
- m_engine->SetTexture("button2.png");
+ m_engine->SetTexture("textures/interface/button2.png");
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
uv1.x = 160.0f / 256.0f;
uv1.y = 192.0f / 256.0f; // u-v texture
@@ -127,8 +129,10 @@ void CImage::Draw()
if ( m_filename[0] != 0 ) // displays an image?
{
- m_engine->LoadTexture(m_filename);
- m_engine->SetTexture(m_filename);
+ std::string texFilename = m_filename;
+ texFilename = "textures/"+texFilename;
+ m_engine->LoadTexture(texFilename.c_str());
+ m_engine->SetTexture(texFilename);
m_engine->SetState(Gfx::ENG_RSTATE_NORMAL);
pos = m_pos;
dim = m_dim;