Skip to content

Commit

Permalink
Add a feedback button for the ladder map pool
Browse files Browse the repository at this point in the history
  • Loading branch information
speed2 authored and shalkya committed Dec 26, 2018
1 parent f9fa649 commit 9eaaba0
Show file tree
Hide file tree
Showing 12 changed files with 43 additions and 8 deletions.
1 change: 1 addition & 0 deletions loc/CZ/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6649,6 +6649,7 @@ tooltipui0705="Nastavení"
tooltipui0706="This dialog allows you to save a snapshot of the current game configuration and reload it later.\n\nOnce the game settings are as you want them, use the \"Create\" button on this dialog to store it. You can reload the stored configuration by selecting it and pressing the \"Load\" button.\n\nThe \"Save\" button will overwrite a selected existing preset with the current configuration."
tooltipui0707="Odeslat názor"
tooltipui0708="Otevře vlákno na fóru o této misi"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
trans_log_0000="Záznam hovorů"
trans_log_0001="Bez záznamu"
trans_log_0002="%d - %d z %d záznamů"
Expand Down
1 change: 1 addition & 0 deletions loc/DE/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6413,6 +6413,7 @@ tooltipui0705="Einstellungen"
tooltipui0706="Hier kann die aktuelle Einstellung des Spiels gespeichert und später wieder geladen werden.\n\nWenn du die Spieloptionen so eingestellt hast wie du sie haben möchtest, benutze \"Erstellen\" zum speichern einer neuen Voreinstellung. Diese kann später mit \"Laden\" wiederhergestellt werden.\n\nMit \"Speichern\" kann eine bereits vorhandene Abspeicherung mit den aktuellen Einstellungen überschreiben werden."
tooltipui0707="Feedback Senden"
tooltipui0708="Eröffnet einen Forumsbeitrag zu dieser Mission"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
trans_log_0000="Übertragungsprotokoll"
trans_log_0001="Keine Einträge"
trans_log_0002="%d - %d von %d Einträgen"
Expand Down
1 change: 1 addition & 0 deletions loc/ES/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6543,6 +6543,7 @@ tooltipui0705="Configuración"
tooltipui0706="Este diálogo te permite guardar una copia de la configuración de partida actual y volver a cargarla después.\n\nUna vez la configuración sea tal cual la quieres, usa el botón de \"Crear\" en este diálogo para guardarla. Puedes volver a cargar dicha configuración seleccionando y presionando el botón de \"Cargar\".\n\nEl botón de \"Guardar\" sobreescribirá una pre-configuración seleccionada ya existente con la configuración actual."
tooltipui0707="Déjenos tus comentarios"
tooltipui0708="Quedamos a la espera de tus comentarios en el foro"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
trans_log_0000="Registro de transmisiones"
trans_log_0001="Sin entradas"
trans_log_0002="%d - %d de %d entradas"
Expand Down
1 change: 1 addition & 0 deletions loc/FR/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7587,6 +7587,7 @@ tooltipui0705="Paramètres"
tooltipui0706="Cette fenêtre permet de créer une sauvegarde des paramètres pour la restaurer plus tard.\n\nUne fois les paramètres à votre convenance, utilisez le bouton \"Créer\" pour les sauvegarder. Vous pouvez restaurer la configuration sauvegardée en la selectionnant, puis en appuyant sur le bouton \"Charger\". \n\nLe bouton \"Créer\" écrasera toute sauvegarde selectionnée avec la configuration actuelle."
tooltipui0707="Donner un avis"
tooltipui0708="Créer une discussion sur cette mission"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
uimod_0010 = "Ce mod entre en conflit avec un ou plusieurs autres mods activés. Voulez-vous automatiquement désactiver les autres mods conflictuels ?"
uimod_0016 = "Mod de jeu activé" --[[ r: "Game mod" est par la suite systèmatiquement traduit par << Mod de jeu >> --]]
uimod_0017 = "Mod d'interface activé"
Expand Down
1 change: 1 addition & 0 deletions loc/IT/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7729,6 +7729,7 @@ tooltipui0705="Settings"
tooltipui0706="This dialog allows you to save a snapshot of the current game configuration and reload it later.\n\nOnce the game settings are as you want them, use the \"Create\" button on this dialog to store it. You can reload the stored configuration by selecting it and pressing the \"Load\" button.\n\nThe \"Save\" button will overwrite a selected existing preset with the current configuration."
tooltipui0707="Manda commenti"
tooltipui0708="Apri una discussione sul forum online riguardo questa missione"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
uimod_0010 = "Questo mod è in conflitto con alcune delle altre mod attivate. Vogliamo disattivare quelle mod e attivate questa?"
uimod_0016 = "Mod Attivate"
uimod_0017 = "UI Mod Attivate"
Expand Down
1 change: 1 addition & 0 deletions loc/PL/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6648,6 +6648,7 @@ tooltipui0705="Settings"
tooltipui0706="This dialog allows you to save a snapshot of the current game configuration and reload it later.\n\nOnce the game settings are as you want them, use the \"Create\" button on this dialog to store it. You can reload the stored configuration by selecting it and pressing the \"Load\" button.\n\nThe \"Save\" button will overwrite a selected existing preset with the current configuration."
tooltipui0707="Post Feedback"
tooltipui0708="Open a forum thread about this mission"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
trans_log_0000="Dziennik transmisji"
trans_log_0001="Brak wpisów"
trans_log_0002="%d - %d z %d wpisów."
Expand Down
1 change: 1 addition & 0 deletions loc/RU/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6153,6 +6153,7 @@ tooltipui0668="Модификации разрешены"
tooltipui0669="На сервере разрешены модификации. Проверьте менеджер модификаций."
tooltipui0707="Оставить отзыв"
tooltipui0708="Открыть тему на форме по поводу этой миссии"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
trans_log_0000="Журнал сообщений"
trans_log_0001="Нет сообщений"
trans_log_0002="%d - %d из %d записей"
Expand Down
1 change: 1 addition & 0 deletions loc/TW/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8307,6 +8307,7 @@ tooltipui0705="Settings"
tooltipui0706="This dialog allows you to save a snapshot of the current game configuration and reload it later.\n\nOnce the game settings are as you want them, use the \"Create\" button on this dialog to store it. You can reload the stored configuration by selecting it and pressing the \"Load\" button.\n\nThe \"Save\" button will overwrite a selected existing preset with the current configuration."
tooltipui0707="Post Feedback"
tooltipui0708="Open a forum thread about this mission"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
ual0301_Engineer_desc="Support Armoured Command Unit (Engineer Preset)"
ual0301_Engineer_help=" Support Armored Command Unit. Enhanced during construction with rapid fabrication enhancement."
ual0301_Engineer_name="SACU (Engineer Preset)"
Expand Down
3 changes: 3 additions & 0 deletions loc/TZM/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7719,6 +7719,9 @@ tooltipui0703 = "Energy income due to reclaim, and total energy reclaimed so far
tooltipui0704="Select name for new preset"
tooltipui0705="Settings"
tooltipui0706="This dialog allows you to save a snapshot of the current game configuration and reload it later.\n\nOnce the game settings are as you want them, use the \"Create\" button on this dialog to store it. You can reload the stored configuration by selecting it and pressing the \"Load\" button.\n\nThe \"Save\" button will overwrite a selected existing preset with the current configuration."
tooltipui0707="Post Feedback"
tooltipui0708="Open a forum thread about this mission"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"
uimod_0010 = "This mod conflicts with some of the other mods you have active. Shall we turn those mods off and this one on?"
uimod_0016 = "Game Mod Activated"
uimod_0017 = "UI Mod Activated"
Expand Down
1 change: 1 addition & 0 deletions loc/US/strings_db.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5282,6 +5282,7 @@ tooltipui0506="Pause/unpause current construction order"
tooltipui0507="Current and maximum unit counts"
tooltipui0707="Post Feedback"
tooltipui0708="Open a forum thread about this mission"
tooltipui0709="Open a web page to share your opinion about the current ladder map pool"

-- Begin unit restrictions
tooltipui0508="No Tech 1"
Expand Down
35 changes: 27 additions & 8 deletions lua/ui/dialogs/score.lua
Original file line number Diff line number Diff line change
Expand Up @@ -517,17 +517,36 @@ function CreateSkirmishScreen(victory, showCampaign, operationVictoryTable)
elapsedTime = UIUtil.CreateText(bg, "", 16, UIUtil.bodyFont)
LayoutHelpers.RightOf(elapsedTime, elapsedTimeLabel, 5)

-- Create a Feedback button with a link to the specified forum thread
-- Create a Feedback button with a link to the specified web page
local feedbackButtonData = {
ladder = {
tooltip = 'LadderScore_Feedback',
url = 'http://voting.faforever.com/vote',
},
campaign = {
tooltip = 'CampaignScore_Feedback',
url = operationVictoryTable.opData.feedbackURL,
},
}

local feedbackType = false
if showCampaign then
bg.feedbackButton = UIUtil.CreateButtonStd(bg, '/scx_menu/medium-no-br-btn/medium-uef', "<LOC _Feedback>Post Feedback", 14, 2)
feedbackType = 'campaign'
elseif GetCommandLineArg('/init', 1)[1] == 'init_ladder1v1.lua' then
feedbackType = 'ladder'
end

if feedbackType then
bg.feedbackButton = UIUtil.CreateButtonStd(bg, '/scx_menu/medium-no-br-btn/medium-uef', '<LOC _Feedback>Post Feedback', 14, 2)
LayoutHelpers.AtLeftIn(bg.feedbackButton, bg, 5)
LayoutHelpers.AtBottomIn(bg.feedbackButton, bg, 20)
Tooltip.AddButtonTooltip(bg.feedbackButton, "CampaignScore_Feedback")
bg.feedbackButton.OnClick = function(self, modifiers)
OpenURL(operationVictoryTable.opData.feedbackURL)
end

if not operationVictoryTable.opData.feedbackURL then
Tooltip.AddButtonTooltip(bg.feedbackButton, feedbackButtonData[feedbackType].tooltip)
-- Add an URL to the button, else disable it
if feedbackButtonData[feedbackType].url then
bg.feedbackButton.OnClick = function(self, modifiers)
OpenURL(feedbackButtonData[feedbackType].url)
end
else
bg.feedbackButton:Disable()
end
end
Expand Down
4 changes: 4 additions & 0 deletions lua/ui/help/tooltips.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,10 @@ Tooltips = {
title = "<LOC tooltipui0271>Continue",
description = "<LOC tooltipui0272>Exit the Score Screen",
},
LadderScore_Feedback = {
title = "<LOC tooltipui0707>Post Feedback",
description = "<LOC tooltipui0709>Open a web page to share your opinion about the current ladder map pool",
},

-- **********************
-- ** Campaign Score
Expand Down

0 comments on commit 9eaaba0

Please sign in to comment.