Skip to content

Commit 188eb9f

Browse files
committed
new project: F2:focus project name field, F3: select next platform, F4: select next template, Tools: move ADB args to settings tab
1 parent ef20dc0 commit 188eb9f

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

UnityLauncherPro/GetProjects.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ public static List<Project> Scan(bool getGitBranch = false, bool getArguments =
7878
projectName = projectPath;
7979
}
8080

81+
//Console.WriteLine("valueName="+ valueName+" , projectName =" + projectName);
82+
8183
// get last modified date from folder
8284
DateTime? lastUpdated = folderExists ? Tools.GetLastModifiedTime(projectPath) : null;
8385

@@ -144,6 +146,8 @@ public static List<Project> Scan(bool getGitBranch = false, bool getArguments =
144146
} // each key
145147
} // for each registry root
146148

149+
// NOTE sometimes projects are in wrong order, seems to be related to messing up your unity registry, the keys are received in created order (so if you had removed/modified them manually, it might return wrong order instead of 0 - 40)
150+
147151
return projectsFound;
148152
} // Scan()
149153

UnityLauncherPro/MainWindow.xaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -877,13 +877,6 @@
877877
<Button Style="{StaticResource CustomButton}" x:Name="btnOpenADBLogCat" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="BtnOpenADBLogCat_Click" ToolTip="Start ADB logcat commandline">
878878
<Label Content="_ADB logcat" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
879879
</Button>
880-
<Label Content="Args:" Foreground="{DynamicResource ThemeButtonForeground}" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" Margin="0,1,0,-4" />
881-
<Grid Background="{DynamicResource ThemeTextBoxBackground}" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,5,0,0" Height="20" >
882-
<TextBox Width="420" Text="-s Unity ActivityManager PackageManager dalvikvm DEBUG -v color" CaretBrush="{DynamicResource ThemeSearchCaret}" x:Name="txtLogCatArgs" Background="{DynamicResource ThemeTextBoxBackground}" BorderBrush="{x:Null}" Foreground="{DynamicResource ThemeSearchForeground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" BorderThickness="0" Margin="2,2,0,0" UndoLimit="32" TextChanged="TxtLogCatArgs_TextChanged" />
883-
</Grid>
884-
<Button Style="{StaticResource CustomButton}" x:Name="btnResetLogCatArgs" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Reset to default logcat args" Click="BtnResetLogCatArgs_Click">
885-
<Label Content="Reset" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
886-
</Button>
887880
</StackPanel>
888881
</Border>
889882
<!-- links -->
@@ -1039,6 +1032,15 @@
10391032
<Button Style="{StaticResource CustomButton}" x:Name="btnBrowseTemplateUnityPackagesFolder" Content="..." Margin="6,0,0,0" MinWidth="22" MinHeight="22" FontSize="16" ToolTip="Browse for new projects root folder.." Click="BtnBrowseTemplateUnityPackagesFolder_Click" />
10401033
<Label Content="UnityPackage Templates Folder" Foreground="{DynamicResource ThemeButtonForeground}" />
10411034
</StackPanel>-->
1035+
1036+
<Label Content="ADB args:" Foreground="{DynamicResource ThemeButtonForeground}" HorizontalAlignment="Left" VerticalAlignment="Top" VerticalContentAlignment="Center" Margin="0,1,0,-4" />
1037+
<StackPanel Grid.Row="3" Orientation="Horizontal" Margin="0,0,0,4">
1038+
<TextBox x:Name="txtLogCatArgs" BorderBrush="Transparent" Text="-s Unity ActivityManager PackageManager dalvikvm DEBUG -v color" CaretBrush="{DynamicResource ThemeSearchCaret}" Background="{DynamicResource ThemeTextBoxBackground}" SelectionBrush="{DynamicResource ThemeSearchSelection}" Foreground="{DynamicResource ThemeSearchForeground}" MinWidth="312" ToolTip="ADB commandline arguments" Padding="0,3,0,0" TextChanged="TxtLogCatArgs_TextChanged" Width="312" />
1039+
<Button Style="{StaticResource CustomButton}" x:Name="btnResetLogCatArgs" Margin="10,0,0,0" BorderBrush="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Top" ToolTip="Reset to default logcat args" Click="BtnResetLogCatArgs_Click">
1040+
<Label Content="Reset" Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Control}}}" />
1041+
</Button>
1042+
</StackPanel>
1043+
10421044
</StackPanel>
10431045
</StackPanel>
10441046

UnityLauncherPro/NewProject.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ private void Window_PreviewKeyDown(object sender, KeyEventArgs e)
131131
keyboardFocus.MoveFocus(tRequest);
132132
}
133133
break;
134+
case Key.F2: // select project name field
135+
txtNewProjectName.Focus();
136+
txtNewProjectName.SelectAll();
137+
break;
138+
case Key.F3: // next platform
139+
cmbNewProjectPlatform.SelectedIndex = ++cmbNewProjectPlatform.SelectedIndex % cmbNewProjectPlatform.Items.Count;
140+
break;
141+
case Key.F4: // next template
134142
case Key.Oem5: // select next template §-key
135143
cmbNewProjectTemplate.SelectedIndex = ++cmbNewProjectTemplate.SelectedIndex % cmbNewProjectTemplate.Items.Count;
136144
e.Handled = true; // override writing to textbox

0 commit comments

Comments
 (0)