Okay, I started getting more complex with it and now I've hit a situation where I don't know how to customize the Response Button any further.
Essentially, when I'm setting up the button, I also want to store a reference to a script that controls other elements on the button (see the image for example). Like while I do things in the game, I want to update the number on the response button.
The problem I'm hitting is that there's no reference to the GameObject inside of SetResponseButtons(), so I don't know how to access the button template itself to get the reference.
Any advice? It can be something dirty for now because I'm prototyping. I've been hesitant to crack open the Response script and add a direct reference to what I want inside there, but if you think that's the way to go, then I'll do that.
Attachments
2022-10-05 23_52_09-Twilight Tower - Figma.png (11.71 KiB) Viewed 316 times
Make a subclass of StandardUIResponseButton with UI element(s)s for the [#/#] text. Use this on your response buttons instead of the original StandardUIResponseButton.
Then override StandardUIMenuPanel.SetResponseButton(), which is the method that sets up a single response button, to set those extra UI element(s).
Aha! That set me on the right track. I had another component trying to do something close to the same thing, but didn't think to make it inherit from StandardUIResponseButton instead. Thanks!