Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
C# PauseMenu: check if textures are available before setting the back…
…grounds.
  • Loading branch information
manups4e committed Aug 4, 2023
1 parent 039fb22 commit ce7af8d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ScaleformUI_Csharp/Menus/Pause Menus/PauseMenu/TabView.cs
Expand Up @@ -205,7 +205,8 @@ public async void BuildPauseMenu()
_pause.AddRightTitle(tabIndex, 0, simpleTab.TextTitle);
foreach (BasicTabItem it in simpleTab.LabelsList)
_pause.AddRightListLabel(tabIndex, 0, it.Label, it.LabelFont.FontName, it.LabelFont.FontID);
_pause._pause.CallFunction("UPDATE_BASE_TAB_BACKGROUND", tabIndex, simpleTab.TextureDict, simpleTab.TextureName);
if (!(string.IsNullOrWhiteSpace(simpleTab.TextureDict) && string.IsNullOrWhiteSpace(simpleTab.TextureName)))
_pause._pause.CallFunction("UPDATE_BASE_TAB_BACKGROUND", tabIndex, simpleTab.TextureDict, simpleTab.TextureName);
}
break;
case SubmenuTab:
Expand Down Expand Up @@ -300,7 +301,8 @@ public async void BuildPauseMenu()

if (item.ItemType == LeftItemType.Info || item.ItemType == LeftItemType.Statistics || item.ItemType == LeftItemType.Settings)
{
_pause._pause.CallFunction("UPDATE_LEFT_ITEM_RIGHT_BACKGROUND", tabIndex, itemIndex, item.TextureDict, item.TextureName, (int)item.LeftItemBGType);
if (!(string.IsNullOrWhiteSpace(item.TextureDict) && string.IsNullOrWhiteSpace(item.TextureName)))
_pause._pause.CallFunction("UPDATE_LEFT_ITEM_RIGHT_BACKGROUND", tabIndex, itemIndex, item.TextureDict, item.TextureName, (int)item.LeftItemBGType);
}

}
Expand Down

0 comments on commit ce7af8d

Please sign in to comment.