Page 1 of 1
Super Text Mesh Support in Standard UI?
Posted: Tue Dec 17, 2019 2:43 pm
by digiwombat
I was digging through the code a bit to see how I could get SuperTextMesh working outside of the already supplied support, or to get it to work more generically with Dialogue System at large.
Essentially, I want to be able to consider any given Super Text Mesh a TextField for purposes of using them in the Quest Log UI and in the Alert box (which is set through a StandardDialogueUI which points at StandardUIAlertControls and so is a bit harder to extract out for the simple purpose of pointing it at STM).
I guess would it be possible to get STM added to the UITextField in mainline or should I maintain it externally? If yes, is there a clean way to override/extend UITextField so that I don't have to be wary of updating Dialogue System? If it's a deeper problem than I saw looking through the code, where should I start at extending support to those other textfields?
Sorry for all the questions lately and thanks in advance for any help on this one.
Re: Super Text Mesh Support in Standard UI?
Posted: Tue Dec 17, 2019 3:37 pm
by Tony Li
Hi,
I'll look into adding conditional code in UITextField for Super Text Mesh, the same way that it already has conditional code for TextMesh Pro.
In the meantime, for alerts you can simply create a small subclass of StandardUIAlertControls for STM the same way that the integration package defines subclasses of StandardUISubtitlePanel and StandardUIMenuPanel.
The quest log window is a little more complicated. You could make a subclass of StandardUIQuestLogWindow or the abstract base QuestLogWindow. Either way, since it has a lot of U elements, it would require overriding more fields.
Unless it's urgent, it's probably easiest to wait until I add I add the conditional code to UITextField.
Re: Super Text Mesh Support in Standard UI?
Posted: Tue Dec 17, 2019 3:51 pm
by digiwombat
Yeah, once I started writing QuestLog overrides I decided to hit the forum and ask. Haha. I love how the template system works there, but I figured that wasn't sustainable to override compared to editing UITextField.
Thanks for putting it in. It's not super urgent so I'll wait on that (I've got plenty of things I should be doing, haha). I did an override for the alert box in the meantime.
I also did a quick edit to UITextField to add the conditionals and constructor but it didn't want to let me drop a SuperTextMesh on there in editor so I figured I was missing something there.
Thanks again! I really can't express how much time Dialogue System has saved me and how convenient it is.
Re: Super Text Mesh Support in Standard UI?
Posted: Tue Dec 17, 2019 7:06 pm
by Tony Li
Thanks!
BTW, UITextField has a custom editor. I'll need to update the custom editor script as well as UITextField itself. That's why it won't let you drop a SuperTextMesh yet.
Re: Super Text Mesh Support in Standard UI?
Posted: Wed Dec 18, 2019 3:14 am
by digiwombat
Thaaaat's what it was. I always forget about custom editors. Thanks! I'll slap my edit in until you get yours out.
Re: Super Text Mesh Support in Standard UI?
Posted: Thu Dec 19, 2019 9:18 pm
by Tony Li
There's a bit of an issue. UITextField is in Plugins so it compiles in the first pass. SuperTextMesh is not in Plugins, which means it isn't accessible to UITextField.
The simplest option is to require the end developer (e.g., you) to move the Clavian folder into the Plugins folder. That's how I'm implementing it.
The other option is assembly definition references, but that involves even more steps to enable.
Re: Super Text Mesh Support in Standard UI?
Posted: Fri Dec 20, 2019 6:40 am
by digiwombat
I already keep all assets/related scripts in Plugins unless there's a problem that arises from them being in firstpass just to keep them clear of those kinds of interop problems (which I've run into before), so that works just fine for me!