Fix quit menu showing incorrect key when using non-default bindings
authorWuzzy <Wuzzy2@mail.ru>
Wed, 21 Feb 2018 03:03:16 +0100
changeset 13049 1df5b407f368
parent 13048 9119726e22bc
child 13050 25a9260244f3
Fix quit menu showing incorrect key when using non-default bindings
ChangeLog.txt
hedgewars/uStore.pas
share/hedgewars/Data/Locale/ar.txt
share/hedgewars/Data/Locale/bg.txt
share/hedgewars/Data/Locale/cs.txt
share/hedgewars/Data/Locale/da.txt
share/hedgewars/Data/Locale/de.txt
share/hedgewars/Data/Locale/el.txt
share/hedgewars/Data/Locale/en.txt
share/hedgewars/Data/Locale/es.txt
share/hedgewars/Data/Locale/fi.txt
share/hedgewars/Data/Locale/fr.txt
share/hedgewars/Data/Locale/gd.txt
share/hedgewars/Data/Locale/gl.txt
share/hedgewars/Data/Locale/hu.txt
share/hedgewars/Data/Locale/it.txt
share/hedgewars/Data/Locale/ja.txt
share/hedgewars/Data/Locale/ko.txt
share/hedgewars/Data/Locale/lt.txt
share/hedgewars/Data/Locale/nl.txt
share/hedgewars/Data/Locale/pl.txt
share/hedgewars/Data/Locale/pt_BR.txt
share/hedgewars/Data/Locale/pt_PT.txt
share/hedgewars/Data/Locale/ro.txt
share/hedgewars/Data/Locale/ru.txt
share/hedgewars/Data/Locale/sk.txt
share/hedgewars/Data/Locale/sv.txt
share/hedgewars/Data/Locale/tr.txt
share/hedgewars/Data/Locale/uk.txt
share/hedgewars/Data/Locale/zh_CN.txt
share/hedgewars/Data/Locale/zh_TW.txt
--- a/ChangeLog.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/ChangeLog.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -14,6 +14,7 @@
  * Fix chat input key being sometimes registered twice
  * Fix not displaying current volume status after pressing mute key
  * Fix many effects not being correctly recorded by the video recorder
+ * Fix quit menu showing incorrect keys if using non-default key bindings
 
 Frontend:
  + Schemes are now stored in separate files under Schemes
--- a/hedgewars/uStore.pas	Wed Feb 21 02:37:01 2018 +0100
+++ b/hedgewars/uStore.pas	Wed Feb 21 03:03:16 2018 +0100
@@ -62,7 +62,7 @@
 
 implementation
 uses uMisc, uConsole, uVariables, uUtils, uTextures, uRender, uRenderUtils,
-     uCommands, uPhysFSLayer, uDebug, adler32
+     uCommands, uPhysFSLayer, uDebug, uLocale, uInputHandler, adler32
     {$IFDEF USE_CONTEXT_RESTORE}, uWorld{$ENDIF};
 
 //type TGPUVendor = (gvUnknown, gvNVIDIA, gvATI, gvIntel, gvApple);
@@ -373,6 +373,7 @@
     ai: TAmmoType;
     tmpsurf, tmpoverlay: PSDL_Surface;
     i, y, imflags: LongInt;
+    keyConfirm, keyQuit: ansistring;
 begin
 AddFileLog('StoreLoad()');
 
@@ -500,7 +501,9 @@
 
     PauseTexture:= RenderStringTex(trmsg[sidPaused], cYellowColor, fntBig);
     AFKTexture:= RenderStringTex(trmsg[sidAFK], cYellowColor, fntBig);
-    ConfirmTexture:= RenderStringTex(trmsg[sidConfirm], cYellowColor, fntBig);
+    keyConfirm:= KeyBindToName('confirm');
+    keyQuit:= KeyBindToName('quit');
+    ConfirmTexture:= RenderStringTex(FormatA(trmsg[sidConfirm], [keyConfirm, keyQuit]), cYellowColor, fntBig);
     SyncTexture:= RenderStringTex(trmsg[sidSync], cYellowColor, fntBig);
 
     if not reload then
--- a/share/hedgewars/Data/Locale/ar.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/ar.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -48,7 +48,7 @@
 01:02=%1 يفوز
 01:03=جزء %1%
 01:04=توقف
-01:05=خروج (Y/Esc)?
+01:05=خروج (%1/%2)?
 01:06=موت مفاجئ
 01:07=%1 متبقي
 01:08=طاقة
--- a/share/hedgewars/Data/Locale/bg.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/bg.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -43,7 +43,7 @@
 01:02=Отборът %1 победи!
 01:03=Звук %1%
 01:04=На Пауза
-01:05=Наистина ли напускате (Y/Esc)?
+01:05=Наистина ли напускате (%1/%2)?
 01:06=Внезапна смърт!
 01:07=%1 остава
 01:08=Гориво
--- a/share/hedgewars/Data/Locale/cs.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/cs.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -62,7 +62,7 @@
 01:02=%1 vyhráli!
 01:03=Hlasitost %1%
 01:04=Pauza
-01:05=Opravdu ukončit (Y/Esc)?
+01:05=Opravdu ukončit (%1/%2)?
 01:06=Náhlá smrt!
 01:07=%1 zbývá
 01:08=Palivo
--- a/share/hedgewars/Data/Locale/da.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/da.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -62,7 +62,7 @@
 01:02=%1 vinder!
 01:03=Lydstyrke %1%
 01:04=Sat på pause
-01:05=Vil du virkelig forlade spillet (Y/Esc)?
+01:05=Vil du virkelig forlade spillet (%1/%2)?
 01:06=Pludselig Død!
 01:07=%1 tilbage
 01:08=Brændstof
--- a/share/hedgewars/Data/Locale/de.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/de.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -67,7 +67,7 @@
 01:02=%1 gewinnt!
 01:03=Lautstärke: %1 %
 01:04=Pause
-01:05=Wirklich beenden (Z/Esc)?
+01:05=Wirklich beenden (%1/%2)? (Klicken zum Fortfahren)
 01:06=Sudden Death!
 01:07=%1 verbleibend
 01:08=Treibstoff
--- a/share/hedgewars/Data/Locale/el.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/el.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -56,7 +56,7 @@
 01:02=Οι %1 Νικούν!
 01:03=Ένταση Ήχου %1%
 01:04=Παύση
-01:05=Σίγουρα θέλετε να φύγετε (Y/Esc);
+01:05=Σίγουρα θέλετε να φύγετε (%1/%2);
 01:06=Ξαφνικός Θάνατος!
 01:07=%1 απομένουν
 01:08=Καύσιμα
--- a/share/hedgewars/Data/Locale/en.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/en.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -68,7 +68,7 @@
 01:02=%1 wins!
 01:03=Volume %1%
 01:04=Paused
-01:05=Really quit? (Y/Esc) (Click to resume)
+01:05=Really quit? (%1/%2) (Click to resume)
 01:06=Sudden Death!
 01:07=%1 remaining
 01:08=Fuel
--- a/share/hedgewars/Data/Locale/es.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/es.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -63,7 +63,7 @@
 01:02=¡%1 venció!
 01:03=Volumen %1%
 01:04=Pausa
-01:05=¿Seguro que quieres salir (Y / Esc)?
+01:05=¿Seguro que quieres salir (%1 / %2)?
 01:06=¡Muerte súbita!
 01:07=%1 restante
 01:08=Combustible
--- a/share/hedgewars/Data/Locale/fi.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/fi.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -66,7 +66,7 @@
 01:02=%1 voitti!
 01:03=Äänenvoimakkuus %1%
 01:04=Tauko
-01:05=Poistutaanko (Y/Esc)?
+01:05=Poistutaanko (%1/%2)?
 01:06=Äkkikuolema!
 01:07=%1 Jäljellä
 01:08=Polttoaine
--- a/share/hedgewars/Data/Locale/fr.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/fr.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -63,7 +63,7 @@
 01:02=%1 gagne !
 01:03=Volume %1%
 01:04=Pause
-01:05=Quitter? (Y/Esc) (Cliquer pour reprendre)
+01:05=Quitter? (%1/%2) (Cliquer pour reprendre)
 01:06=Mort subite !
 01:07=%1 Restantes
 01:08=Carburant
--- a/share/hedgewars/Data/Locale/gd.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/gd.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -66,7 +66,7 @@
 01:02=bhuannaich %1!
 01:03=Fuaim %1%
 01:04=’Na stad
-01:05=Fàgail dha-rìribh? (Y/Esc) (Briog gus leantainn air adhart)
+01:05=Fàgail dha-rìribh? (%1/%2) (Briog gus leantainn air adhart)
 01:06=Bàs obann!
 01:07=%1 air fhàgail
 01:08=Connadh
--- a/share/hedgewars/Data/Locale/gl.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/gl.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -47,7 +47,7 @@
 01:02=%1 gaña!
 01:03=Volume %1%
 01:04=En pausa
-01:05=Saír (Y/Esc)?
+01:05=Saír (%1/%2)?
 01:06=Morte súbita!
 01:07=%1 restante
 01:08=Combustible
--- a/share/hedgewars/Data/Locale/hu.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/hu.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -48,7 +48,7 @@
 01:02=%1 nyert!
 01:03=Hangerő %1%
 01:04=Szünet
-01:05=Valóban Kilépsz? (Y/Esc)
+01:05=Valóban Kilépsz? (%1/%2)
 01:06=Hirtelen halál!
 01:07=%1 maradt
 01:08=Töltet
--- a/share/hedgewars/Data/Locale/it.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/it.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -64,7 +64,7 @@
 01:02=%1 vince!
 01:03=Volume %1%
 01:04=In pausa
-01:05=Vuoi davvero uscire (Y/Esc)?
+01:05=Vuoi davvero uscire (%1/%2)?
 01:06=Morte improvvisa!
 01:07=%1 rimanenti
 01:08=Carburante
--- a/share/hedgewars/Data/Locale/ja.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/ja.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -62,7 +62,7 @@
 01:02=%1 勝った!
 01:03=音量 %1%
 01:04=休憩
-01:05=本当にやめるの (Y/Esc)?
+01:05=本当にやめるの (%1/%2)?
 01:06=サドンデス!
 01:07=%1 残る
 01:08=燃料
--- a/share/hedgewars/Data/Locale/ko.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/ko.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -56,7 +56,7 @@
 01:02=%1 승리!
 01:03=음량 %1%
 01:04=정지
-01:05=그만둘까요? (Y/Esc)?
+01:05=그만둘까요? (%1/%2)?
 01:06=단판 결승!
 01:07=%1 발 남는다
 01:08=연료
--- a/share/hedgewars/Data/Locale/lt.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/lt.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -65,7 +65,7 @@
 01:02=%1 Laimėjo!
 01:03=Garsas %1%
 01:04=Sustabdyta
-01:05=Tikrai išeiti (Y/Esc)?
+01:05=Tikrai išeiti (%1/%2)?
 01:06=Maras!
 01:07=%1 Liko
 01:08=Degalai
--- a/share/hedgewars/Data/Locale/nl.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/nl.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -57,7 +57,7 @@
 01:02=%1 wins!
 01:03=Volume %1%
 01:04=Paused
-01:05=Really quit (Y/Esc)?
+01:05=Really quit (%1/%2)?
 01:06=Sudden Death!
 01:07=%1 remaining
 01:08=Fuel
--- a/share/hedgewars/Data/Locale/pl.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/pl.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -67,7 +67,7 @@
 01:02=%1 wygrywają!
 01:03=Głośność %1%
 01:04=Gra wstrzymana
-01:05=Na pewno wyjść (Y/Esc)?
+01:05=Na pewno wyjść (%1/%2)?
 01:06=Nagła śmierć!
 01:07=%1 strzały pozostał(y)
 01:08=Paliwo
--- a/share/hedgewars/Data/Locale/pt_BR.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/pt_BR.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -64,7 +64,7 @@
 01:02=%1 ganhou!
 01:03=Volume %1%
 01:04=Pausado
-01:05=Realmente sair (Y/Esc)?
+01:05=Realmente sair (%1/%2)?
 01:06=Morte Súbita!
 01:07=%1 Remanescente
 01:08=Combustível
--- a/share/hedgewars/Data/Locale/pt_PT.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/pt_PT.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -64,7 +64,7 @@
 01:02=%1 venceu!
 01:03=Volume %1%
 01:04=Pausado
-01:05=Deseja realmente sair (Y/Esc)?
+01:05=Deseja realmente sair (%1/%2)?
 01:06=Morte Súbita!
 01:07=%1 restante
 01:08=Combustível
--- a/share/hedgewars/Data/Locale/ro.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/ro.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -62,7 +62,7 @@
 01:02=%1 a câștigat!
 01:03=Volumul %1%
 01:04=Pauză
-01:05=Sigur ieșiți (Y/Esc)?
+01:05=Sigur ieșiți (%1/%2)?
 01:06=Moarte subita!
 01:07=%1 rămas
 01:08=combustibil
--- a/share/hedgewars/Data/Locale/ru.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/ru.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -67,7 +67,7 @@
 01:02=Победила команда %1!
 01:03=Громкость %1%
 01:04=Пауза
-01:05=Точно выйти (Y-Да/Esc-Нет)?
+01:05=Точно выйти (%1/%2)?
 01:06=Скоро потоп!
 01:07=Ещё %1
 01:08=Топливо
--- a/share/hedgewars/Data/Locale/sk.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/sk.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -66,7 +66,7 @@
 01:02=%1 vyhrali!
 01:03=Hlasitosť %1%
 01:04=Pauza
-01:05=Naozaj skončiť (Y/Esc)?
+01:05=Naozaj skončiť (%1/%2)?
 01:06=Rýchla smrť!
 01:07=%1 Ostáva
 01:08=Palivo
--- a/share/hedgewars/Data/Locale/sv.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/sv.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -62,7 +62,7 @@
 01:02=%1 vinner!
 01:03=Volym %1%
 01:04=Pausat
-01:05=Vill du verkligen avsluta (Y/Esc)?
+01:05=Vill du verkligen avsluta (%1/%2)?
 01:06=Sudden death!
 01:07=%1 kvar
 01:08=Bränsle
--- a/share/hedgewars/Data/Locale/tr.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/tr.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -64,7 +64,7 @@
 01:02=%1 kazandı!
 01:03=Bölüm %%1
 01:04=Duraklatıldı
-01:05=Çıkılsın mı (Y/Esc)?
+01:05=Çıkılsın mı (%1/%2)?
 01:06=Ani ölüm!
 01:07=%1 Kaldı
 01:08=Yakıt
--- a/share/hedgewars/Data/Locale/uk.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/uk.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -65,7 +65,7 @@
 01:02=Перемогла команда %1!
 01:03=Гучність %1%
 01:04=Пауза
-01:05=Точно вийти (Y/Esc)?
+01:05=Точно вийти (%1/%2)?
 01:06=Раптова смерть!
 01:07=Залишилось %1
 01:08=Пальне
--- a/share/hedgewars/Data/Locale/zh_CN.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/zh_CN.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -66,5 +66,5 @@
 01:02= %1 胜!
 01:03=音量 %1%
 01:04=暂停
-01:05=退出 (Y/Esc)?
+01:05=退出 (%1/%2)?
 01:06=出现紧急情况!
--- a/share/hedgewars/Data/Locale/zh_TW.txt	Wed Feb 21 02:37:01 2018 +0100
+++ b/share/hedgewars/Data/Locale/zh_TW.txt	Wed Feb 21 03:03:16 2018 +0100
@@ -66,7 +66,7 @@
 01:02=%1 勝利!
 01:03=音量 %1%
 01:04=暫停
-01:05=確定要退出 (是Y/否Esc)?
+01:05=確定要退出 (是%1/否%2)?
 01:06=意外死亡模式!
 01:07=%1 剩餘
 01:08=燃料