Toggleable Touch Button To Talk

How Would I make a toggleable button for this? I made this so I have the code like this already in unreal engine: Touch button widget to talk - #10 by K3

But Its hold and release and on a touchscreen using windows its the rightclick button. And since im using pixelstreaming for High quality compact design, I need to use in in an internet browser. And so same problem when holding you rightclick in the browser, no matter what.

So I need something like toggle on and toggle off with just one click.

Multiple buttons are possible or maybe something like a flipflopswitch. How would I do This?

Hello @Pim_Puts,

What you’re describing falls more under general Unreal Engine programming rather than a Convai-specific issue. That said, here’s a quick outline of how you can achieve a toggle-based talk button using Blueprints:

  1. Use OnClicked instead of OnPressed and OnReleased in your widget’s Button event.
  2. Create a Boolean variable, e.g., IsListening.
  3. In the OnClicked event, add a Branch node and check IsListening:
    • If False, call the Start Talking function and set IsListening to True.
    • If True, call the Stop Talking function and set IsListening to False.

This creates a simple toggle mechanism with a single button click. While we’re happy to help guide you, for deeper customization or more complex input handling, checking general Unreal Engine forums or tutorials might be more effective.