Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-10-05 21:14:09 +0000
committerStijn Buys <ingar@osirion.org>2008-10-05 21:14:09 +0000
commite8b466caefa3b0b3b70458035d1c52e9fd9c0662 (patch)
tree8a7f019040f446237ce9cc72ee4181888eab2339 /src
parentaaf2809dbb28fdd6dd7c09adf5c79c12f6f4926a (diff)
internally removes bitmaps/fonts prefix from render::Text
Diffstat (limited to 'src')
-rw-r--r--src/client/view.cc12
-rw-r--r--src/render/primitives.h2
-rw-r--r--src/render/text.cc5
3 files changed, 11 insertions, 8 deletions
diff --git a/src/client/view.cc b/src/client/view.cc
index 2667938..7f9efa1 100644
--- a/src/client/view.cc
+++ b/src/client/view.cc
@@ -565,14 +565,14 @@ void draw_status()
gl::end();
}
- Text::setfont("bitmaps/fonts/gui", 14, 24);
+ Text::setfont("gui", 14, 24);
Text::setcolor('B'); //set normal color
std::stringstream speedstr;
speedstr << "^B" << roundf(core::localcontrol()->speed() * 100.0f);
Text::draw( 316+4+10, video::height - 6 -16 - render::Text::fontwidth() /2, speedstr);
- Text::setfont("bitmaps/fonts/gui", 12, 18);
+ Text::setfont("gui", 12, 18);
Text::setcolor('N'); //set normal color
}
}
@@ -836,14 +836,14 @@ void frame(float seconds)
if (!console()->visible())
console()->toggle();
- } else if (!core::game()->interactive()) {
+ } /*else if (!core::game()->interactive()) {
// draw the banner bitmap
draw_banner();
- }
+ }*/
// draw text elements
if (draw_ui->value()) {
- Text::setfont("bitmaps/fonts/gui", 12, 18);
+ Text::setfont("gui", 12, 18);
// draw the player status
draw_status();
@@ -856,7 +856,7 @@ void frame(float seconds)
}
// draw console or notifications
- Text::setfont("bitmaps/fonts/gui", 12, 18);
+ Text::setfont("gui", 12, 18);
console()->draw((bool) draw_ui->value());
diff --git a/src/render/primitives.h b/src/render/primitives.h
index fa03c3c..679a76e 100644
--- a/src/render/primitives.h
+++ b/src/render/primitives.h
@@ -52,7 +52,7 @@ inline void bitmap(math::Vector2f const &location, math::Vector2f const &size, s
using namespace render::gl;
- render::Textures::bind(texture);
+ render::Textures::bind("bitmaps/" + texture);
gl::enable(GL_TEXTURE_2D);
begin(Quads);
diff --git a/src/render/text.cc b/src/render/text.cc
index c64e331..127605b 100644
--- a/src/render/text.cc
+++ b/src/render/text.cc
@@ -80,7 +80,10 @@ void Text::setcolor(const char color)
void Text::setfont(const char *texture, float width, float height)
{
- Textures::bind(texture, false);
+ std::string tf("bitmaps/fonts/");
+ tf.append(texture);
+
+ Textures::bind(tf, false);
text_fontwidth = width;
text_fontheight = height;