X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Foverlay.cpp;h=bab469ca4cf0cb14bc3994d705498f01adf1e927;hb=3e3675f8d86b06cdea7df197dfe8866ffb285aec;hp=6065dbf7ccbdac06e80503a9c6ae357ed2715ff4;hpb=3c04e77e639e7b7fff995ceb9cc8c00da622d26e;p=r2c2.git diff --git a/source/3d/overlay.cpp b/source/3d/overlay.cpp index 6065dbf..bab469c 100644 --- a/source/3d/overlay.cpp +++ b/source/3d/overlay.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2010-2011 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #include #include #include @@ -91,7 +84,7 @@ void Overlay3D::render(GL::Renderer &renderer, const GL::Tag &) const glLineWidth(1); - int size = int(font.get_default_size()+0.5); + int size = int(font.get_native_size()+0.5); float spacing = round(size*1.1)/size; float baseline = round((0.5-font.get_ascent()*0.5-font.get_descent()*0.5)*size)/size; @@ -147,7 +140,7 @@ const GL::Mesh *Overlay3D::get_graphic(const string &name) { DataFile::load(*grf, (FS::Path("icons")/(name+".mesh")).str()); } - catch(const Exception &e) + catch(const exception &e) { IO::print("Error loading overlay graphic '%s': %s\n", name, e.what()); delete grf; @@ -190,7 +183,7 @@ void Overlay3D::update_icon(Icon &icon) { GL::MeshBuilder bld(icon.text); bld.color(0.0f, 1.0f, 0.0f); - font.draw_string(icon.label, bld); + font.build_string(icon.label, bld); } }