Skip to content

Commit

Permalink
Merge branch '4.22'
Browse files Browse the repository at this point in the history
  • Loading branch information
goncasmage1 committed Jul 16, 2019
2 parents fc811f9 + d4eea4d commit 8e432b1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 15 deletions.
Binary file modified Content/Examples/UINavInventoryMenu.uasset
Binary file not shown.
5 changes: 3 additions & 2 deletions Source/UINavigation/Private/UINavSliderBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
14 changes: 3 additions & 11 deletions Source/UINavigation/Private/UINavWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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<UTextBlock>(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);
}
Expand Down
3 changes: 2 additions & 1 deletion Source/UINavigation/Public/UINavWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion UINavigation.uplugin
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 8e432b1

Please sign in to comment.