mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Prompt user to install OpenXR package if not installed
This commit is contained in:
parent
c060f00535
commit
75b522d210
8 changed files with 125 additions and 1 deletions
|
@ -18,6 +18,23 @@ namespace winrt::ServoApp::implementation {
|
|||
BrowserPage::BrowserPage() {
|
||||
InitializeComponent();
|
||||
BindServoEvents();
|
||||
if (!xrPkgChecker.IsInstalled()) {
|
||||
XRPkgWarning().Visibility(Visibility::Visible);
|
||||
xrPkgChecker.OnInstalled(
|
||||
[=] { XRPkgWarning().Visibility(Visibility::Collapsed); },
|
||||
std::chrono::seconds{5});
|
||||
}
|
||||
}
|
||||
|
||||
void BrowserPage::OnXRPkgWarningDismissClick(IInspectable const &,
|
||||
RoutedEventArgs const &) {
|
||||
xrPkgChecker.StopTracking();
|
||||
XRPkgWarning().Visibility(Visibility::Collapsed);
|
||||
}
|
||||
|
||||
void BrowserPage::OnXRPkgWarningInstallClick(IInspectable const &,
|
||||
RoutedEventArgs const &) {
|
||||
xrPkgChecker.OpenStore();
|
||||
}
|
||||
|
||||
void BrowserPage::BindServoEvents() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue