File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 16
16
17
17
#include " supertux/menu/cheat_apply_menu.hpp"
18
18
19
+ #include " boost/format.hpp"
20
+
19
21
#include " gui/menu_item.hpp"
20
22
#include " gui/menu_manager.hpp"
21
23
#include " object/player.hpp"
@@ -34,8 +36,8 @@ CheatApplyMenu::CheatApplyMenu(std::function<void(Player&)> callback) :
34
36
add_entry (-1 , _ (" All Players" ));
35
37
for (const auto player : Sector::get ().get_players ())
36
38
{
37
- add_entry (player->get_id (), _ (" Player" ) + " " +
38
- std::to_string (player->get_id () + 1 ));
39
+ add_entry (player->get_id (), ( boost::format ( _ (" Player %d " ))
40
+ % (player->get_id () + 1 )). str ( ));
39
41
}
40
42
41
43
add_hl ();
@@ -55,8 +57,8 @@ CheatApplyMenu::CheatApplyMenu(std::function<void(Player&, int)> callback) :
55
57
add_entry (-1 , _ (" All Players" ));
56
58
for (const auto player : Sector::get ().get_players ())
57
59
{
58
- add_entry (player->get_id (), _ (" Player" ) + " " +
59
- std::to_string (player->get_id () + 1 ));
60
+ add_entry (player->get_id (), ( boost::format ( _ (" Player %d " ))
61
+ % (player->get_id () + 1 )). str ( ));
60
62
}
61
63
62
64
add_hl ();
Original file line number Diff line number Diff line change 16
16
17
17
#include " supertux/menu/multiplayer_player_menu.hpp"
18
18
19
+ #include " boost/format.hpp"
19
20
#include " SDL.h"
20
21
21
22
#include " control/game_controller_manager.hpp"
33
34
34
35
MultiplayerPlayerMenu::MultiplayerPlayerMenu (int player_id)
35
36
{
36
- add_label (_ (" Player" ) + " " + std::to_string (player_id + 1 ));
37
+ add_label (( boost::format ( _ (" Player %d " )) % (player_id + 1 )). str ( ));
37
38
add_hl ();
38
39
39
40
add_toggle (-1 , _ (" Play with the keyboard" ), &InputManager::current ()->m_uses_keyboard [player_id]);
Original file line number Diff line number Diff line change 16
16
17
17
#include " supertux/menu/worldmap_cheat_apply_menu.hpp"
18
18
19
+ #include " boost/format.hpp"
20
+
19
21
#include " gui/menu_item.hpp"
20
22
#include " gui/menu_manager.hpp"
21
23
#include " object/player.hpp"
@@ -34,7 +36,7 @@ WorldmapCheatApplyMenu::WorldmapCheatApplyMenu(int num_players,
34
36
add_hl ();
35
37
36
38
for (int i = 0 ; i < m_num_players; i++)
37
- add_entry (i, _ (" Player" ) + " " + std::to_string (i + 1 ));
39
+ add_entry (i, ( boost::format ( _ (" Player %d " )) % (i + 1 )). str ( ));
38
40
39
41
add_hl ();
40
42
add_back (_ (" Back" ));
@@ -55,7 +57,7 @@ WorldmapCheatApplyMenu::WorldmapCheatApplyMenu(int num_players,
55
57
add_entry (-1 , _ (" All Players" ));
56
58
57
59
for (int i = 0 ; i < m_num_players; i++)
58
- add_entry (i, _ (" Player" ) + " " + std::to_string (i + 1 ));
60
+ add_entry (i, ( boost::format ( _ (" Player %d " )) % (i + 1 )). str ( ));
59
61
60
62
add_hl ();
61
63
add_back (_ (" Back" ));
You can’t perform that action at this time.
0 commit comments