50
// TRANSLATORS: kill stats window button
49
51
mResetButton(new Button(this, _("Reset stats"), "reset", this)),
52
// TRANSLATORS: kill stats window button
50
53
mTimerButton(new Button(this, _("Reset timer"), "timer", this)),
57
// TRANSLATORS: kill stats window label
54
58
mLine4(new Label(this, strprintf(_("Kills: %s, total exp: %s"),
60
// TRANSLATORS: kill stats window label
56
61
mLine5(new Label(this, strprintf(_("Avg Exp: %s"), "?"))),
62
// TRANSLATORS: kill stats window label
57
63
mLine6(new Label(this, strprintf(_("No. of avg mob to next level: %s"),
65
// TRANSLATORS: kill stats window label
59
66
mLine7(new Label(this, strprintf(_("Kills/Min: %s, Exp/Min: %s"),
61
68
mExpSpeed1Label(new Label(this, strprintf(ngettext(
69
// TRANSLATORS: kill stats window label
62
70
"Exp speed per %d min: %s", "Exp speed per %d min: %s", 1), 1, "?"))),
63
71
mExpTime1Label(new Label(this, strprintf(ngettext(
64
72
"Time for next level per %d min: %s",
74
82
mExpTime15Label(new Label(this, strprintf(ngettext(
75
83
"Time for next level per %d min: %s",
76
84
"Time for next level per %d min: %s", 15), 15, "?"))),
85
// TRANSLATORS: kill stats window label
77
86
mLastKillExpLabel(new Label(this, strprintf("%s ?", _("Last kill exp:")))),
78
87
mTimeBeforeJackoLabel(new Label(this, strprintf(
88
// TRANSLATORS: kill stats window label
79
89
"%s ?", _("Time before jacko spawn:")))),
107
117
if (!xpNextLevel)
120
// TRANSLATORS: kill stats window label
110
121
mLine1 = new Label(this, strprintf(_("Level: %d at %f%%"),
111
122
player_node->getLevel(), static_cast<double>(xp)
112
123
/ static_cast<double>(xpNextLevel) * 100.0));
125
// TRANSLATORS: kill stats window label
114
126
mLine2 = new Label(this, strprintf(_("Exp: %d/%d Left: %d"),
115
127
xp, xpNextLevel, xpNextLevel - xp));
129
// TRANSLATORS: kill stats window label
117
130
mLine3 = new Label(this, strprintf(_("1%% = %d exp, avg mob for 1%%: %s"),
118
131
xpNextLevel / 100, "?"));
155
168
mLine3->setCaption(strprintf("1%% = %d exp, avg mob for 1%%: %s",
156
169
PlayerInfo::getAttribute(PlayerInfo::EXP_NEEDED) / 100, "?"));
170
// TRANSLATORS: kill stats window label
157
171
mLine4->setCaption(strprintf(_("Kills: %s, total exp: %s"), "?", "?"));
172
// TRANSLATORS: kill stats window label
158
173
mLine5->setCaption(strprintf(_("Avg Exp: %s"), "?"));
159
174
mLine6->setCaption(strprintf(
175
// TRANSLATORS: kill stats window label
160
176
_("No. of avg mob to next level: %s"), "?"));
219
236
const int exp = PlayerInfo::getAttribute(PlayerInfo::EXP);
237
// TRANSLATORS: kill stats window label
220
238
mLine1->setCaption(strprintf(_("Level: %d at %f%%"),
221
239
player_node->getLevel(), static_cast<double>(exp)
222
240
/ static_cast<double>(xpNextLevel) * 100.0));
242
// TRANSLATORS: kill stats window label
224
243
mLine2->setCaption(strprintf(_("Exp: %d/%d Left: %d"), exp,
225
244
xpNextLevel, xpNextLevel - exp));
227
246
if (AvgExp >= 0.001f && AvgExp <= 0.001f)
248
// TRANSLATORS: kill stats window label
229
249
mLine3->setCaption(strprintf(_("1%% = %d exp, avg mob for 1%%: %s"),
230
250
xpNextLevel / 100, "?"));
252
// TRANSLATORS: kill stats window label
232
253
mLine5->setCaption(strprintf(_("Avg Exp: %s"),
233
254
toString(AvgExp).c_str()));
235
256
mLine6->setCaption(strprintf(
257
// TRANSLATORS: kill stats window label
236
258
_("No. of avg mob to next level: %s"), "?"));
262
// TRANSLATORS: kill stats window label
240
263
mLine3->setCaption(strprintf(_("1%% = %d exp, avg mob for 1%%: %s"),
241
264
xpNextLevel / 100, toString((static_cast<float>(
242
265
xpNextLevel) / 100) / AvgExp).c_str()));
267
// TRANSLATORS: kill stats window label
244
268
mLine5->setCaption(strprintf(_("Avg Exp: %s"),
245
269
toString(AvgExp).c_str()));
271
// TRANSLATORS: kill stats window label
247
272
mLine6->setCaption(strprintf(_("No. of avg mob to next level: %s"),
248
273
toString(static_cast<float>(xpNextLevel - exp) / AvgExp).c_str()));
275
// TRANSLATORS: kill stats window label
250
276
mLine4->setCaption(strprintf(_("Kills: %s, total exp: %s"),
251
277
toString(mKillCounter).c_str(), toString(mExpCounter).c_str()));
279
// TRANSLATORS: kill stats window label
253
280
mLine7->setCaption(strprintf(_("Kills/Min: %s, Exp/Min: %s"),
254
281
toString(mKillTCounter / timeDiff).c_str(),
255
282
toString(mExpTCounter / timeDiff).c_str()));
284
// TRANSLATORS: kill stats window label
257
285
mLastKillExpLabel->setCaption(strprintf("%s %d", _("Last kill exp:"), xp));
364
398
updateJackoLabel();
365
399
BLOCK_END("KillStats::update")
367
void KillStats::draw(gcn::Graphics *g)
374
402
void KillStats::updateJackoLabel()
376
404
if (mIsJackoAlive)
378
406
mTimeBeforeJackoLabel->setCaption(strprintf("%s jacko alive",
407
// TRANSLATORS: kill stats window label
379
408
_("Time before jacko spawn:")));
381
410
else if (mIsJackoSpawnTimeUnknown && mJackoSpawnTime != 0)
383
// TRANSLATORS: Example: Time before jacko spawn: 10?
412
// TRANSLATORS: kill stats window label
384
413
mTimeBeforeJackoLabel->setCaption(strprintf(
414
// TRANSLATORS: kill stats window label
385
415
_("%s %d?"), _("Time before jacko spawn:"),
386
416
mJackoSpawnTime - cur_time));
388
418
else if (mIsJackoMustSpawn)
390
420
mTimeBeforeJackoLabel->setCaption(strprintf("%s %s",
421
// TRANSLATORS: kill stats window label
391
422
_("Time before jacko spawn:"), _("jacko spawning")));
395
426
mTimeBeforeJackoLabel->setCaption(strprintf("%s %d",
427
// TRANSLATORS: kill stats window label
396
428
_("Time before jacko spawn:"), mJackoSpawnTime - cur_time));
473
504
mExpTCounter = 0;
474
505
mLine3->setCaption(strprintf("1%% = %d exp, avg mob for 1%%: %s",
475
506
PlayerInfo::getAttribute(PlayerInfo::EXP_NEEDED) / 100, "?"));
476
mLine4->setCaption(strprintf(_(
477
"Kills: %s, total exp: %s"), "?", "?"));
507
mLine4->setCaption(strprintf(
508
// TRANSLATORS: kill stats window label
509
_("Kills: %s, total exp: %s"), "?", "?"));
510
// TRANSLATORS: kill stats window label
478
511
mLine5->setCaption(strprintf(_("Avg Exp: %s"), "?"));
479
512
mLine6->setCaption(strprintf(
513
// TRANSLATORS: kill stats window label
480
514
_("No. of avg mob to next level: %s"), "?"));
481
515
mLine7->setCaption(strprintf(
516
// TRANSLATORS: kill stats window label
482
517
_("Kills/Min: %s, Exp/Min: %s"), "?", "?"));