How do I switch spotlight colour on UI Button clicked event?

Awesome. Look forward to speaking to you tomorrow. :slight_smile:

Hi again, so i went through your comments in my ue4 project and although it works to the extent of a new widget button for each actor. Is there a way to bind the new widget button to each button in my original widget?

Is there a way to bind the new widget
button to each button in my original
widget?

Not following. Bind a widget button to another widget button? Do you need 1 actor to have more than 1 button?


What I suggested completely replaces creating buttons manually. The result of the suggested implementation is a scroll box populated with as many buttons as there are actors. And that’s without ever adding a single widget to the scrollbox manually.

Do note that what I called a wFancyButton has a Button already (and 2 borders + text to mimic your original button hierarchy.


In short. Grab world actors and show their widgets in the scroll box. Since those widgets are already aware who their actors are, there’s no need for any additional binding.

The scrollbox is a host for other actors’ widgets. It does not have anything else. It is empty to start with and populated dynamically only.

To the right on the widget is a top
down view map of the world. I wanted
to know if i could bind the new
spotlight buttons to the original
buttons on this widget?

You can but this would be quite difficult, awkward, inefficient, would require setting up an ID system of sorts (or tags) since there’s no order to the world actors, prone to errors and cumbersome to maintain.

My aim was to press each text button
‘Queen Movie’ and have the spotlights
displayed on the map.

What I suggested sounds spot on for this. Is this supposed to be an in-widget minimap of sorts?


I am under the impression you’re holding on to the buttons you have rather than trying the method I suggested. Do correct me if I’m wrong.

Precisely.

Can you show how and what you’re searching for? You’re matching text or?

Okay. So, Below is an image of my widget. It has a Search bar, scroll box, text and buttons. Each button is on each text e.g ‘Queen Movie’. To the right on the widget is a top down view map of the world. I wanted to know if i could bind the new spotlight buttons to the original buttons on this widget?

My aim was to press each text button ‘Queen Movie’ and have the spotlights displayed on the map. I know you can bind text to a text box, but is it possible to bind a button to another button?

ah. I see. So delete the buttons and text i have in this widget and the buttons for each actor can be displayed instead of the text shown above?

Yeah I was, but now i’ve swapped the generated buttons with the current ones on my widget and they display and are clickable. BUT… my next problem is when i search a item (actor) in the world the buttons disappear.
Also yes that is a in-game mini map version on the widget.

via GIPHY

Yeah it is.

Thinking about changing it to a camera.

I had another thought. If these spotlights aren’t linked to specific actors and are just put into the world. I know that you can make each spotlight a target. Is there a way to have each original button linked to targeting a spotlight in the world? ← as this could be an easier way of having my original content on the widget.

Btw, the minimap thing is a render target, right?

I meant a screenshot of the script. You’re searching for something and are not getting filtered results, is that correct?

Actually, how about the spotlight in the base actors have a reference value. Which mean when n the widget graph. Can I target that spotlight by getting the reference and just have it connected to a ‘On Clicked’ event?

I’m searching for something but the easiest way of getting a group or results was typing just the first word.

link text

This is a link to a paste bin of the UI Blueprint. It works with just searching one word. But the problem of it not working with the newely generated buttons are that once you search for something. The scrollbox overlaps the buttons that are been displayed on the screen.

Right now this project i’m working on is just a prototype. I don’t really need 60 buttons. It’s more of a Proof of concept. So, would this clunky method work if it was just 3 buttons for a group of targeted spotlights?
Maybe even 3 buttons and 3 targeted spotlights?

yeah that would be great