FReply SProjectLauncherDeployRepositorySettings::HandleBrowseButtonClicked( ) { IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get(); if ( DesktopPlatform ) { TSharedPtr<SWindow> ParentWindow = FSlateApplication::Get().FindWidgetWindow(AsShared()); void* ParentWindowHandle = (ParentWindow.IsValid() && ParentWindow->GetNativeWindow().IsValid()) ? ParentWindow->GetNativeWindow()->GetOSWindowHandle() : nullptr; FString FolderName; const bool bFolderSelected = DesktopPlatform->OpenDirectoryDialog( ParentWindowHandle, LOCTEXT("RepositoryBrowseTitle", "Choose a repository location").ToString(), RepositoryPathTextBox->GetText().ToString(), FolderName ); if ( bFolderSelected ) { if ( !FolderName.EndsWith(TEXT("/")) ) { FolderName += TEXT("/"); } RepositoryPathTextBox->SetText(FText::FromString(FolderName)); ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile(); if(SelectedProfile.IsValid()) { SelectedProfile->SetPackageDirectory(FolderName); } } } return FReply::Handled(); }
FReply SSessionLauncherDeployRepositorySettings::HandleBrowseButtonClicked( ) { IDesktopPlatform* DesktopPlatform = FDesktopPlatformModule::Get(); if ( DesktopPlatform ) { void* ParentWindowWindowHandle = NULL; FString FolderName; const FString Title = LOCTEXT("RepositoryBrowseTitle", "Choose a repository location").ToString(); const bool bFolderSelected = DesktopPlatform->OpenDirectoryDialog( 0, Title, RepositoryPathTextBox->GetText().ToString(), FolderName ); if ( bFolderSelected ) { if ( !FolderName.EndsWith(TEXT("/")) ) { FolderName += TEXT("/"); } RepositoryPathTextBox->SetText(FText::FromString(FolderName)); ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile(); if(SelectedProfile.IsValid()) { SelectedProfile->SetPackageDirectory(FolderName); } } } return FReply::Handled(); }
void SProjectLauncherDeployRepositorySettings::OnTextChanged(const FText& InText) { ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile(); if(SelectedProfile.IsValid()) { SelectedProfile->SetPackageDirectory(InText.ToString()); } }
void SProjectLauncherDeployRepositorySettings::OnTextCommitted( const FText& InText, ETextCommit::Type CommitInfo) { if (CommitInfo == ETextCommit::OnEnter) { ILauncherProfilePtr SelectedProfile = Model->GetSelectedProfile(); if(SelectedProfile.IsValid()) { SelectedProfile->SetPackageDirectory(InText.ToString()); } } }