Index: binaries/data/mods/mod/gui/common/modern/setup.xml
===================================================================
--- binaries/data/mods/mod/gui/common/modern/setup.xml
+++ binaries/data/mods/mod/gui/common/modern/setup.xml
@@ -54,6 +54,7 @@
0 0 255
255 255 0
+ 0 160 160
237 227 167
243 242 240
143 142 140
Index: binaries/data/mods/public/gui/common/gamedescription.js
===================================================================
--- binaries/data/mods/public/gui/common/gamedescription.js
+++ binaries/data/mods/public/gui/common/gamedescription.js
@@ -16,7 +16,7 @@
/**
- * Returns the nickname without the lobby rating.
+ * @Returns {object} containing the name and rating seperately.
*/
function splitRatingFromNick(playerName)
{
@@ -32,7 +32,7 @@
/**
* Denotes which players are a lobby buddy of the current user.
*/
-var g_BuddySymbol = '•';
+var g_BuddySymbol = '★';
/**
* Returns a formatted string describing the player assignments.
@@ -65,49 +65,49 @@
{
if (isActive)
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s)");
+ playerDescription = translate("%(status)s %(civ)s %(playerName)s (%(AIdescription)s)");
else
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (%(civ)s, %(AIdescription)s, %(state)s)");
+ playerDescription = translate("%(status)s %(civ)s %(state)s %(playerName)s (%(AIdescription)s)");
}
else
{
if (isActive)
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (%(AIdescription)s)");
+ playerDescription = translate("%(status)s %(playerName)s (%(AIdescription)s)");
else
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (%(AIdescription)s, %(state)s)");
+ playerDescription = translate("%(status)s %(state)s %(playerName)s (%(AIdescription)s)");
}
}
else
{
if (playerData.Offline)
{
- // Can only occur in the lobby for now, so no strings with civ needed
+ // Can only occur in the lobby for now.
if (isActive)
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (OFFLINE)");
+ playerDescription = "%(status)s %(civ)s %(playerName)s";
else
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (OFFLINE, %(state)s)");
+ playerDescription = "%(status)s %(civ)s %(state)s %(playerName)s";
}
else
{
if (playerData.Civ)
if (isActive)
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (%(civ)s)");
+ playerDescription = "%(civ)s %(playerName)s";
else
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (%(civ)s, %(state)s)");
+ playerDescription = "%(civ)s %(state)s %(playerName)s";
else
if (isActive)
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s");
+ playerDescription = "%(playerName)s";
else
// Translation: Describe a player in a selected game, f.e. in the replay- or savegame menu
- playerDescription = translate("%(playerName)s (%(state)s)");
+ playerDescription = "%(state)s %(playerName)s";
}
}
@@ -116,28 +116,31 @@
playerDescriptions[teamIdx] = [];
let playerNick = splitRatingFromNick(playerData.Name).nick;
+
+ let playerRating = splitRatingFromNick(playerData.Name).rating;
+ playerRating ? playerRating = ' (' + coloredText(playerRating, PlayerColor.GetColorByRating(playerRating)) + ')' : playerRating = "";
+
playerDescriptions[teamIdx].push(sprintf(playerDescription, {
"playerName":
- coloredText(
- (g_Buddies.indexOf(playerNick) != -1 ? g_BuddySymbol + " " : "") +
- escapeText(playerData.Name),
- (typeof getPlayerColor == 'function' ?
- (isAI ? "white" : getPlayerColor(playerNick)) :
- rgbToGuiColor(playerData.Color || g_Settings.PlayerDefaults[playerIdx].Color))),
+ (g_Buddies.indexOf(playerNick) != -1 ? coloredText(g_BuddySymbol, "persiangreen") + " " : "") +
+ coloredText(escapeText(playerNick), PlayerColor.ColorPlayerNameByRole(Engine.LobbyGetPlayerRole(playerNick))) + playerRating,
"civ":
!playerData.Civ ?
translate("Unknown Civilization") :
g_CivData && g_CivData[playerData.Civ] && g_CivData[playerData.Civ].Name ?
- translate(g_CivData[playerData.Civ].Name) :
+ '[icon="icon_' + playerData.Civ + '"]' :
playerData.Civ,
+ "status":
+ isAI ? '[icon="icon_bot"]' : '[icon="icon_offline"]',
+
"state":
playerState == "defeated" ?
- translateWithContext("playerstate", "defeated") :
- translateWithContext("playerstate", "won"),
+ '[icon="icon_defeated"]' :
+ '[icon="icon_victorious"]',
- "AIdescription": translateAISettings(playerData)
+ "AIdescription": coloredText(translateAISettings(playerData), "0 160 160")
}));
}
@@ -161,14 +164,14 @@
// Translation: Describe players of one team in a selected game, f.e. in the replay- or savegame menu or lobby
return sprintf(translate("%(team)s:\n%(playerDescriptions)s"), {
- "team": '[font="sans-bold-14"]' + teamCaption + "[/font]",
+ "team": setStringTags(teamCaption, GameDetails.prototype.CaptionTags),
"playerDescriptions": playerDescriptions[team].join("\n")
});
});
if (playerDescriptions.observer)
teamDescription.push(sprintf(translate("%(team)s:\n%(playerDescriptions)s"), {
- "team": '[font="sans-bold-14"]' + translatePlural("Observer", "Observers", playerDescriptions.observer.length) + "[/font]",
+ "team": setStringTags(translatePlural("Observer", "Observers", playerDescriptions.observer.length), GameDetails.prototype.CaptionTags),
"playerDescriptions": playerDescriptions.observer.join("\n")
}));
@@ -451,7 +454,8 @@
if (!playerData.AI)
return "";
- return sprintf(translate("%(AIdifficulty)s %(AIbehavior)s %(AIname)s"), {
+ return sprintf(translate("%(AIdifficulty)s"), {
+ "AIplayername": playerData.Name,
"AIname": translateAIName(playerData.AI),
"AIdifficulty": translateAIDifficulty(playerData.AIDiff),
"AIbehavior": translateAIBehavior(playerData.AIBehavior),
Index: binaries/data/mods/public/gui/common/setup.xml
===================================================================
--- binaries/data/mods/public/gui/common/setup.xml
+++ binaries/data/mods/public/gui/common/setup.xml
@@ -116,6 +116,7 @@
0 0 255
255 255 0
+ 0 160 160
237 227 167
243 242 240
143 142 140
Index: binaries/data/mods/public/gui/common/styles.xml
===================================================================
--- binaries/data/mods/public/gui/common/styles.xml
+++ binaries/data/mods/public/gui/common/styles.xml
@@ -85,7 +85,7 @@
-
+
Index: binaries/data/mods/public/gui/lobby/LobbyPage/GameList.js
===================================================================
--- binaries/data/mods/public/gui/lobby/LobbyPage/GameList.js
+++ binaries/data/mods/public/gui/lobby/LobbyPage/GameList.js
@@ -26,19 +26,13 @@
this.gamesBox = Engine.GetGUIObjectByName("gamesBox");
this.gamesBox.onSelectionChange = this.onSelectionChange.bind(this);
this.gamesBox.onSelectionColumnChange = this.onFilterChange.bind(this);
- let ratingColumn = Engine.ConfigDB_GetValue("user", "lobby.columns.gamerating") == "true";
- this.gamesBox.hidden_mapType = ratingColumn;
- this.gamesBox.hidden_gameRating = !ratingColumn;
// Avoid repeated array construction
- this.list_buddy = [];
this.list_private = [];
this.list_gameName = [];
this.list_mapName = [];
- this.list_mapSize = [];
this.list_mapType = [];
this.list_maxnbp = [];
- this.list_gameRating = [];
this.list = [];
this.filters = [];
@@ -136,29 +130,32 @@
let selectedGameIndex = -1;
{
+ const ratingSetting = Engine.ConfigDB_GetValue("user", "lobby.columns.gamerating") == "true";
+ this.gamesBox.heading_maxnbp = ratingSetting ? translate("Players (rating)") : translate("Players");
+
Engine.ProfileStart("setupGameList");
let length = this.gameList.length;
- this.list_buddy.length = length;
this.list_private.length = length;
this.list_gameName.length = length;
this.list_mapName.length = length;
- this.list_mapSize.length = length;
this.list_mapType.length = length;
this.list_maxnbp.length = length;
- this.list_gameRating.length = length;
this.list.length = length;
this.gameList.forEach((game, i) => {
+ let displayData = game.displayData;
+ let mapName = displayData.mapName;
- let displayData = game.displayData;
- this.list_buddy[i] = displayData.buddy || "";
+ // Highlight number in mapName
+ for (let i = 2; i <= 8; i++) {
+ mapName = mapName.replaceAll(i, coloredText(i, "white"));
+ }
+
this.list_private[i] = displayData.private || "";
this.list_gameName[i] = displayData.gameName || "";
- this.list_mapName[i] = displayData.mapName || "";
- this.list_mapSize[i] = displayData.mapSize || "";
- this.list_mapType[i] = displayData.mapType || "";
- this.list_maxnbp[i] = displayData.playerCount || "";
- this.list_gameRating[i] = game.gameRating || "";
+ this.list_mapName[i] = mapName || "";
+ this.list_mapType[i] = displayData.mapType + ` (${coloredText(displayData.mapSize, "white")})` || "";
+ this.list_maxnbp[i] = ratingSetting ? `${displayData.playerCount} ${displayData.buddy} (${coloredText(game.gameRating, PlayerColor.GetColorByRating(game.gameRating))})` || "" : `${displayData.playerCount} ${displayData.buddy}`|| "";
this.list[i] = "";
if (selectedGame && game.stanza.hostJID == selectedGame.stanza.hostJID && game.stanza.name == selectedGame.stanza.name)
selectedGameIndex = i;
@@ -170,13 +167,10 @@
Engine.ProfileStart("copyToGUI");
let gamesBox = this.gamesBox;
gamesBox.list_private = this.list_private;
- gamesBox.list_buddy = this.list_buddy;
gamesBox.list_gameName = this.list_gameName;
gamesBox.list_mapName = this.list_mapName;
- gamesBox.list_mapSize = this.list_mapSize;
gamesBox.list_mapType = this.list_mapType;
gamesBox.list_maxnbp = this.list_maxnbp;
- gamesBox.list_gameRating = this.list_gameRating;
// Change these last, otherwise crash
gamesBox.list = this.list;
Index: binaries/data/mods/public/gui/lobby/LobbyPage/GameList.xml
===================================================================
--- binaries/data/mods/public/gui/lobby/LobbyPage/GameList.xml
+++ binaries/data/mods/public/gui/lobby/LobbyPage/GameList.xml
@@ -6,25 +6,19 @@
type="olist"
sortable="true"
font="sans-stroke-13"
+ size="0 0 100% 100%"
>
-
-
-
+
+
Name
-
+
Map Name
-
- Size
+
+ Type (size)
-
- Type
+
+ Players (Rating)
-
- Players
-
-
- Rating
-
Index: binaries/data/mods/public/gui/lobby/LobbyPage/GameListFilters.xml
===================================================================
--- binaries/data/mods/public/gui/lobby/LobbyPage/GameListFilters.xml
+++ binaries/data/mods/public/gui/lobby/LobbyPage/GameListFilters.xml
@@ -3,11 +3,16 @@
-