From a2e522edcb65f4704aadeb5848dbdf2819954188 Mon Sep 17 00:00:00 2001 From: bb Date: Sun, 14 Apr 2019 20:29:08 +0000 Subject: [PATCH] Move tooltips on gamesetup dropdowns from xml to js, since by current gamestup design that is the way all tooltips are added. While add it add some periods Patch By: Polakrity Differential Revision: https://code.wildfiregames.com/D594 This was SVN commit r22188. --- .../data/mods/public/gui/gamesetup/gamesetup.js | 7 +++++-- .../data/mods/public/gui/gamesetup/gamesetup.xml | 16 +++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/binaries/data/mods/public/gui/gamesetup/gamesetup.js b/binaries/data/mods/public/gui/gamesetup/gamesetup.js index 061c50c149..c02c097517 100644 --- a/binaries/data/mods/public/gui/gamesetup/gamesetup.js +++ b/binaries/data/mods/public/gui/gamesetup/gamesetup.js @@ -724,6 +724,7 @@ var g_Dropdowns = { */ var g_PlayerDropdowns = { "playerAssignment": { + "tooltip": (playerIdx) => translate("Select player."), "labels": (playerIdx) => g_PlayerAssignmentList.Name || [], "colors": (playerIdx) => g_PlayerAssignmentList.Color || [], "ids": (playerIdx) => g_PlayerAssignmentList.Choice || [], @@ -758,6 +759,7 @@ var g_PlayerDropdowns = { "autocomplete": 100, }, "playerTeam": { + "tooltip": (playerIdx) => translate("Select player's team."), "labels": (playerIdx) => g_PlayerTeamList.label, "ids": (playerIdx) => g_PlayerTeamList.id, "default": (playerIdx) => 0, @@ -769,7 +771,7 @@ var g_PlayerDropdowns = { "enabled": () => g_GameAttributes.mapType != "scenario", }, "playerCiv": { - "tooltip": (hoverIdx, playerIdx) => g_PlayerCivList.tooltip[hoverIdx] || translate("Choose the civilization for this player"), + "tooltip": (hoverIdx, playerIdx) => g_PlayerCivList.tooltip[hoverIdx] || translate("Choose the civilization for this player."), "labels": (playerIdx) => g_PlayerCivList.name, "colors": (playerIdx) => g_PlayerCivList.color, "ids": (playerIdx) => g_PlayerCivList.code, @@ -783,6 +785,7 @@ var g_PlayerDropdowns = { "autocomplete": 90, }, "playerColorPicker": { + "tooltip": (playerIdx) => translate("Pick a color."), "labels": (playerIdx) => g_PlayerColorPickerList.map(color => "■"), "colors": (playerIdx) => g_PlayerColorPickerList.map(color => rgbToGuiColor(color)), "ids": (playerIdx) => g_PlayerColorPickerList.map((color, index) => index), @@ -1027,7 +1030,7 @@ var g_MiscControls = { !g_IsNetworked || Object.keys(g_PlayerAssignments).every(guid => g_PlayerAssignments[guid].status || g_PlayerAssignments[guid].player == -1) ? translate("Start a new game with the current settings.") : - translate("Start a new game with the current settings (disabled until all players are ready)"), + translate("Start a new game with the current settings (disabled until all players are ready)."), "enabled": () => !g_GameStarted && ( !g_IsController || Object.keys(g_PlayerAssignments).every(guid => g_PlayerAssignments[guid].status || diff --git a/binaries/data/mods/public/gui/gamesetup/gamesetup.xml b/binaries/data/mods/public/gui/gamesetup/gamesetup.xml index 5bc0f1a8dd..a49760fa26 100644 --- a/binaries/data/mods/public/gui/gamesetup/gamesetup.xml +++ b/binaries/data/mods/public/gui/gamesetup/gamesetup.xml @@ -79,7 +79,7 @@ sprite_over="iconResetWhite" size="85%-16 0 85% 16" > - Reset any civilizations that have been selected to the default (random) + Reset any civilizations that have been selected to the default (random). resetCivilizations(); @@ -104,19 +104,13 @@ - - Pick a color. - - - Select player. - + + - - Select player's team. - + @@ -128,7 +122,7 @@ - Show this message in the future + Show this message in the future. saveSettingAndWriteToUserConfig("gui.gamesetup.enabletips", String(this.checked));