mirror of
https://github.com/FunKey-Project/RetroFE.git
synced 2025-12-16 11:48:53 +01:00
Added support for adding the word Player or Players behind the number of players:
- Use type "numberPlayersPlayers" or "numberPlayersRangePlayers" in the layout XML. - Examples: If number of players is 1: - type "numberPlayers" will print 1. - type "numberPlayersRange" will print 1. - type "numberPlayersPlayers" will print 1 Player. - type "numberPlayersRangePlayers" will print 1 Player. If number of players is 4: - type "numberPlayers" will print 4. - type "numberPlayersRange" will print 1-4. - type "numberPlayersPlayers" will print 4 Players. - type "numberPlayersRangePlayers" will print 1-4 Players.
This commit is contained in:
parent
28e72b802b
commit
c250f28d37
@ -127,6 +127,33 @@ void ReloadableText::ReloadTexture()
|
||||
else
|
||||
ss << selectedItem->numberPlayers;
|
||||
}
|
||||
else if (type_ == "numberPlayersPlayers")
|
||||
{
|
||||
ss << selectedItem->numberPlayers;
|
||||
if (selectedItem->numberPlayers != "")
|
||||
{
|
||||
if (selectedItem->numberPlayers == "1")
|
||||
ss << " Player";
|
||||
else
|
||||
ss << " Players";
|
||||
}
|
||||
}
|
||||
else if (type_ == "numberPlayersRangePlayers")
|
||||
{
|
||||
if (selectedItem->numberPlayers != "" &&
|
||||
selectedItem->numberPlayers != "0" &&
|
||||
selectedItem->numberPlayers != "1")
|
||||
ss << "1-" << selectedItem->numberPlayers;
|
||||
else
|
||||
ss << selectedItem->numberPlayers;
|
||||
if (selectedItem->numberPlayers != "")
|
||||
{
|
||||
if (selectedItem->numberPlayers == "1")
|
||||
ss << " Player";
|
||||
else
|
||||
ss << " Players";
|
||||
}
|
||||
}
|
||||
else if (type_ == "numberJoyWays")
|
||||
{
|
||||
ss << selectedItem->joyWays;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user