Hier mal etwas, wo sich mir ein paar Rätzel aufwerfen.
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#==============================================================================
# ** Schriftschatten V1
# Schriftschatten.rb by Ultimate Jesus (15.09.2009)
#------------------------------------------------------------------------------
# http://www.rpg-studio.de/scriptdb/node/453
# http://www.rpg-studio.de/forum/index.php?page=Thread&threadID=32511
# http://rpga.info/forum/showthread.php?t=44172
#==============================================================================
#================================================
# Aliases and redefines draw_text so that a shadow is drawn
# Made by: Ultimate Jesus
#================================================
class Bitmap
ShadowIndent = 1.3 # Size of the shadow (usually 1..3)
ShadowColour = Color.new(0, 0, 0, 255)# the colour of the shadow
# the 4th value is transparency (0-255)
unless @ja_ta_feito == 1 # Fix for F12 Rebot by P@nCHo
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)
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
colour = self.font.color.dup
self.font.color = ShadowColour
draw_text_plain(x + ShadowIndent, y + ShadowIndent, width, height, string, align)
self.font.color = colour
draw_text_plain(x, y, width, height, string, align)
end
end |
Das Skript kennen sicher viele, wenn nicht sogar Jeder. Mein Problem jedoch ist, das ich den Schatten
gerne soweit vergrößern würde, das er eine Outline gibt. Sollte doch eigt. Funktionieren oder?
Wenn jemand mir sagen könnte ob das damit möglich ist, oder ob man dafür sogar nen neues Skript
brauch, wäre ich ihm sehr verbunden.
Danke im Vorraus!