Please choose which of these is required (list goes from easiest to most difficult):
- individual letters are reversed, but letters and words still appear in the correct order. So DOG would show as a reversed D, then a reversed O, then a reversed G.
- the whole word is spelled in reverse, and letters appear back to front, but the words are still in the same order. So MAD MAN would show as DAM NAM (but each letter is mirrored).
- all text between the start and end of the mirror is flipped around - words are shown in reverse order, spelled back to front, and individual letters flipped. So MAD MAN would show as NAM DAM. I don't even know if this is possible, because if your text goes over multiple lines, it could end up making the text exceed the message box.
Here is a start (it uses the first option - words and letters are in the correct order, but letters are reversed). I'm not sure why it makes it look slightly different.
Spoiler
class Window_Base < Window #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- alias shaz_reverse_text_initialize initialize def initialize(x, y, width, height) shaz_reverse_text_initialize(x, y, width, height) @mirror = false end #-------------------------------------------------------------------------- # * Normal Character Processing #-------------------------------------------------------------------------- def process_normal_character(c, pos) text_width = text_size(c).width if !@mirror draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c) else dummy = Bitmap.new(text_size(c).width, text_size(c).height) dummy.font = contents.font.clone dummy.draw_text(0, 0, dummy.width, dummy.height, c) contents.blt(pos[:x], pos[:y], dummy, Rect.new(dummy.width - 1, 0, -dummy.width, dummy.height)) dummy.dispose end pos[:x] += text_width end #-------------------------------------------------------------------------- # * Destructively Get Control Code #-------------------------------------------------------------------------- def obtain_escape_code(text) text.slice!(/^[\$\.\|\^!><\{\}\*\\]|^[A-Z]+/i) end #-------------------------------------------------------------------------- # * Control Character Processing # code : the core of the control character # e.g. "C" in the case of the control character \C[1]. #-------------------------------------------------------------------------- alias shaz_mirror_text_process_escape_character process_escape_character def process_escape_character(code, text, pos) shaz_mirror_text_process_escape_character(code, text, pos) case code.upcase when '*' mirror_text end end #-------------------------------------------------------------------------- # * Mirror Text #-------------------------------------------------------------------------- def mirror_text @mirror = !@mirror endend
This also works in the help window (so you can reverse text in descriptions), but not in lists (names of items, skills, etc).
Use \* to turn it on, and \* to turn it off again. Since it's just a toggle, you don't need two separate codes.