Greetings, I get the error from the title even though I got the UI?
I am pretty new so I got no idea what I have done wrong. This code below gets executed whenever a button I selected gets clicked.
The code should get the UI, check the visibility of the overlay and collapse/make it visible depending on its current status. Please help!
PrimaryShopButtonUI(Wdata:widget_message):void=
Print("Opening PrimaryShopUI 2")
if(Player:=Wdata.Player, PlayerUI:=GetPlayerUI[Player], SelectedButton:=Wdata.Source):
if(Widgets:=MaybeMyUIPerPlayer[Player]?):
if(Widgets.PrimaryOverlay.GetVisibility(widget_visibility.Collapsed)):
Widgets.UnselectedOverlay.SetVisibility(widget_visibility.Collapsed)
Widgets.PrimaryOverlay.GetVisibility(widget_visibility.Visible)
else:
Widgets.UnselectedOverlay.SetVisibility(widget_visibility.Visible)
Widgets.PrimaryOverlay.GetVisibility(widget_visibility.Collapsed)