diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs index cfb7737..df14d8e 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Extended/LauncherFormExtended.cs @@ -343,7 +343,7 @@ namespace NovetusLauncher private void button23_Click(object sender, EventArgs e) { - launcherForm.AddNewMap(); + } #endregion } diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs index 7d15786..84f9741 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/LauncherFormShared.cs @@ -379,7 +379,7 @@ namespace NovetusLauncher } } - if (gameType == ScriptType.Client && GlobalVars.LocalPlayMode) + if (gameType == ScriptType.Client && GlobalVars.LocalPlayMode && FormStyle != Settings.Style.Stylish) { GeneratePlayerID(); GenerateTripcode(); @@ -469,13 +469,11 @@ namespace NovetusLauncher } // FINALLY. https://stackoverflow.com/questions/11530643/treeview-search - public void SearchMaps() + public TreeNode SearchMapsInternal(string searchText) { - string searchText = SearchBar.Text; - if (string.IsNullOrWhiteSpace(searchText)) { - return; + return null; }; try @@ -493,9 +491,7 @@ namespace NovetusLauncher { TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex]; LastNodeIndex++; - Tree.SelectedNode = selectedNode; - Tree.SelectedNode.Expand(); - Tree.Select(); + return selectedNode; } else { @@ -506,15 +502,26 @@ namespace NovetusLauncher SearchNodes(searchText, Tree.Nodes[0]); TreeNode selectedNode = CurrentNodeMatches[LastNodeIndex]; LastNodeIndex++; - Tree.SelectedNode = selectedNode; - Tree.SelectedNode.Expand(); - Tree.Select(); + return selectedNode; } } catch (Exception ex) { GlobalFuncs.LogExceptions(ex); MessageBox.Show("The map '" + searchText + "' cannot be found. Please try another term.", "Novetus - Error", MessageBoxButtons.OK, MessageBoxIcon.Error); + return null; + } + } + + public void SearchMaps() + { + TreeNode node = SearchMapsInternal(SearchBar.Text); + + if (node != null) + { + Tree.SelectedNode = node; + Tree.SelectedNode.Expand(); + Tree.Select(); } } diff --git a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml index 28874dd..bbba1ca 100644 --- a/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml +++ b/Novetus/NovetusLauncher/Forms/LauncherForm/Stylish/LauncherFormStylishInterface.xaml @@ -181,19 +181,17 @@ - + - - + - - + @@ -214,19 +212,17 @@ - + - - + - - + @@ -247,19 +243,17 @@ - + - - + - - + @@ -280,19 +274,17 @@ - + - - + - - + @@ -313,20 +305,20 @@ - - + + - - + - - + @@ -347,20 +339,20 @@ - - + + - - + - - + @@ -538,7 +530,7 @@ -