Files
BallisticsDocs/Source/EasyBallisticsEditor/Private/EBPlayerWeaponControllerCustomization.cpp
T
2025-07-10 01:02:24 -07:00

36 lines
1.3 KiB
C++

// Copyright 2016 Mookie. All Rights Reserved.
#include "EBPlayerWeaponControllerCustomization.h"
#include "DetailLayoutBuilder.h"
#include "DetailCategoryBuilder.h"
#include "DetailWidgetRow.h"
#include "IDetailPropertyRow.h"
#include "Widgets/Text/STextBlock.h"
#include "EBPlayerWeaponController.h"
#define LOCTEXT_NAMESPACE "EBPlayerWeaponControllerCustomization"
TSharedRef<IDetailCustomization> FEBPlayerWeaponControllerCustomization::MakeInstance()
{
return MakeShareable(new FEBPlayerWeaponControllerCustomization);
}
void FEBPlayerWeaponControllerCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
{
// Since the weapon controller is now a scene component, we don't need complex attachment customization
// The component can be positioned directly in the viewport
// Add a help text to guide users
IDetailCategoryBuilder& WeaponSpawnCategory = DetailBuilder.EditCategory("Weapon Spawn");
WeaponSpawnCategory.AddCustomRow(LOCTEXT("PositioningHelp", "Positioning Help"))
.WholeRowContent()
[
SNew(STextBlock)
.Text(LOCTEXT("PositioningHelpText", "Position this component in the viewport where you want weapons to appear. You can attach it to bones/sockets for animation."))
.Font(IDetailLayoutBuilder::GetDetailFont())
.AutoWrapText(true)
];
}
#undef LOCTEXT_NAMESPACE