本文整理匯總了C++中GET_MEMBER_NAME_CHECKED函數的典型用法代碼示例。如果您正苦於以下問題:C++ GET_MEMBER_NAME_CHECKED函數的具體用法?C++ GET_MEMBER_NAME_CHECKED怎麽用?C++ GET_MEMBER_NAME_CHECKED使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GET_MEMBER_NAME_CHECKED函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: GET_MEMBER_NAME_CHECKED
void UEnvQueryGenerator_OnCircle::PostEditChangeProperty( struct FPropertyChangedEvent& PropertyChangedEvent)
{
static const FName NAME_Angle = GET_MEMBER_NAME_CHECKED(UEnvQueryGenerator_OnCircle, Angle);
static const FName NAME_Radius = GET_MEMBER_NAME_CHECKED(UEnvQueryGenerator_OnCircle, Radius);
if (PropertyChangedEvent.Property != NULL)
{
const FName PropName = PropertyChangedEvent.MemberProperty->GetFName();
if (PropName == NAME_Angle)
{
Angle.Value = FMath::Clamp(Angle.Value, 0.0f, 360.f);
AngleRadians = FMath::DegreesToRadians(Angle.Value);
bDefineArc = Angle.Value < 360.f && Angle.Value > 0.f;
}
else if (PropName == NAME_Radius)
{
if (Radius.Value <= 0.f)
{
Radius.Value = 100.f;
}
}
ItemSpacing.Value = FMath::Max(1.0f, ItemSpacing.Value);
}
Super::PostEditChangeProperty(PropertyChangedEvent);
}
示例2: if
void AFlySkillActor::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
FName PropertyName = (PropertyChangedEvent.Property != nullptr) ? PropertyChangedEvent.Property->GetFName() : NAME_None;
if ((PropertyName == GET_MEMBER_NAME_CHECKED(AFlySkillActor, UseTargetLocation)))
{
if (UseTargetLocation)
{
UseTargetActor = false;
}
else
{
UseTargetActor = true;
}
}
else if ((PropertyName == GET_MEMBER_NAME_CHECKED(AFlySkillActor, UseTargetActor)))
{
if (UseTargetActor)
{
UseTargetLocation = false;
}
else
{
UseTargetLocation = true;
}
}
Super::PostEditChangeProperty(PropertyChangedEvent);
}
示例3: CustomizeChildren
void FCinematicOptionsCustomization::CustomizeChildren(TSharedRef<class IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
bPlayMatinee = StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FBTDialogueCinematicOptions, bPlayMatinee));
bLoop = StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FBTDialogueCinematicOptions, bLoop));
Matinee = StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FBTDialogueCinematicOptions, Matinee));
ChildBuilder.AddChildProperty(StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FBTDialogueCinematicOptions, bPlayMatinee)).ToSharedRef());
ChildBuilder.AddChildProperty(StructPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(FBTDialogueCinematicOptions, bLoop)).ToSharedRef());
ChildBuilder.AddChildContent(LOCTEXT("Matinee", "Matinee"))
.NameContent()
[
Matinee->CreatePropertyNameWidget()
]
.ValueContent()
.HAlign(HAlign_Fill)
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.MaxWidth(109.0f)
[
SNew(SComboButton)
.OnGetMenuContent(this, &FCinematicOptionsCustomization::OnGetMatineeList)
.ContentPadding(FMargin(2.0f, 2.0f))
.ButtonContent()
[
SNew(STextBlock)
.Text(this, &FCinematicOptionsCustomization::GetCurrentMatineeName)
.Font(IDetailLayoutBuilder::GetDetailFont())
]
]
];
}
示例4: ShowFoliagePropertiesForCategory
void FFoliageTypePaintingCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailLayoutBuilder)
{
// Hide categories we are not going to customize
FFoliageTypeCustomizationHelpers::HideFoliageCategory(DetailLayoutBuilder, "Procedural");
FFoliageTypeCustomizationHelpers::HideFoliageCategory(DetailLayoutBuilder, "Reapply");
// Show all the properties with a reapply condition or that depend on another variable to be relevant
TMap<const FName, IDetailPropertyRow*> PropertyRowsByName;
ShowFoliagePropertiesForCategory(DetailLayoutBuilder, "Painting", PropertyRowsByName);
ShowFoliagePropertiesForCategory(DetailLayoutBuilder, "Placement", PropertyRowsByName);
ShowFoliagePropertiesForCategory(DetailLayoutBuilder, "InstanceSettings", PropertyRowsByName);
// Density adjustment factor should only be visible when reapplying
FFoliageTypeCustomizationHelpers::ModifyFoliagePropertyRow(*PropertyRowsByName.Find(GET_MEMBER_NAME_CHECKED(UFoliageType, DensityAdjustmentFactor)),
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FFoliageTypePaintingCustomization::GetReapplyModeVisibility)),
TAttribute<bool>());
// Set the scale visibility attribute for each axis
Scaling = DetailLayoutBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(UFoliageType, Scaling));
ReapplyScaling = DetailLayoutBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(UFoliageType, ReapplyScaling));
FFoliageTypeCustomizationHelpers::ModifyFoliagePropertyRow(*PropertyRowsByName.Find(GET_MEMBER_NAME_CHECKED(UFoliageType, ScaleX)),
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FFoliageTypePaintingCustomization::GetScaleVisibility, EAxis::X)),
TAttribute<bool>());
FFoliageTypeCustomizationHelpers::ModifyFoliagePropertyRow(*PropertyRowsByName.Find(GET_MEMBER_NAME_CHECKED(UFoliageType, ScaleY)),
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FFoliageTypePaintingCustomization::GetScaleVisibility, EAxis::Y)),
TAttribute<bool>());
FFoliageTypeCustomizationHelpers::ModifyFoliagePropertyRow(*PropertyRowsByName.Find(GET_MEMBER_NAME_CHECKED(UFoliageType, ScaleZ)),
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FFoliageTypePaintingCustomization::GetScaleVisibility, EAxis::Z)),
TAttribute<bool>());
}
示例5: if
void UEnvQueryGenerator_OnCircle::PostEditChangeProperty( FPropertyChangedEvent& PropertyChangedEvent)
{
if (PropertyChangedEvent.Property != NULL)
{
const FName PropName = PropertyChangedEvent.MemberProperty->GetFName();
if (PropName == GET_MEMBER_NAME_CHECKED(UEnvQueryGenerator_OnCircle, ArcAngle))
{
ArcAngle.DefaultValue = FMath::Clamp(ArcAngle.DefaultValue, 0.0f, 360.f);
AngleRadians = FMath::DegreesToRadians(ArcAngle.DefaultValue);
bDefineArc = (ArcAngle.DefaultValue < 360.f) && (ArcAngle.DefaultValue > 0.f);
}
else if (PropName == GET_MEMBER_NAME_CHECKED(UEnvQueryGenerator_OnCircle, CircleRadius))
{
if (CircleRadius.DefaultValue <= 0.f)
{
CircleRadius.DefaultValue = 100.f;
}
}
else if (PropName == GET_MEMBER_NAME_CHECKED(UEnvQueryGenerator_OnCircle, SpaceBetween))
{
SpaceBetween.DefaultValue = FMath::Max(1.0f, SpaceBetween.DefaultValue);
}
}
Super::PostEditChangeProperty(PropertyChangedEvent);
}
示例6: GET_MEMBER_NAME_CHECKED
void FTileLODEntryDetailsCustomization::CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle,
class IDetailChildrenBuilder& ChildBuilder,
IPropertyTypeCustomizationUtils& StructCustomizationUtils )
{
LODIndexHandle = StructPropertyHandle->GetChildHandle(
GET_MEMBER_NAME_CHECKED(FTileLODEntryDetails, LODIndex)
);
TSharedPtr<IPropertyHandle> DistanceProperty = StructPropertyHandle->GetChildHandle(
GET_MEMBER_NAME_CHECKED(FTileLODEntryDetails, Distance)
);
TSharedPtr<IPropertyHandle> SimplificationDetails = StructPropertyHandle->GetChildHandle(
GET_MEMBER_NAME_CHECKED(FTileLODEntryDetails, SimplificationDetails)
);
ChildBuilder.AddChildProperty(LODIndexHandle.ToSharedRef())
.Visibility(EVisibility::Hidden);
ChildBuilder.AddChildProperty(DistanceProperty.ToSharedRef())
.IsEnabled(TAttribute<bool>::Create(TAttribute<bool>::FGetter::CreateSP(this, &FTileLODEntryDetailsCustomization::IsLODDistanceEnabled)));
ChildBuilder.AddChildProperty(SimplificationDetails.ToSharedRef())
.IsEnabled(TAttribute<bool>::Create(TAttribute<bool>::FGetter::CreateSP(this, &FTileLODEntryDetailsCustomization::IsGenerateTileEnabled)));
}
示例7: CustomizeDetails
void FDerivedCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailLayout)
{
// So now we're customizing UDerivedClass object
// First, try to hide an inherited property
{
// 'HideMe' property is defined in UBaseClass
TSharedPtr<IPropertyHandle> PropertyToHide = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UDerivedClass, HideMe));
PropertyToHide->MarkHiddenByCustomization();
}
{
// Now grab any struct property (or property that has customized property value widget)
// Note that this is property defined in UDerivedClass!
TSharedPtr<IPropertyHandle> TestProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UDerivedClass, Vector2dProperty));
// Hide this property
TestProperty->MarkHiddenByCustomization();
// Get a category so we can add a TestProperty back to the panel
IDetailCategoryBuilder& DerivedCategory = DetailLayout.EditCategory("Derived");
DerivedCategory.AddCustomRow(LOCTEXT("DerivedObjectLabel", "Derived"))
.NameContent()
[
TestProperty->CreatePropertyNameWidget()
]
.ValueContent()
[
// This will return NullWidget - thats the problem
TestProperty->CreatePropertyValueWidget()
];
}
}
示例8: UpdateSinglePropertyInConfigFile
void UIOSRuntimeSettings::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
// Ensure that at least one orientation is supported
if (!bSupportsPortraitOrientation && !bSupportsUpsideDownOrientation && !bSupportsLandscapeLeftOrientation && !bSupportsLandscapeRightOrientation)
{
bSupportsPortraitOrientation = true;
UpdateSinglePropertyInConfigFile(GetClass()->FindPropertyByName(GET_MEMBER_NAME_CHECKED(UIOSRuntimeSettings, bSupportsPortraitOrientation)), GetDefaultConfigFilename());
}
// Ensure that at least one API is supported
if (!bSupportsMetal && !bSupportsOpenGLES2 && !bSupportsMetalMRT)
{
bSupportsOpenGLES2 = true;
UpdateSinglePropertyInConfigFile(GetClass()->FindPropertyByName(GET_MEMBER_NAME_CHECKED(UIOSRuntimeSettings, bSupportsOpenGLES2)), GetDefaultConfigFilename());
}
// Ensure that at least armv7 is selected for shipping and dev
if (!bDevForArmV7 && !bDevForArm64 && !bDevForArmV7S)
{
bDevForArmV7 = true;
UpdateSinglePropertyInConfigFile(GetClass()->FindPropertyByName(GET_MEMBER_NAME_CHECKED(UIOSRuntimeSettings, bDevForArmV7)), GetDefaultConfigFilename());
}
if (!bShipForArmV7 && !bShipForArm64 && !bShipForArmV7S)
{
bShipForArmV7 = true;
UpdateSinglePropertyInConfigFile(GetClass()->FindPropertyByName(GET_MEMBER_NAME_CHECKED(UIOSRuntimeSettings, bShipForArmV7)), GetDefaultConfigFilename());
}
}
示例9: Transaction
void FAxisMappingsNodeBuilder::OnAxisMappingNameCommitted(const FText& InName, ETextCommit::Type CommitInfo, const FMappingSet MappingSet)
{
const FScopedTransaction Transaction(LOCTEXT("RenameAxisMapping_Transaction", "Rename Axis Mapping"));
FName NewName = FName(*InName.ToString());
FName CurrentName = NewName;
if (MappingSet.Mappings.Num() > 0)
{
MappingSet.Mappings[0]->GetChildHandle(GET_MEMBER_NAME_CHECKED(FInputAxisKeyMapping, AxisName))->GetValue(CurrentName);
}
if (NewName != CurrentName)
{
for (int32 Index = 0; Index < MappingSet.Mappings.Num(); ++Index)
{
MappingSet.Mappings[Index]->GetChildHandle(GET_MEMBER_NAME_CHECKED(FInputAxisKeyMapping, AxisName))->SetValue(NewName);
}
if (MappingSet.DetailGroup)
{
RenamedGroupExpansionState.Key = NewName;
RenamedGroupExpansionState.Value = MappingSet.DetailGroup->GetExpansionState();
// Don't want to save expansion state of old name
MappingSet.DetailGroup->ToggleExpansion(false);
}
}
}
示例10: CustomizeChildren
void FCameraLensSettingsCustomization::CustomizeChildren(TSharedRef<IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
// Retrieve structure's child properties
uint32 NumChildren;
StructPropertyHandle->GetNumChildren(NumChildren);
TMap<FName, TSharedPtr< IPropertyHandle > > PropertyHandles;
for (uint32 ChildIndex = 0; ChildIndex < NumChildren; ++ChildIndex)
{
TSharedRef<IPropertyHandle> ChildHandle = StructPropertyHandle->GetChildHandle(ChildIndex).ToSharedRef();
const FName PropertyName = ChildHandle->GetProperty()->GetFName();
PropertyHandles.Add(PropertyName, ChildHandle);
}
// Retrieve special case properties
MinFocalLengthHandle = PropertyHandles.FindChecked(GET_MEMBER_NAME_CHECKED(FCameraLensSettings, MinFocalLength));
MaxFocalLengthHandle = PropertyHandles.FindChecked(GET_MEMBER_NAME_CHECKED(FCameraLensSettings, MaxFocalLength));
MinFStopHandle = PropertyHandles.FindChecked(GET_MEMBER_NAME_CHECKED(FCameraLensSettings, MinFStop));
MaxFStopHandle = PropertyHandles.FindChecked(GET_MEMBER_NAME_CHECKED(FCameraLensSettings, MaxFStop));
MinFocusDistanceHandle = PropertyHandles.FindChecked(GET_MEMBER_NAME_CHECKED(FCameraLensSettings, MinimumFocusDistance));
for (auto Iter(PropertyHandles.CreateConstIterator()); Iter; ++Iter)
{
if (Iter.Value() == MinFocusDistanceHandle)
{
// skip showing these in the panel for now, as we don't really use them
continue;
}
IDetailPropertyRow& SettingsRow = ChildBuilder.AddChildProperty(Iter.Value().ToSharedRef());
}
}
示例11: FixMapAssetRef
void UGameMapsSettings::PostReloadConfig( UProperty* PropertyThatWasLoaded )
{
if (PropertyThatWasLoaded)
{
if (PropertyThatWasLoaded->GetFName() == GET_MEMBER_NAME_CHECKED(UGameMapsSettings, EditorStartupMap))
{
FixMapAssetRef(EditorStartupMap);
}
else if (PropertyThatWasLoaded->GetFName() == GET_MEMBER_NAME_CHECKED(UGameMapsSettings, GameDefaultMap))
{
FixMapAssetRef(GameDefaultMap);
}
else if (PropertyThatWasLoaded->GetFName() == GET_MEMBER_NAME_CHECKED(UGameMapsSettings, ServerDefaultMap))
{
FixMapAssetRef(ServerDefaultMap);
}
else if (PropertyThatWasLoaded->GetFName() == GET_MEMBER_NAME_CHECKED(UGameMapsSettings, TransitionMap))
{
FixMapAssetRef(TransitionMap);
}
}
else
{
FixMapAssetRef(EditorStartupMap);
FixMapAssetRef(GameDefaultMap);
FixMapAssetRef(ServerDefaultMap);
FixMapAssetRef(TransitionMap);
}
}
示例12: GetWorld
void AAudioVolume::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
Super::PostEditChangeProperty(PropertyChangedEvent);
Settings.Volume = FMath::Clamp<float>( Settings.Volume, 0.0f, 1.0f );
AmbientZoneSettings.InteriorTime = FMath::Max<float>( 0.01f, AmbientZoneSettings.InteriorTime );
AmbientZoneSettings.InteriorLPFTime = FMath::Max<float>( 0.01f, AmbientZoneSettings.InteriorLPFTime );
AmbientZoneSettings.ExteriorTime = FMath::Max<float>( 0.01f, AmbientZoneSettings.ExteriorTime );
AmbientZoneSettings.ExteriorLPFTime = FMath::Max<float>( 0.01f, AmbientZoneSettings.ExteriorLPFTime );
if (PropertyChangedEvent.Property && PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(AAudioVolume, Priority))
{
GetWorld()->AudioVolumes.Sort([](const AAudioVolume& A, const AAudioVolume& B) { return (A.GetPriority() > B.GetPriority()); });
}
if (PropertyChangedEvent.Property && PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(AAudioVolume, bEnabled))
{
if (bEnabled)
{
AddProxy();
}
else
{
RemoveProxy();
}
}
else if (bEnabled)
{
UpdateProxy();
}
}
示例13: Update
void ADynamicWeather::PostEditChangeProperty(FPropertyChangedEvent &Event)
{
Super::PostEditChangeProperty(Event);
const FName PropertyName = (Event.Property != NULL ? Event.Property->GetFName() : NAME_None);
if (PropertyName == GET_MEMBER_NAME_CHECKED(ADynamicWeather, Weather)) {
Update();
} else if ((PropertyName == GET_MEMBER_NAME_CHECKED(ADynamicWeather, bSaveToConfigFile)) ||
(PropertyName == GET_MEMBER_NAME_CHECKED(ADynamicWeather, bLoadFromConfigFile))) {
// Do nothing.
} else {
AdjustSunPositionBasedOnActorRotation();
}
if (bSaveToConfigFile) {
bSaveToConfigFile = false;
if (SaveToConfigFile()) {
UE_LOG(LogCarla, Log, TEXT("Weather \"%s\" saved to config file"), *Weather.Name);
} else {
UE_LOG(LogCarla, Error, TEXT("Error saving weather to config file"));
}
}
if (bLoadFromConfigFile) {
bLoadFromConfigFile = false;
if (LoadFromConfigFile()) {
UE_LOG(LogCarla, Log, TEXT("Weather \"%s\" loaded from config file"), *Weather.Name);
Update();
} else {
UE_LOG(LogCarla, Error, TEXT("Error loading weather from config file"));
}
}
}
示例14: PropertyName
void USplineComponent::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
if (PropertyChangedEvent.Property != nullptr)
{
const FName PropertyName(PropertyChangedEvent.Property->GetFName());
if (PropertyName == GET_MEMBER_NAME_CHECKED(USplineComponent, ReparamStepsPerSegment) ||
PropertyName == GET_MEMBER_NAME_CHECKED(USplineComponent, bStationaryEndpoints))
{
UpdateSpline();
}
if (PropertyName == GET_MEMBER_NAME_CHECKED(USplineComponent, bClosedLoop))
{
if (bClosedLoop)
{
// Spline is guaranteed to be non-looping when we get here (due to PreEditChange).
// Now just force the loop endpoint to be added if bClosedLoop == true.
AddLoopEndpoint();
}
UpdateSpline();
}
}
Super::PostEditChangeProperty(PropertyChangedEvent);
}
示例15: CreateTextureNameWidget
void FSpriteDetailsCustomization::BuildTextureSection(IDetailCategoryBuilder& SpriteCategory, IDetailLayoutBuilder& DetailLayout)
{
// Grab information about the material
TSharedPtr<IPropertyHandle> DefaultMaterialProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UPaperSprite, DefaultMaterial));
FText SourceTextureOverrideLabel;
if (DefaultMaterialProperty.IsValid())
{
UObject* DefaultMaterialAsObject;
if (DefaultMaterialProperty->GetValue(/*out*/ DefaultMaterialAsObject) == FPropertyAccess::Success)
{
if (UMaterialInterface* DefaultMaterialInterface = Cast<UMaterialInterface>(DefaultMaterialAsObject))
{
if (UMaterial* DefaultMaterial = DefaultMaterialInterface->GetMaterial())
{
// Get a list of sprite samplers
TArray<const UMaterialExpressionSpriteTextureSampler*> SpriteSamplerExpressions;
DefaultMaterial->GetAllExpressionsOfType(/*inout*/ SpriteSamplerExpressions);
// Turn that into a set of labels
for (const UMaterialExpressionSpriteTextureSampler* Sampler : SpriteSamplerExpressions)
{
if (!Sampler->SlotDisplayName.IsEmpty())
{
if (Sampler->bSampleAdditionalTextures)
{
AdditionalTextureLabels.FindOrAdd(Sampler->AdditionalSlotIndex) = Sampler->SlotDisplayName;
}
else
{
SourceTextureOverrideLabel = Sampler->SlotDisplayName;
}
}
}
}
}
}
}
// Create the base texture widget
TSharedPtr<IPropertyHandle> SourceTextureProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UPaperSprite, SourceTexture));
DetailLayout.HideProperty(SourceTextureProperty);
SpriteCategory.AddCustomRow(SourceTextureProperty->GetPropertyDisplayName())
.NameContent()
[
CreateTextureNameWidget(SourceTextureProperty, SourceTextureOverrideLabel)
]
.ValueContent()
.MaxDesiredWidth(TOptional<float>())
[
SourceTextureProperty->CreatePropertyValueWidget()
];
// Create the additional textures widget
TSharedPtr<IPropertyHandle> AdditionalSourceTexturesProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UPaperSprite, AdditionalSourceTextures));
TSharedRef<FDetailArrayBuilder> AdditionalSourceTexturesBuilder = MakeShareable(new FDetailArrayBuilder(AdditionalSourceTexturesProperty.ToSharedRef()));
AdditionalSourceTexturesBuilder->OnGenerateArrayElementWidget(FOnGenerateArrayElementWidget::CreateSP(this, &FSpriteDetailsCustomization::GenerateAdditionalTextureWidget));
SpriteCategory.AddCustomBuilder(AdditionalSourceTexturesBuilder);
}