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>2011-07-31 18:19:27 +0000
committerStijn Buys <ingar@osirion.org>2011-07-31 18:19:27 +0000
commit67ebc66aa1be7188f99e215e1353c27cf203308f (patch)
treeaf799ce09a2ff1426c091c48fb41a07b50972d06 /src/ui/modelview.cc
parent12e47f19f008d9134bad137a07a53e75207e50ff (diff)
Added methods to ui::ModelView to pass primary and secondary color to the renderer.
Diffstat (limited to 'src/ui/modelview.cc')
-rwxr-xr-xsrc/ui/modelview.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ui/modelview.cc b/src/ui/modelview.cc
index 4ce388c..d4f76fa 100755
--- a/src/ui/modelview.cc
+++ b/src/ui/modelview.cc
@@ -60,9 +60,10 @@ void ModelView::set_modelname(const char *modelname)
modelview_zoom = 1.0f;
}
-void ModelView::set_color(const math::Color & color)
+void ModelView::set_colors(const math::Color & color_primary, const math::Color & color_secondary)
{
- modelview_color.assign(color);
+ modelview_color_primary.assign(color_primary);
+ modelview_color_secondary.assign(color_secondary);
}
void ModelView::set_zoom(const float zoom)
@@ -191,6 +192,7 @@ void ModelView::draw()
render::State::set_normalize(true);
+ // FIXME the inventory window needs to be able to use actual thrust values
float thrust = ::sinf(core::application()->time() * 0.5f);
if (thrust < 0.0f ) {
thrust = 1.0f + thrust;
@@ -198,7 +200,7 @@ void ModelView::draw()
thrust = 1.0f;
}
- render::draw_model_fragments(model, core::localplayer()->color(), core::localplayer()->color_second(), core::application()->time(), true, true, thrust);
+ render::draw_model_fragments(model, modelview_color_primary, modelview_color_primary, core::application()->time(), true, true, thrust);
render::State::set_normalize(false);