//----------------------------------------------------------------------// // DEBUG //----------------------------------------------------------------------// FString UAISense_Sight::GetDebugLegend() const { static const FColor SightColor = GetDebugSightRangeColor(); static const FColor LoseSightColor = GetDebugLoseSightColor(); return FString::Printf(TEXT("{%s} Sight, {%s} Lose Sight,"), *SightColor.ToString(), *LoseSightColor.ToString()); }
void FColorStructCustomization::OnSetColorFromColorPicker( FLinearColor NewColor ) { FString ColorString; if( bIsLinearColor ) { ColorString = NewColor.ToString(); } else { // Handled by the color picker const bool bSRGB = false; FColor NewFColor = NewColor.ToFColor(bSRGB); ColorString = NewFColor.ToString(); } StructPropertyHandle->SetValueFromFormattedString( ColorString, bIsInteractive ? EPropertyValueSetFlags::InteractiveChange : 0 ); }
void FColorStructCustomization::OnColorPickerCancelled( FLinearColor OriginalColor ) { TArray<FString> PerObjectColors; for( int32 ColorIndex = 0; ColorIndex < SavedPreColorPickerColors.Num(); ++ColorIndex ) { if( bIsLinearColor ) { PerObjectColors.Add( SavedPreColorPickerColors[ColorIndex].ToString() ); } else { const bool bSRGB = false; FColor Color = SavedPreColorPickerColors[ColorIndex].ToFColor( bSRGB ); PerObjectColors.Add( Color.ToString() ); } } StructPropertyHandle->SetPerObjectValues( PerObjectColors ); PerObjectColors.Empty(); }
void AGameplayDebuggingHUDComponent::PrintString(FPrintContext& Context, const FColor& InColor, const FString& InString ) { #if !(UE_BUILD_SHIPPING || UE_BUILD_TEST) PrintString(Context, FString::Printf(TEXT("{%s}%s"), *InColor.ToString(), *InString)); #endif //!(UE_BUILD_SHIPPING || UE_BUILD_TEST) }