Update config tab names to include stable ids, add more localizable text

rendering
Liza 2023-02-11 14:40:22 +01:00
parent 0bec8cf759
commit 12de110b04
4 changed files with 37 additions and 11 deletions

View File

@ -320,6 +320,15 @@ namespace Pal.Client.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Path to *.pal file.
/// </summary>
internal static string Config_SelectImportFile_Hint {
get {
return ResourceManager.GetString("Config_SelectImportFile_Hint", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Select which render backend to use for markers:.
/// </summary>
@ -411,6 +420,15 @@ namespace Pal.Client.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Testing....
/// </summary>
internal static string Config_TestConnection_Connecting {
get {
return ResourceManager.GetString("Config_TestConnection_Connecting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Trap color.
/// </summary>

View File

@ -159,6 +159,10 @@ This is not synchronized with other players and not saved between floors/runs.</
<data name="Config_TestConnection" xml:space="preserve">
<value>Test Connection</value>
</data>
<data name="Config_TestConnection_Connecting" xml:space="preserve">
<value>Testing...</value>
<comment>When clicking on the 'Test Connection' button, this is shown until a success/error message is available.</comment>
</data>
<data name="ConfigTab_Import" xml:space="preserve">
<value>Import</value>
@ -181,6 +185,10 @@ This is not synchronized with other players and not saved between floors/runs.</
<data name="Config_SelectImportFile" xml:space="preserve">
<value>File to Import:</value>
</data>
<data name="Config_SelectImportFile_Hint" xml:space="preserve">
<value>Path to *.pal file</value>
<comment>When importing a file, this is the hint that shows up in the 'path' input box while no file has been selected.</comment>
</data>
<data name="Config_StartImport" xml:space="preserve">
<value>Start Import</value>
</data>

View File

@ -49,7 +49,7 @@ namespace Pal.Client.Windows
public ConfigWindow() : base(WindowId)
{
LanguageChanged();
Size = new Vector2(500, 400);
SizeCondition = ImGuiCond.FirstUseEver;
Position = new Vector2(300, 300);
@ -129,7 +129,7 @@ namespace Pal.Client.Windows
private void DrawDeepDungeonItemsTab(ref bool save, ref bool saveAndClose)
{
if (ImGui.BeginTabItem(Localization.ConfigTab_DeepDungeons))
if (ImGui.BeginTabItem($"{Localization.ConfigTab_DeepDungeons}###TabDeepDungeons"))
{
ImGui.Checkbox(Localization.Config_Traps_Show, ref _showTraps);
ImGui.Indent();
@ -179,7 +179,7 @@ namespace Pal.Client.Windows
private void DrawCommunityTab(ref bool saveAndClose)
{
if (BeginTabItemEx(Localization.ConfigTab_Community, _switchToCommunityTab ? ImGuiTabItemFlags.SetSelected : ImGuiTabItemFlags.None))
if (BeginTabItemEx($"{Localization.ConfigTab_Community}###TabCommunity", _switchToCommunityTab ? ImGuiTabItemFlags.SetSelected : ImGuiTabItemFlags.None))
{
_switchToCommunityTab = false;
@ -206,7 +206,7 @@ namespace Pal.Client.Windows
private void DrawImportTab()
{
if (ImGui.BeginTabItem(Localization.ConfigTab_Import))
if (ImGui.BeginTabItem($"{Localization.ConfigTab_Import}###TabImport"))
{
ImGui.TextWrapped(Localization.Config_ImportExplanation1);
ImGui.TextWrapped(Localization.Config_ImportExplanation2);
@ -218,7 +218,7 @@ namespace Pal.Client.Windows
ImGui.Separator();
ImGui.Text(Localization.Config_SelectImportFile);
ImGui.SameLine();
ImGui.InputTextWithHint("", "Path to *.pal file", ref _openImportPath, 260);
ImGui.InputTextWithHint("", Localization.Config_SelectImportFile_Hint, ref _openImportPath, 260);
ImGui.SameLine();
if (ImGuiComponents.IconButton(FontAwesomeIcon.Search))
{
@ -253,7 +253,7 @@ namespace Pal.Client.Windows
private void DrawExportTab()
{
if (Service.RemoteApi.HasRoleOnCurrentServer("export:run") && ImGui.BeginTabItem(Localization.ConfigTab_Export))
if (Service.RemoteApi.HasRoleOnCurrentServer("export:run") && ImGui.BeginTabItem($"{Localization.ConfigTab_Export}###TabExport"))
{
string todaysFileName = $"export-{DateTime.Today:yyyy-MM-dd}.pal";
if (string.IsNullOrEmpty(_saveExportPath) && !string.IsNullOrEmpty(_saveExportDialogStartPath))
@ -262,7 +262,7 @@ namespace Pal.Client.Windows
ImGui.TextWrapped(string.Format(Localization.Config_ExportSource, RemoteApi.RemoteUrl));
ImGui.Text(Localization.Config_Export_SaveAs);
ImGui.SameLine();
ImGui.InputTextWithHint("", "Path to *.pal file", ref _saveExportPath, 260);
ImGui.InputTextWithHint("", Localization.Config_SelectImportFile_Hint, ref _saveExportPath, 260);
ImGui.SameLine();
if (ImGuiComponents.IconButton(FontAwesomeIcon.Search))
{
@ -287,7 +287,7 @@ namespace Pal.Client.Windows
private void DrawRenderTab(ref bool save, ref bool saveAndClose)
{
if (ImGui.BeginTabItem(Localization.ConfigTab_Renderer))
if (ImGui.BeginTabItem($"{Localization.ConfigTab_Renderer}###TabRenderer"))
{
ImGui.Text(Localization.Config_SelectRenderBackend);
ImGui.RadioButton($"{Localization.Config_Renderer_Splatoon} ({Localization.Config_Renderer_Splatoon_Hint})", ref _renderer, (int)Configuration.ERenderer.Splatoon);
@ -312,7 +312,7 @@ namespace Pal.Client.Windows
private void DrawDebugTab()
{
if (ImGui.BeginTabItem(Localization.ConfigTab_Debug))
if (ImGui.BeginTabItem($"{Localization.ConfigTab_Debug}###TabDebug"))
{
var plugin = Service.Plugin;
if (plugin.IsInDeepDungeon())
@ -374,7 +374,7 @@ namespace Pal.Client.Windows
{
Task.Run(async () =>
{
_connectionText = "Testing...";
_connectionText = Localization.Config_TestConnection_Connecting;
_switchToCommunityTab = true;
CancellationTokenSource cts = new CancellationTokenSource();

View File

@ -22,7 +22,7 @@ namespace Pal.Client.Windows
public StatisticsWindow() : base(WindowId)
{
LanguageChanged();
Size = new Vector2(500, 500);
SizeCondition = ImGuiCond.FirstUseEver;
Flags = ImGuiWindowFlags.AlwaysAutoResize;