refact
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
// 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
|
||||
Reference in New Issue
Block a user