void Display::snowCB(Fl_Value_Input* w, Display* c) { Map* m = c->getMap(); m->setSnow(w->value()); GLWindow* win = c->getGWin(); win->setMap(m); win->redraw(); }
void Display::colorCB(Fl_Color_Chooser* color, Display* d) { Map* m = d->getMap(); m->setColor(color->r(), color->g(), color->b()); GLWindow* win = d->getGWin(); win->setMap(m); win->redraw(); }
void Display::bothCB(Fl_Round_Button* b, Display* d) { Map* m = d->getMap(); m->setType(2); GLWindow* win = d->getGWin(); win->setMap(m); win->redraw(); }
void Display::subCB(Fl_Button* w, Display* c) { Map* m = c->getMap(); //std::cout<<m->getHeights(0, 0) << std::endl; m->fractalize(); //std::cout << m->getHeights(5, 4) << std::endl; GLWindow* win = c->getGWin(); win->setMap(m); win->redraw(); }
void Display::hCB(Fl_Slider* s, Display* d) { s->range(d->min, d->max); Map* m = d->getMap(); m->changeCoord(d->tile_x, d->tile_y, s->value()); float height = m->getHeights(d->tile_x, d->tile_y); s->value(height); GLWindow* win = d->getGWin(); win->setMap(m); win->redraw(); }
void Display::createCB(Fl_Button* w, Display* c){ Map* m = c->getMap(); c->tile_x = c->tile_y = 0; m->setSize(c->r,c->c,c->x,c->y); //std::cout << c->max << std::endl; m->setRange(c->max, c->min); m->createMap(); GLWindow* win = c->getGWin(); win->setColor(c->tile_x, c->tile_y); win->setMap(m); win->redraw(); }