diff --git a/Content/Examples/UINavInventoryMenu.uasset b/Content/Examples/UINavInventoryMenu.uasset index 847864f4..f09f3563 100644 Binary files a/Content/Examples/UINavInventoryMenu.uasset and b/Content/Examples/UINavInventoryMenu.uasset differ diff --git a/Source/UINavigation/Private/UINavSliderBox.cpp b/Source/UINavigation/Private/UINavSliderBox.cpp index bfa2f021..76a2a1bc 100644 --- a/Source/UINavigation/Private/UINavSliderBox.cpp +++ b/Source/UINavigation/Private/UINavSliderBox.cpp @@ -34,8 +34,9 @@ void UUINavSliderBox::Update() { OptionIndex = Difference; } - - NavText->SetText(FText::FromString(FString::FromInt(MinRange + OptionIndex*Interval))); + + if (NavText != nullptr) + NavText->SetText(FText::FromString(FString::FromInt(MinRange + OptionIndex*Interval))); float Percent = UKismetMathLibrary::NormalizeToRange(MinRange + OptionIndex * Interval, MinRange, MaxRange); SliderBar->SetPercent(Percent); diff --git a/Source/UINavigation/Private/UINavWidget.cpp b/Source/UINavigation/Private/UINavWidget.cpp index ea016c75..fd2d4921 100644 --- a/Source/UINavigation/Private/UINavWidget.cpp +++ b/Source/UINavigation/Private/UINavWidget.cpp @@ -1018,7 +1018,7 @@ void UUINavWidget::AppendNavigationGrid2D(int DimensionX, int DimensionY, FButto return; } - if (NumberOfButtonsInGrids + (DimensionX * DimensionY) > UINavButtons.Num()) + if (NumberOfButtonsInGrids + (ButtonsInGrid == -1 ? (DimensionX * DimensionY) : ButtonsInGrid) > UINavButtons.Num()) { DISPLAYERROR("Not enough UINavButtons to append this navigation grid!"); return; @@ -1160,20 +1160,12 @@ void UUINavWidget::SwitchTextColorTo(int Index, FLinearColor Color) if (NewComponentIndex != -1) { NewText = UINavComponents[NewComponentIndex]->NavText; - if (NewText == nullptr) - { - DISPLAYERROR("When UseTextColor is true, UINavComponent should have a valid TextBlock called NavText."); - return; - } + if (NewText == nullptr) return; } else { NewText = Cast(UINavButtons[Index]->GetChildAt(0)); - if (NewText == nullptr) - { - DISPLAYERROR("When UseTextColor is true, UINavButton should have a TextBlock as its child."); - return; - } + if (NewText == nullptr) return; } NewText->SetColorAndOpacity(Color); } diff --git a/Source/UINavigation/Public/UINavWidget.h b/Source/UINavigation/Public/UINavWidget.h index 5fc24684..224436ca 100644 --- a/Source/UINavigation/Public/UINavWidget.h +++ b/Source/UINavigation/Public/UINavWidget.h @@ -90,7 +90,8 @@ class UINAVIGATION_API UUINavWidget : public UUserWidget public: - bool bWaitForInput = false; + UPROPERTY(BlueprintReadOnly, Category = UINavWidget) + bool bWaitForInput = false; EReceiveInputType ReceiveInputType = EReceiveInputType::None; diff --git a/UINavigation.uplugin b/UINavigation.uplugin index 0386587f..7e042688 100644 --- a/UINavigation.uplugin +++ b/UINavigation.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, "Version": 1, - "VersionName": "2.6.0", + "VersionName": "2.6.1", "FriendlyName": "UI Navigation", "Description": "A plugin that allows you to easily setup mouse, keyboard and controller navigation in UMG, among other things.", "Category": "Plugins",