Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-08-17 11:40:15 +0000
committerStijn Buys <ingar@osirion.org>2009-08-17 11:40:15 +0000
commit5636fad174f0bcff857c357c394c4cc8d424b302 (patch)
treed41807018da962a930ef087b73ce4ac89a90c6f8 /src/ui/modelview.cc
parent80aaacbaef16b4eba33428aec268f80e7466cbb1 (diff)
reload entity/info models on r_restart
Diffstat (limited to 'src/ui/modelview.cc')
-rwxr-xr-xsrc/ui/modelview.cc13
1 files changed, 7 insertions, 6 deletions
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