From 67ebc66aa1be7188f99e215e1353c27cf203308f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 31 Jul 2011 18:19:27 +0000 Subject: Added methods to ui::ModelView to pass primary and secondary color to the renderer. --- src/ui/modelview.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/ui/modelview.cc') 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); -- cgit v1.2.3