#include <msp/gl/framebuffer.h>
#include <msp/gl/matrix.h>
#include <msp/gl/misc.h>
-#include <msp/gl/projection.h>
#include <msp/gl/tests.h>
#include <msp/io/print.h>
#include <msp/strings/format.h>
window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &Engineer::exit), 0));
root = new GLtk::Root(ui_res, window);
- mouse.signal_button_press.connect(sigc::mem_fun(this, &Engineer::button_press));
- mouse.signal_axis_motion.connect(sigc::mem_fun(this, &Engineer::axis_motion));
+ mouse.signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Engineer::button_press), false));
+ mouse.signal_axis_motion.connect(sigc::bind_return(sigc::mem_fun(this, &Engineer::axis_motion), false));
root->set_visible(true);
main_panel = new MainPanel(*this);
for(unsigned i=0; i<10; ++i)
{
GL::Color color;
- color.r = rand()*1.0/RAND_MAX;
- color.g = rand()*1.0/RAND_MAX;
- color.b = rand()*1.0/RAND_MAX;
+ unsigned h = rand()%3;
+ color.r = (h==0 ? 0.0 : rand()*1.0/RAND_MAX);
+ color.g = (h==1 ? 0.0 : rand()*1.0/RAND_MAX);
+ color.b = (h==2 ? 0.0 : rand()*1.0/RAND_MAX);
color = color*(1/max(max(color.r, color.g), color.b));
float min_d_sq = 3;
for(map<Train *, GL::Color>::const_iterator j=train_colors.begin(); j!=train_colors.end(); ++j)