mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
update byfron dialog player location
This commit is contained in:
parent
2040dde2fa
commit
ba031a645e
@ -59,6 +59,7 @@ namespace Bloxstrap
|
||||
private IReadOnlyDictionary<string, string> _packageDirectories => _studioLaunch ? PackageMap.Studio : PackageMap.Player;
|
||||
|
||||
public IBootstrapperDialog? Dialog = null;
|
||||
public bool IsStudioLaunch => _studioLaunch;
|
||||
#endregion
|
||||
|
||||
#region Core
|
||||
|
@ -69,7 +69,7 @@ namespace Bloxstrap.UI.Elements.Bootstrapper
|
||||
|
||||
public ByfronDialog()
|
||||
{
|
||||
_viewModel = new ByfronDialogViewModel(this);
|
||||
_viewModel = new ByfronDialogViewModel(this, Bootstrapper?.IsStudioLaunch ?? false);
|
||||
DataContext = _viewModel;
|
||||
Title = App.Settings.Prop.BootstrapperTitle;
|
||||
Icon = App.Settings.Prop.BootstrapperIcon.GetIcon().GetImageSource();
|
||||
|
@ -6,6 +6,8 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
|
||||
{
|
||||
public class ByfronDialogViewModel : BootstrapperDialogViewModel
|
||||
{
|
||||
private bool _studioLaunch;
|
||||
|
||||
// Using dark theme for default values.
|
||||
public ImageSource ByfronLogoLocation { get; set; } = new BitmapImage(new Uri("pack://application:,,,/Resources/BootstrapperStyles/ByfronDialog/ByfronLogoDark.jpg"));
|
||||
public Thickness DialogBorder { get; set; } = new Thickness(0);
|
||||
@ -20,7 +22,10 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
|
||||
{
|
||||
get
|
||||
{
|
||||
string playerLocation = Path.Combine(Paths.Versions, App.State.Prop.PlayerVersionGuid, "RobloxPlayerBeta.exe");
|
||||
string versionGuid = _studioLaunch ? App.State.Prop.StudioVersionGuid : App.State.Prop.PlayerVersionGuid;
|
||||
string fileName = _studioLaunch ? "RobloxStudioBeta.exe" : "RobloxPlayerBeta.exe";
|
||||
|
||||
string playerLocation = Path.Combine(Paths.Versions, versionGuid, fileName);
|
||||
|
||||
if (!File.Exists(playerLocation))
|
||||
return "";
|
||||
@ -34,8 +39,9 @@ namespace Bloxstrap.UI.ViewModels.Bootstrapper
|
||||
}
|
||||
}
|
||||
|
||||
public ByfronDialogViewModel(IBootstrapperDialog dialog) : base(dialog)
|
||||
public ByfronDialogViewModel(IBootstrapperDialog dialog, bool isStudioLaunch) : base(dialog)
|
||||
{
|
||||
_studioLaunch = isStudioLaunch;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user