void Menu::Render() { al_clear_to_color( al_map_rgb( 0, 0 ,0 ) ); int iw = al_get_bitmap_width( GameResources::BackgroundTiles.at(backgroundindex) ); al_draw_bitmap( background, -(menutime % iw), 0, 0 ); titlefont->DrawString( (DISPLAY->GetWidth() / 2) + 4, 24, "Tug Of War!", FontHAlign::CENTRE, al_map_rgb( 0, 0, 0 ) ); titlefont->DrawString( DISPLAY->GetWidth() / 2, 20, "Tug Of War!", FontHAlign::CENTRE, al_map_rgb( 255, 255, 0 ) ); int centrepos = (DISPLAY->GetWidth() / 2) - sliderindex; RenderQuit( centrepos - (MENU_SPACING) ); RenderLocal( centrepos ); RenderNetwork( centrepos + (MENU_SPACING) ); RenderHelp( centrepos + (MENU_SPACING * 2) ); RenderSettings( centrepos + (MENU_SPACING * 3) ); RenderQuit( centrepos + (MENU_SPACING * 4) ); RenderLocal( centrepos + (MENU_SPACING * 5) ); if( menutime % FRAMEWORK->GetFramesPerSecond() < (FRAMEWORK->GetFramesPerSecond() / 2) ) { al_draw_bitmap( Input::GetIcon( InputItems::LEFT ), 10, 420, 0 ); al_draw_bitmap( Input::GetIcon( InputItems::RIGHT ), 740, 420, 0 ); } }
void VProfTool::Stop(void (*render)(const char *fmt, ...)) { g_VProfCurrentProfile.Stop(); RenderHelp(render); }