03-07-2008, 06:39 AM
Macs Border/Outline Script
Introduction
What this script does is rather simple, its creates a nice little outline around your original text, to get this to work on your chosen text replace you with and then you should have yourself a nice little outline.
Script
Add me above Main
Authors Notes
I know this isn't exactly a great script its just a little addon i was making.
Introduction
What this script does is rather simple, its creates a nice little outline around your original text, to get this to work on your chosen text replace you
Code:
draw_text
Code:
draw_text_border
Script
Add me above Main
Code:
#==============================================================================
# Border Text Script by Mac
#------------------------------------------------------------------------------
# This script allows the addon of outlines to your text.
#==============================================================================
class Bitmap
#--------------------------------------------------------------------------
# * Draw Text Border
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : draw width
# height : draw height
# text : draw text
# allign : draw allignment
#--------------------------------------------------------------------------
def draw_text_border(x,y,width,height,text,align=0)
store_color = Color.new(self.font.color.red,self.font.color.green,self.font.color.blue,self.font.color.alpha)
#--------------------------------------------------------------------------
# The line: self.font.color = Color.new(0,0,0,self.font.color.alpha)
# defines the border colour e.g 0,0,0 being black, 255,255,255 being
# white etc
#--------------------------------------------------------------------------
self.font.color = Color.new(0,0,0,self.font.color.alpha)
draw_text(x-1,y-1,width,height,text,align)
draw_text(x-1,y+1,width,height,text,align)
draw_text(x+1,y-1,width,height,text,align)
draw_text(x+1,y+1,width,height,text,align)
self.font.color = store_color
draw_text(x,y,width,height,text,align)
end
end
I know this isn't exactly a great script its just a little addon i was making.