I would like to have an option in the button device where the default text is invisible, even if I leave the text field blank it still appears. I understand that it makes it easier to implement accessibility, but there are other ways to represent an interaction besides a giant text on the screen.
This is an option in the HUD Controller Device
can you give me an example of how i can do this using verse? I spent a lot of time looking for it but I didn’t find it.
I want the default text of the button to be invisible when the game starts, but I only found how to make the interface disappear when I click on the button.
I found this in the documentation but I still don’t know how to use it
text_button_base class | Epic Developer Community (epicgames.com)
using { /Fortnite.com/Devices }
using { /Verse.org/Simulation }
using { /UnrealEngine.com/Temporary/Diagnostics }
# A Verse-authored creative device that can be placed in a level
player_start_music_device := class(creative_device):
@editable
RadioDevice: radio_device = radio_device {}
@editable
Button_01:button_device= button_device {}
var is_button_01_interacted:logic = false
PressButton01(Agent:agent):void=
set is_button_01_interacted = true
Button_01.Disable()
if (is_button_01_interacted?):
RadioDevice.Play()
else:
RadioDevice.Stop()
# Runs when the device is started in a running game
OnBegin<override>()<suspends>:void=
RadioDevice.Stop()
Button_01.InteractedWithEvent.Subscribe(PressButton01)