Hi,
I’m trying to use the widget_message struct but its not working like it does in the tutorial. When I try to print the Message.Source like in the tutorial, its blank. My code is below and tutorial code is below that.
HandleSelectedUIButtonExit(Message: widget_message) : void =
if (PlayerUI := GetPlayerUI[Message.Player], MyUI := MaybeMyUIPerPlayer[Message.Player]?, SelectedButton := text_button_base[Message.Source]):
Print("Player selected {SelectedButton.GetText()}")
PlayerUI.RemoveWidget(MyUI)
if (set MaybeMyUIPerPlayer[Message.Player] = false) {}
HandleSelectedUIButton(Message : widget_message) : void =
if (PlayerUI := GetPlayerUI[Message.Player], MyUI := MaybeMyUIPerPlayer[Message.Player]?, SelectedButton := text_button_base[Message.Source]):
Print("Player selected {SelectedButton.GetText()}")
PlayerUI.RemoveWidget(MyUI)
if (set MaybeMyUIPerPlayer[Message.Player] = false) {}
But when I press the button in game, its blank( image below).
The tutorial shows this.
I’m using a signal_remote_device to initiate the widget but I wouldn’t think that difference is causing this.