Created
August 19, 2014 02:35
-
-
Save pnegri/abd6ec9d520d62e7db52 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FSlateColor SStrategySlateHUDWidget::GetOverlayColor() const | |
{ | |
const FStrategyHUDSoundsStyle& HUDSounds = FStrategyStyle::Get().GetWidgetStyle<FStrategyHUDSoundsStyle>("DefaultStrategyHUDSoundsStyle"); | |
FLinearColor Result(0,0,0,0.3f); | |
const float PosExiting = FMath::Max(MenuHelper::GetSoundPlaybackPosition(OwnerHUD->PlayerOwner->GetWorld(),HUDSounds.ExitGameSound,this, &SStrategySlateHUDWidget::ExitGame), | |
MenuHelper::GetSoundPlaybackPosition(OwnerHUD->PlayerOwner->GetWorld(),HUDSounds.ExitGameSound,this, &SStrategySlateHUDWidget::ReturnToMainMenu)); | |
Result.A = 0.3f + 0.7f * PosExiting; | |
if (PosExiting > 0.95f) | |
{ | |
OwnerHUD->ShowBlackScreen(); | |
} | |
return Result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment