Project1
标题:
练手 - 自由字体选项窗口
[打印本页]
作者:
忧雪の伤
时间:
2011-6-18 19:12
标题:
练手 - 自由字体选项窗口
#==============================================================================
# ** 伪·热心辅导班
#==============================================================================
class Window_Free_Command < Window_Command
attr_accessor(:free_system)
def initialize(width, commands, size, font, color)
self.free_system = [size, font, color]
super(width, commands)
end
def refresh
self.contents.clear
@item_max.times {|time| draw_item(time, self.free_system[2]) }
end
def draw_item(index, color)
self.contents.font.size = self.free_system[0]
self.contents.font.name = self.free_system[1]
super(index, color)
end
end
复制代码
方法:
Window_Free_Command.new(width, commands, size, font, color)
前面两个是Window_Command就存在的参数。
后面三个,分别是描绘字符的字体大小,字体名称,字体颜色。
作者:
一瞬间的幻觉
时间:
2011-6-18 23:46
早上刚说就做出来了啊~~
具体怎么应用到游戏里面去?类似对话框文字属性?
作者:
柳之一
时间:
2011-6-19 00:18
一瞬间的幻觉 发表于 2011-6-18 23:46
早上刚说就做出来了啊~~
具体怎么应用到游戏里面去?类似对话框文字属性? ...
@a=Window_Free_Command.new(480, $commands, 24, $font, red)类似这样
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1