Fix warnings in UE 5.1

This commit is contained in:
Steve Streeting 2023-01-09 11:59:32 +00:00
parent 13627265c9
commit cc6eea4862

View File

@ -6,11 +6,11 @@ TSharedRef<SWidget> UFocusableCheckBox::RebuildWidget()
{ {
MyCheckbox = SNew(SFocusableCheckBox) MyCheckbox = SNew(SFocusableCheckBox)
.OnCheckStateChanged( BIND_UOBJECT_DELEGATE(FOnCheckStateChanged, SlateOnCheckStateChangedCallback) ) .OnCheckStateChanged( BIND_UOBJECT_DELEGATE(FOnCheckStateChanged, SlateOnCheckStateChangedCallback) )
.Style(&WidgetStyle) .Style(&GetWidgetStyle())
.HAlign( HorizontalAlignment ) .HAlign( HorizontalAlignment )
.ClickMethod(ClickMethod) .ClickMethod(GetClickMethod())
.TouchMethod(TouchMethod) .TouchMethod(GetTouchMethod())
.PressMethod(PressMethod) .PressMethod(GetPressMethod())
.IsFocusable(IsFocusable) .IsFocusable(IsFocusable)
// Our new events // Our new events
.OnHovered(BIND_UOBJECT_DELEGATE(FSimpleDelegate, SlateHandleHovered)) .OnHovered(BIND_UOBJECT_DELEGATE(FSimpleDelegate, SlateHandleHovered))
@ -34,7 +34,7 @@ TSharedRef<SWidget> UFocusableCheckBox::RebuildWidget()
void UFocusableCheckBox::RefreshFocussedStyle_Implementation() void UFocusableCheckBox::RefreshFocussedStyle_Implementation()
{ {
// Copy Widget style but make normal same as hovered // Copy Widget style but make normal same as hovered
FocussedStyle = WidgetStyle; FocussedStyle = GetWidgetStyle();
FocussedStyle.UncheckedImage = FocussedStyle.UncheckedHoveredImage; FocussedStyle.UncheckedImage = FocussedStyle.UncheckedHoveredImage;
FocussedStyle.CheckedImage = FocussedStyle.CheckedHoveredImage; FocussedStyle.CheckedImage = FocussedStyle.CheckedHoveredImage;
FocussedStyle.UndeterminedImage = FocussedStyle.UndeterminedHoveredImage; FocussedStyle.UndeterminedImage = FocussedStyle.UndeterminedHoveredImage;
@ -65,7 +65,7 @@ void UFocusableCheckBox::UndoFocusStyle()
{ {
if (MyCheckbox.IsValid()) if (MyCheckbox.IsValid())
{ {
MyCheckbox->SetStyle(&WidgetStyle); MyCheckbox->SetStyle(&GetWidgetStyle());
} }
} }