Space Plunder
Loading...
Searching...
No Matches
UWheelSegment Class Reference

#include <WheelSegment.h>

Inheritance diagram for UWheelSegment:

Public Member Functions

void SetSegmentData (const FRadialSegmentData &Data)
 
FRadialSegmentData GetSegmentData () const
 
void SetShowDescription (const bool bValue)
 
void SetSelected (const bool bValue)
 
void SetIndex (const int32 Value)
 

Protected Member Functions

virtual bool Initialize () override
 
virtual void NativePreConstruct () override
 
virtual void NativeConstruct () override
 
void OnSelected (const bool bValue)
 
void OnDataSet (const FRadialSegmentData &Data, const bool bDescription)
 

Protected Attributes

class UOverlay * Overlay = nullptr
 
class UImage * Image = nullptr
 
class UTextBlock * TitleTextBlock = nullptr
 
class UTextBlock * DescriptionTextBlock = nullptr
 
class UOverlay * DescriptionOverlay = nullptr
 
int32 Index = -1
 
bool bSelected = false
 
bool bShowDescription = false
 

Private Attributes

FRadialSegmentData SegmentData
 

Member Function Documentation

◆ GetSegmentData()

FRadialSegmentData UWheelSegment::GetSegmentData ( ) const
inline
21{return SegmentData;};
FRadialSegmentData SegmentData
Definition WheelSegment.h:58

◆ Initialize()

bool UWheelSegment::Initialize ( )
overrideprotectedvirtual
12{
13 const bool Success = Super::Initialize();
14 if(!Success) return false;
15 if (!ensure(Overlay != nullptr)) return false;
16 if (!ensure(Image != nullptr)) return false;
17 if (!ensure(DescriptionOverlay != nullptr)) return false;
18 if (!ensure(TitleTextBlock != nullptr)) return false;
19 if (!ensure(DescriptionTextBlock != nullptr)) return false;
20 return true;
21}
class UOverlay * Overlay
Definition WheelSegment.h:39
class UTextBlock * DescriptionTextBlock
Definition WheelSegment.h:45
class UImage * Image
Definition WheelSegment.h:41
class UOverlay * DescriptionOverlay
Definition WheelSegment.h:48
class UTextBlock * TitleTextBlock
Definition WheelSegment.h:43

◆ NativeConstruct()

void UWheelSegment::NativeConstruct ( )
overrideprotectedvirtual
29{
30 Super::NativeConstruct();
31}

◆ NativePreConstruct()

void UWheelSegment::NativePreConstruct ( )
overrideprotectedvirtual
24{
25 Super::NativePreConstruct();
26}

◆ OnDataSet()

void UWheelSegment::OnDataSet ( const FRadialSegmentData & Data,
const bool bDescription )
protected

◆ OnSelected()

void UWheelSegment::OnSelected ( const bool bValue)
protected

◆ SetIndex()

void UWheelSegment::SetIndex ( const int32 Value)
inline
25{Index = Value;};
int32 Index
Definition WheelSegment.h:51

◆ SetSegmentData()

void UWheelSegment::SetSegmentData ( const FRadialSegmentData & Data)
35{
36 SegmentData = Data;
37 if(SegmentData.Icon != nullptr)
38 {
39 Image->SetBrushFromTexture(SegmentData.Icon);
40 }
41 if(TitleTextBlock != nullptr)
42 {
43 TitleTextBlock->SetText(FText::FromString(Data.Name));
44 }
45 if(DescriptionTextBlock != nullptr)
46 {
47 DescriptionTextBlock->SetText(FText::FromString(Data.Description));
48 }
50}
void OnDataSet(const FRadialSegmentData &Data, const bool bDescription)
bool bShowDescription
Definition WheelSegment.h:55
UTexture2D * Icon
Definition RadialWheelData.h:82
FString Description
Definition RadialWheelData.h:80
FString Name
Definition RadialWheelData.h:78

◆ SetSelected()

void UWheelSegment::SetSelected ( const bool bValue)
65{
66 bSelected = bValue;
68}
bool bSelected
Definition WheelSegment.h:53
void OnSelected(const bool bValue)

◆ SetShowDescription()

void UWheelSegment::SetShowDescription ( const bool bValue)
53{
54 bShowDescription = bValue;
55 if(DescriptionOverlay == nullptr){return;}
57 {
58 DescriptionOverlay->SetVisibility(ESlateVisibility::Visible);
59 return;
60 }
61 DescriptionOverlay->SetVisibility(ESlateVisibility::Collapsed);
62}

Member Data Documentation

◆ bSelected

bool UWheelSegment::bSelected = false
protected

◆ bShowDescription

bool UWheelSegment::bShowDescription = false
protected

◆ DescriptionOverlay

class UOverlay* UWheelSegment::DescriptionOverlay = nullptr
protected

◆ DescriptionTextBlock

class UTextBlock* UWheelSegment::DescriptionTextBlock = nullptr
protected

◆ Image

class UImage* UWheelSegment::Image = nullptr
protected

◆ Index

int32 UWheelSegment::Index = -1
protected

◆ Overlay

class UOverlay* UWheelSegment::Overlay = nullptr
protected

◆ SegmentData

FRadialSegmentData UWheelSegment::SegmentData
private

◆ TitleTextBlock

class UTextBlock* UWheelSegment::TitleTextBlock = nullptr
protected

The documentation for this class was generated from the following files: