...Hmm. Here's what I do for a tinter.
Essentially, I'll assume that if you could tint the screen just as with PaletteMorph, you'd be satisfied?
That's pretty easy...
Make a function, TintScreen().
Then, have a SetTint(int r, int g, int b, int a) function that sets the global tint variables.
Then, just have it set the lucency to A alpha/lucency, draw a rectangle over the screen with R red, G green, B Blue, and then set the lucency back to normal.
Your textbox itself probably calls its own SetLucent() command, so it will always be the proper lucency. As long as you set lucency back to 0, then everything else should work fine.
Call this in a loop after the Render() command, or with HookRetrace. This is what I use for the fades and tints in Love Revolution, which is under V2.6 right now, but the same idea applies.
Also, have you thought about using the system hour/minute variables for a real-time game? It would completely break the Harvest Moon scaled-down day gameplay feel, and would add an Animal Crossing flavor, but it's just an idea.
Does this sound okay?
Main Game Loop
{
Updatecontrols()
(insert gameplay whatever else for your main loop)
(draw gameplay graphics with render, etc.)
TintScreen()
ShowPage()
}
Also, sometimes you need the tint to slowly come back to normal, right? Well, at lucency = 100, there will be no tint since it's completely translucent. So, to remove tint, create something like:
void Normalize()
{
if (global tint lucency is less than 100)
global tint lucency ++
}
Then, call that in your game loops too.
Main Game Loop
{
Updatecontrols()
Normalize()
(insert gameplay whatever else for your main loop)
(draw gameplay graphics with render, etc.)
TintScreen()
ShowPage()
}
This way, whenever you create a tint, when the main game loop takes control, it will slowly fade back into view.
Also, when you need a fadeout:
Void FadeOut()
{
SetTint(color_r, color_g, color_b, 100)
while (global tint lucency > 0) //ie, while we aren't completely faded...
global tint lucency --
(render game screen)
ShowPage()
}
Does this make sense? You create fades with FadeOut, you recover from a fade with normalize, and you draw the current fade using a single translucent rectangle over all screen data.
In fact, I made a new UpdateScreen() function for Love Revolution, that automatically draws the tint rectangle and then calls ShowPage(), so I don't have to call them both separately. The above is almost the exact method used for all fades in Love Revolution.