1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2025-09-06 08:20:15 +02:00

Add translations from v1

This commit is contained in:
Alexis Murzeau 2022-08-15 17:55:39 +02:00
parent c1c74878df
commit aa58379c56
19 changed files with 7959 additions and 458 deletions

View file

@ -121,7 +121,7 @@ void high_score::RenderHighScoreDialog()
if (ShowDialog == true)
{
ShowDialog = false;
if (!ImGui::IsPopupOpen("High Scores"))
if (!ImGui::IsPopupOpen(pinball::get_rc_string(translation_id_e::HIGHSCORES_Caption)))
{
dlg_enter_name = false;
while (!ScoreQueue.empty())
@ -140,19 +140,19 @@ void high_score::RenderHighScoreDialog()
}
}
ImGui::OpenPopup("High Scores");
ImGui::OpenPopup(pinball::get_rc_string(translation_id_e::HIGHSCORES_Caption));
}
}
bool unused_open = true;
if (ImGui::BeginPopupModal("High Scores", &unused_open, ImGuiWindowFlags_AlwaysAutoResize))
if (ImGui::BeginPopupModal(pinball::get_rc_string(translation_id_e::HIGHSCORES_Caption), &unused_open, ImGuiWindowFlags_AlwaysAutoResize))
{
if (ImGui::BeginTable("table1", 3, ImGuiTableFlags_Borders))
{
char buf[36];
ImGui::TableSetupColumn("Rank");
ImGui::TableSetupColumn("Name");
ImGui::TableSetupColumn("Score");
ImGui::TableSetupColumn(pinball::get_rc_string(translation_id_e::HIGHSCORES_Rank));
ImGui::TableSetupColumn(pinball::get_rc_string(translation_id_e::HIGHSCORES_Name));
ImGui::TableSetupColumn(pinball::get_rc_string(translation_id_e::HIGHSCORES_Score));
ImGui::TableHeadersRow();
for (int offset = 0, row = 0; row < 5; row++)
@ -184,7 +184,7 @@ void high_score::RenderHighScoreDialog()
ImGui::EndTable();
}
if (ImGui::Button("Ok"))
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Ok)))
{
if (dlg_enter_name)
{
@ -194,23 +194,23 @@ void high_score::RenderHighScoreDialog()
}
ImGui::SameLine();
if (ImGui::Button("Cancel"))
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Cancel)))
ImGui::CloseCurrentPopup();
ImGui::SameLine();
if (ImGui::Button("Clear"))
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Clear)))
ImGui::OpenPopup("Confirm");
if (ImGui::BeginPopupModal("Confirm", nullptr, ImGuiWindowFlags_MenuBar))
{
ImGui::TextUnformatted(pinball::get_rc_string(40, 0));
if (ImGui::Button("OK", ImVec2(120, 0)))
ImGui::TextUnformatted(pinball::get_rc_string(translation_id_e::STRING141));
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Ok), ImVec2(120, 0)))
{
clear_table();
ImGui::CloseCurrentPopup();
}
ImGui::SetItemDefaultFocus();
ImGui::SameLine();
if (ImGui::Button("Cancel", ImVec2(120, 0)))
if (ImGui::Button(pinball::get_rc_string(translation_id_e::HIGHSCORES_Cancel), ImVec2(120, 0)))
{
ImGui::CloseCurrentPopup();
}
@ -220,7 +220,7 @@ void high_score::RenderHighScoreDialog()
ImGui::EndPopup();
// Reenter dialog for the next score in the queue
if (!ImGui::IsPopupOpen("High Scores") && !ScoreQueue.empty())
if (!ImGui::IsPopupOpen(pinball::get_rc_string(translation_id_e::HIGHSCORES_Caption)) && !ScoreQueue.empty())
{
ShowDialog = true;
}