diff --git a/Fo76ini/Forms/FormSettings/FormSettings.cs b/Fo76ini/Forms/FormSettings/FormSettings.cs index 72cedf9..d115964 100644 --- a/Fo76ini/Forms/FormSettings/FormSettings.cs +++ b/Fo76ini/Forms/FormSettings/FormSettings.cs @@ -67,6 +67,7 @@ public FormSettings() // Init components / assign event handler: this.listViewGameInstances.HeaderStyle = ColumnHeaderStyle.None; + this.listViewGameInstances.DoubleClick += listViewGameInstances_DoubleClick; this.backgroundWorkerDownloadLanguages.RunWorkerCompleted += backgroundWorkerDownloadLanguages_RunWorkerCompleted; this.backgroundWorkerRetrieveProfileInfo.RunWorkerCompleted += backgroundWorkerRetrieveProfileInfo_RunWorkerCompleted; @@ -202,12 +203,17 @@ private void UpdateGamesTab() this.listViewGameInstances.Items.Clear(); foreach (GameInstance game in ProfileManager.Games) { + bool isSelected = ProfileManager.IsSelected(game); + // ... add it to the list. - ListViewItem gameItem = new ListViewItem(game.Title, GetImageIndex(game.Edition)); + ListViewItem gameItem = new ListViewItem( + game.Title + (isSelected ? $" [{Localization.GetString("selected")}]" : ""), + GetImageIndex(game.Edition) + ); this.listViewGameInstances.Items.Add(gameItem); // If it is the currently selected game, then... - if (ProfileManager.IsSelected(game)) + if (isSelected) { // ... select it in the list ... gameItem.Selected = true; @@ -561,6 +567,13 @@ private void contextMenuStripGame_Opening(object sender, CancelEventArgs e) this.gameToolStripMenuItem.Text = ProfileManager.SelectedGame.Title; } + private void listViewGameInstances_DoubleClick(object sender, EventArgs e) + { + if (UpdatingUI) + return; + renameGameToolStripMenuItem_Click(sender, e); + } + #endregion #region Translations diff --git a/Fo76ini/Interface/Translation.Shared.cs b/Fo76ini/Interface/Translation.Shared.cs index 3e15a7c..c96e7dc 100644 --- a/Fo76ini/Interface/Translation.Shared.cs +++ b/Fo76ini/Interface/Translation.Shared.cs @@ -38,6 +38,7 @@ private static void AddSharedStrings() localizedStrings["invalid"] = "Invalid"; localizedStrings["auto"] = "Auto"; localizedStrings["unknown"] = "Unknown"; + localizedStrings["selected"] = "selected"; localizedStrings["nuclearwintermode"] = "Nuclear Winter"; localizedStrings["adventuremode"] = "Adventure"; localizedStrings["affectedValues"] = "Affected values";