mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 01:51:29 -07:00
add studio shortcut option
This commit is contained in:
parent
72e2810a2d
commit
dd7d870b90
@ -49,14 +49,31 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
|
<!-- https://stackoverflow.com/a/51967350 -->
|
||||||
|
<ColumnDefinition>
|
||||||
|
<ColumnDefinition.Style>
|
||||||
|
<Style TargetType="ColumnDefinition">
|
||||||
|
<Setter Property="Width" Value="*" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsStudioOptionVisible}" Value="False">
|
||||||
|
<Setter Property="Width" Value="0" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</ColumnDefinition.Style>
|
||||||
|
</ColumnDefinition>
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<controls:OptionControl Grid.Column="0" Margin="0,0,4,0" Header="{x:Static resources:Strings.LaunchMenu_LaunchRoblox}">
|
<controls:OptionControl Grid.Column="0" Margin="0,0,2,0" Header="{x:Static resources:Strings.LaunchMenu_LaunchRoblox}">
|
||||||
<ui:ToggleSwitch IsChecked="{Binding PlayerIconTask.NewState, Mode=TwoWay}" />
|
<ui:ToggleSwitch IsChecked="{Binding PlayerIconTask.NewState, Mode=TwoWay}" />
|
||||||
</controls:OptionControl>
|
</controls:OptionControl>
|
||||||
|
|
||||||
<controls:OptionControl Grid.Column="1" Margin="4,0,0,0" Header="{x:Static resources:Strings.Menu_Title}">
|
<controls:OptionControl Grid.Column="1" Margin="2,0,2,0" Header="{x:Static resources:Strings.LaunchMenu_LaunchRobloxStudio}">
|
||||||
|
<ui:ToggleSwitch IsChecked="{Binding StudioIconTask.NewState, Mode=TwoWay}" />
|
||||||
|
</controls:OptionControl>
|
||||||
|
|
||||||
|
<controls:OptionControl Grid.Column="2" Margin="2,0,0,0" Header="{x:Static resources:Strings.Menu_Title}">
|
||||||
<ui:ToggleSwitch IsChecked="{Binding SettingsIconTask.NewState, Mode=TwoWay}" />
|
<ui:ToggleSwitch IsChecked="{Binding SettingsIconTask.NewState, Mode=TwoWay}" />
|
||||||
</controls:OptionControl>
|
</controls:OptionControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
using Bloxstrap.Models.SettingTasks;
|
namespace Bloxstrap.UI.ViewModels.Settings
|
||||||
using Bloxstrap.Resources;
|
|
||||||
|
|
||||||
namespace Bloxstrap.UI.ViewModels.Settings
|
|
||||||
{
|
{
|
||||||
public class ShortcutsViewModel : NotifyPropertyChangedViewModel
|
public class ShortcutsViewModel : NotifyPropertyChangedViewModel
|
||||||
{
|
{
|
||||||
|
public bool IsStudioOptionVisible => !String.IsNullOrEmpty(App.State.Prop.Studio.VersionGuid);
|
||||||
|
|
||||||
public ShortcutTask DesktopIconTask { get; } = new("Desktop", Paths.Desktop, $"{App.ProjectName}.lnk");
|
public ShortcutTask DesktopIconTask { get; } = new("Desktop", Paths.Desktop, $"{App.ProjectName}.lnk");
|
||||||
|
|
||||||
public ShortcutTask StartMenuIconTask { get; } = new("StartMenu", Paths.WindowsStartMenu, $"{App.ProjectName}.lnk");
|
public ShortcutTask StartMenuIconTask { get; } = new("StartMenu", Paths.WindowsStartMenu, $"{App.ProjectName}.lnk");
|
||||||
|
|
||||||
public ShortcutTask PlayerIconTask { get; } = new("RobloxPlayer", Paths.Desktop, $"{Strings.LaunchMenu_LaunchRoblox}.lnk", "-player");
|
public ShortcutTask PlayerIconTask { get; } = new("RobloxPlayer", Paths.Desktop, $"{Strings.LaunchMenu_LaunchRoblox}.lnk", "-player");
|
||||||
|
|
||||||
|
public ShortcutTask StudioIconTask { get; } = new("RobloxStudio", Paths.Desktop, $"{Strings.LaunchMenu_LaunchRobloxStudio}.lnk", "-studio");
|
||||||
|
|
||||||
public ShortcutTask SettingsIconTask { get; } = new("Settings", Paths.Desktop, $"{Strings.Menu_Title}.lnk", "-settings");
|
public ShortcutTask SettingsIconTask { get; } = new("Settings", Paths.Desktop, $"{Strings.Menu_Title}.lnk", "-settings");
|
||||||
|
|
||||||
public ExtractIconsTask ExtractIconsTask { get; } = new();
|
public ExtractIconsTask ExtractIconsTask { get; } = new();
|
||||||
|
Loading…
Reference in New Issue
Block a user