Code: |
#============================================================================== # ¦ Bitmap.draw_text #------------------------------------------------------------------------------ # Fait par Ultimate Jesus, modifié par Speed pour le Script Project. #Affiche une ombre sous chaque lettre pour tous les messages. #============================================================================== class Bitmap unless @ja_ta_feito == 1 alias draw_text_plain draw_text @ja_ta_feito = 1 end def draw_text(arg1 = 0, arg2 = 0, arg3 = 0, arg4 = 0, arg5 = 0, arg6 = 0, color=false) if arg1.is_a?(Rect) x = arg1.x y = arg1.y width = arg1.width height = arg1.height string = arg2 align = arg3 else x = arg1 y = arg2 width = arg3 height = arg4 string = arg5 align = arg6 end if color == false color1 = Color.new(96, 96, 96, 255) color2 = Color.new(208, 208, 200, 255) else color1 = Color.new(255, 255, 255, 255) color2 = Color.new(96,96,96,255) end #Outline Text self.font.color = color2 draw_text_plain(x+1, y, width, height, string, align) draw_text_plain(x, y+1, width, height, string, align) draw_text_plain(x+1, y+1, width, height, string, align) draw_text_plain(x+2, y, width, height, string, align) draw_text_plain(x, y+2, width, height, string, align) draw_text_plain(x+2, y+2, width, height, string, align) #Normal Text self.font.color = color1 draw_text_plain(x, y, width, height, string, align) draw_text_plain(x, y, width, height, string, align) end end |