From 5636fad174f0bcff857c357c394c4cc8d424b302 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Mon, 17 Aug 2009 11:40:15 +0000 Subject: reload entity/info models on r_restart --- src/ui/modelview.cc | 13 +++++++------ src/ui/ui.cc | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/ui') diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc index 1e89397..b913060 100755 --- a/src/ui/modelview.cc +++ b/src/ui/modelview.cc @@ -78,18 +78,19 @@ bool ModelView::on_keypress(const int key, const unsigned int modifier) void ModelView::draw() { - if (!modelview_modelname.size()) + if (!modelview_modelname.size()) { return; + } + paint::color(1.0f, 1.0f, 1.0f); model::Model *model = model::Model::find(modelview_modelname); - if (!model) + if (!model) { + paint::bitmap(global_location(), size(), "bitmap/notex"); return; + } - math ::Vector2f center(global_location()); + math ::Vector2f center(global_location() + size() * 0.5f); - center[0] += width() * 0.5f; - center[1] += height() * 0.5f; - gl::clear(GL_DEPTH_BUFFER_BIT); // gl 3d mode diff --git a/src/ui/ui.cc b/src/ui/ui.cc index 82d3990..f734a50 100644 --- a/src/ui/ui.cc +++ b/src/ui/ui.cc @@ -358,7 +358,7 @@ void UI::load_settings() void UI::apply_render_options() { - con_debug << " initializing text colors" << std::endl; + //con_debug << " initializing text colors" << std::endl; // apply palette colors paint::assign_color('N', palette()->text()); paint::assign_color('D', palette()->debug()); -- cgit v1.2.3