| 28 | |
| 29 | |
| 30 | ShotStats::ShotStats() : HUDDialog() { |
| 31 | // create font |
| 32 | fontFace = LocalFontFace::create("sansSerifFont"); |
| 33 | |
| 34 | // add title |
| 35 | createLabel("Shot Statistics"); |
| 36 | |
| 37 | // key |
| 38 | createLabel("Shots Hit/Fired", true); |
| 39 | |
| 40 | columns = 11; |
| 41 | rows = 0; |
| 42 | |
| 43 | // section headings (upper) |
| 44 | createLabel(""); |
| 45 | createLabel(""); |
| 46 | createLabel(""); |
| 47 | createLabel(""); |
| 48 | createLabel(""); |
| 49 | createLabel(""); |
| 50 | createLabel("Super"); |
| 51 | createLabel("Shock"); |
| 52 | createLabel(""); |
| 53 | createLabel("Fave."); |
| 54 | createLabel("Best"); |
| 55 | ++rows; |
| 56 | |
| 57 | // section headings (lower) |
| 58 | createLabel("Player"); |
| 59 | createLabel("Hit%"); |
| 60 | createLabel("Total"); |
| 61 | createLabel("Norm"); |
| 62 | createLabel("GM"); |
| 63 | createLabel("Laser"); |
| 64 | createLabel("Bullet"); |
| 65 | createLabel("Wave"); |
| 66 | createLabel("Thief"); |
| 67 | createLabel("Flag"); |
| 68 | createLabel("Flag"); |
| 69 | ++rows; |
| 70 | |
| 71 | // my statistics first |
| 72 | LocalPlayer* myTank = LocalPlayer::getMyTank(); |
| 73 | if (!myTank->isObserver()) { |
| 74 | addStats((Player*)myTank); |
| 75 | } |
| 76 | |
| 77 | // add statistics for each player |
| 78 | for (int i = 0; i < curMaxPlayers; ++i) { |
| 79 | if (remotePlayers[i] && !remotePlayers[i]->isObserver()) { |
| 80 | addStats((Player*)remotePlayers[i]); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | resize(HUDDialog::getWidth(), HUDDialog::getHeight()); |
| 85 | initNavigation(); |
| 86 | } |
| 87 |
nothing calls this directly
no test coverage detected