| 2224 | } |
| 2225 | |
| 2226 | void BattleView::refreshDelayText() |
| 2227 | { |
| 2228 | int delay = primingTab->findControlTyped<ScrollBar>("DELAY_SLIDER")->getValue(); |
| 2229 | LogWarning("Delay %d", delay); |
| 2230 | UString text; |
| 2231 | if (delay == 0) |
| 2232 | { |
| 2233 | text = format(tr("Activates now.")); |
| 2234 | } |
| 2235 | else |
| 2236 | { |
| 2237 | if (battle.mode == Battle::Mode::TurnBased) |
| 2238 | { |
| 2239 | if (delay == 1) |
| 2240 | { |
| 2241 | text = format(tr("Activates at end of turn.")); |
| 2242 | } |
| 2243 | else |
| 2244 | { |
| 2245 | text = format("%s %d", tr("Turns before activation:"), delay - 1); |
| 2246 | } |
| 2247 | } |
| 2248 | else |
| 2249 | { |
| 2250 | text = format(tr("Delay = %i"), (int)((float)delay / 4.0f)); |
| 2251 | } |
| 2252 | } |
| 2253 | primingTab->findControlTyped<Label>("DELAY_TEXT")->setText(text); |
| 2254 | } |
| 2255 | |
| 2256 | void BattleView::refreshRangeText() |
| 2257 | { |
no test coverage detected