G'morning, all y'all.
I'm looking for a way to change the border of a text window with some script call or command, much like how you can dynamically change the color of the window itself. (The idea is I'd like to change the text border color--not the text window--to match whoever is speaking.)
I'm aware that I can change the image itself in the Window.png file (which I plan on doing anyway), but I'm trying to figure out how to change only the color within the program. Ideally I'd also like to set some sort of default, even if I make the border image a mid/dark gray, but I don't even know if any of this is possible as is.
Thanks, y'all.
I don't know if you can tint just a portion of an image file like you're asking.
There are a number of plugins that let you change windowskins during gameplay, so you could just make separate windowskin files with the different border colors you want, then change between those.
You could write a plugin to shift the hue of the border sprite, but depending on what your window skin looks like that might not have the desired effect.
If you have more of a retro skin (e.g. NES style), you could dynamically draw a colored border with a plugin, but that gets into editing the bitmap sprites directly.
You didn't share any visual mockups, so I can't say if either of the above might work out.
The most practical approach might be a plugin that lets you specify a windowskin file based on a face graphic.
The correct term is window frame.
You can change color tone of the window frame sprite.
For example:
SceneManager._scene._messageWindow._windowFrameSprite.setColorTone([0,255,0])
I don't think it has something to do with YEP message core. As far as I know it doesn't change the basic window.
How exactly do you use that? You are supposed to use that inside a event command.
I copied the line as written (with changed RGB values) into a Script event command. The event itself happens to be autorun. I tested it out, and the frame disappeared.
To make sure it wasn't something I was misunderstanding, I started up a completely fresh project, had an autorun event run the same script (followed by a show text command of course), and it worked perfectly.
Then I tested out the plugins I was using on that fresh project. GALV layer worked fine, YEP core worked fine. As soon as I activated YEP message core (with YEP core of course), without doing anything else at all, the frame disappeared again on my next test.
Okay - when I left my actual project and went to a new test, I can duplicate your issue.
I don't know why - I'm using that version of the Core and Message Core in my project, so there must be something else that's fixing it.
If I figure anything out, I'll let you know.
Edit: For some reason, it's the timing. If I turn off the Message Core, the event as you wrote it works as expected.
If I turn the Message Core on, take out the script call, display the show text window, then go into the console and enter the script command, the frame remains and changes color.
So something must be different about how the window gets created/drawn in the Message Core which causes setting the color tone before the window is opened to glitch. I didn't see it when I did my project test because I entered the code in the console, not as a script call in the event.
setTimeout(function(){SceneManager._scene._messageWindow._windowFrameSprite.setColorTone([0,255,0]);},1);
This should fix the problem. Though I don't know what happens in YEP message core after the window is loaded.
Thank you very much, it now works perfectly.
Before I call this solved, how should I credit you for the patch?