Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Text Outline in Message Windows

Status
Not open for further replies.
I have the Yeyinde's Font Addons Script, so I can do a text outline when I do draw_text by doing

PHP:
self.contents.font.outline = true

But I don't know how to do this in a standard message window. Is there a script to do this? And if possible can I edit it to be compatible with DubeAlex's AMS?
 
Just insert this below your scripts somewhere.

Code:
class Window_Message
  alias_method :outlinemessages_init, :initialize
  def initialize
    outlinemessages_init
    self.contents.font.outline = true
  end
end

Something like that should work.
 
For dubealex's AMS, Add this to use shadow, outline with text command(you can edit text command whatever you want):
Code:
class Window_Message < Window_Selectable  
......
  def refresh
......
      @now_text.gsub!(/\\[i]/) { "\023" } #Edit-This is for indent(case sensitive)
......
      #Add - Font.bold
      @now_text.gsub!(/\\[B]/) { "\031" }
      # Font.italic
      @now_text.gsub!(/\\[I]/) { "\032" } #Note: case sensitive
      #Add - Font.underline/Font.strike/Font.shadow/Font.outline - Requires Yeyinde's Font addon or MACL 1.5
      @now_text.gsub!(/\\[Uu]l/) { "\033" }
      @now_text.gsub!(/\\[Ss]trike/) { "\034" }
      @now_text.gsub!(/\\[Ss]hadow/) { "\035" }
      @now_text.gsub!(/\\[Oo]ut/) { "\036" }
      #Add-end
......

  def update
......
          #Add-Bold
          if c == "\031"
            self.contents.font.bold ^= true
            c = ""
          end
          
          #Add-Italic
          if c == "\032"
            self.contents.font.italic ^= true
            c = ""
          end
          
          #Add-Underline, Strike, Shadow & Outline
          if c == "\033"
            self.contents.font.underline ^= true
            c = ""
          end
          if c == "\034"
            self.contents.font.strikethrough ^= true
            c = ""
          end
          if c == "\035"
            self.contents.font.shadow ^= true
            c = ""
          end
          if c == "\036"
            self.contents.font.outline ^= true
            c = ""
          end
          #end - Requires Yeyinde's font addon or MACL 1.5
......
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top