赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 515 |
最后登录 | 2013-1-30 |
在线时间 | 2 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 2 小时
- 注册时间
- 2009-1-3
- 帖子
- 17
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
#---------------------------------------
是中国人怎能用日文文字表?v1.0
#---------------------------------------
#给所有懒得改文字表的人!!!!!!!!!!
#(在怎么懒得改也不能用日文文字表,因为我们是中国人!)
#今天又增加了一个文字表!
【更新日志】
2009年1月7日【①经过大家建议,把‘10’改成了‘0’,9以上的全改成了罗马序号。
②把‘英文名’变成了‘其他’。】
2009年1月8日【③'99'和'100'原来没有改,现在最后一行又改了些我认为有用的符号。④啊哈!对不起!我把end加多了点(众:你神经啊!)】
2009年1月9日【正式版发布!感谢大家对我的支持,现在正式版发布了!一共有3个文字表!而且经过测试没有BUG】 - #==============================================================================
- # ■ Window_NameInput
- #------------------------------------------------------------------------------
- # 输入名称的画面、文字选择窗口。
- #==============================================================================
- #更新说明:
- #①经过大家建议,把‘10’改成了‘0’,9以上的全改成了罗马序号。
- #②把‘英文名’变成了‘其他’。
- #③'99'和'100'原来没有改,现在最后一行又改了些我认为有用的符号。
- #啊哈!对不起!我把end加多了点(众:你神经啊!)
- #又增加了一个文字表!
- #以后可能会更新:
- #㈠增加更多的文字。
- class Window_NameInput < Window_Base
- #--------------------------------------------------------------------------
- # ● 文字表
- #--------------------------------------------------------------------------
- CHINESE1 = [ '赵','钱','孙','李','雷', '周','吴','郑','王','邬',
- '冯','陈','褚','卫','贺', '蒋','沈','韩','杨','安',
- '朱','秦','尤','许','倪', '何','吕','施','张','常',
- '孔','曹','严','华','汤', '金','魏','陶','姜','乐',
- '戚','谢','邹','喻','滕', '柏','水','窦','章','于',
- '云','苏','潘','葛','殷', '奚','范','彭','郎','时',
- '鲁','韦','昌','马','罗', '苗','凤','花','方','傅',
- '俞','任','袁','柳','毕', '酆','鲍','史','唐','【',
- '费','廉','岑','薛','郝', '序','列','】''-','中文2','确定']
- CHINESE2 = [ '一','二','十','丁','七', '厂','人','卜','八','九',
- '几','儿','了','力','刀', '于','干','亏','士','工',
- '下','大','丈','万','上', '小','口','巾','山','千',
- '乞','川','亿','勺','久', '凡','夕','丸','么','广',
- '亡','门','义','之','尸', '弓','己','已','子','卫',
- '也','女','刃','习','叉', '马','乡','王','郎','井',
- '开','夫','天','无','元', '专','云','扎','方','艺',
- '木','五','支','厅','不', '太','犬','区','历','尤',
- '友','匹','车','巨','郝', '牙','屯','比''-','其他','确定']
- OTHERS = [ 'a','b','c','d','e', 'f','g','h','i','j',
- 'k','l','m','n','o', 'p','q','r','s','t',
- 'u','v','w','x','y', 'z','A','B','C','D',
- 'E','F','G','H','I', 'J','K','L','M','N',
- 'O','P','Q','R','S', 'T','U','V','W','X',
- 'Y','Z','1','2','3', '4','5','6','7','8',
- '9','0','Ⅰ','Ⅱ','Ⅲ', 'Ⅳ','Ⅴ','Ⅵ','Ⅶ','Ⅸ',
- 'Ⅹ','ⅰ','ⅱ','ⅲ','ⅳ', 'ⅴ','ⅵ','ⅶ','ⅸ','ⅹ',
- '●','○','→','←','↑', '↓','№','','中文1','确定']
- TABLE = [CHINESE1, CHINESE2, OTHERS]
- #--------------------------------------------------------------------------
- # ● 初始化对象
- # mode : 初期输入模式 (0 = 中文1 1 = 中文2 2 = 其他)
- #--------------------------------------------------------------------------
- def initialize(mode = 0)
- super(88, 148, 368, 248)
- @mode = mode
- @index = 0
- refresh
- update_cursor
- end
- #--------------------------------------------------------------------------
- # ● 获取文字
- #--------------------------------------------------------------------------
- def character
- if @index < 88
- return TABLE[@mode][@index]
- else
- return ""
- end
- end
- #--------------------------------------------------------------------------
- # ● 判断光标位置/模式切换 (平假名/片假名)
- #--------------------------------------------------------------------------
- def is_mode_change
- return (@index == 88)
- end
- #--------------------------------------------------------------------------
- # ● 确定判断光标位置
- #--------------------------------------------------------------------------
- def is_decision
- return (@index == 89)
- end
- #--------------------------------------------------------------------------
- # ● 获取项目描绘矩形
- # index : 项目编号
- #--------------------------------------------------------------------------
- def item_rect(index)
- rect = Rect.new(0, 0, 0, 0)
- rect.x = index % 10 * 32 + index % 10 / 5 * 16
- rect.y = index / 10 * WLH
- rect.width = 32
- rect.height = WLH
- return rect
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- for i in 0..89
- rect = item_rect(i)
- rect.x += 2
- rect.width -= 4
- self.contents.draw_text(rect, TABLE[@mode][i], 1)
- end
- end
- #--------------------------------------------------------------------------
- # ● 更新光标
- #--------------------------------------------------------------------------
- def update_cursor
- self.cursor_rect = item_rect(@index)
- end
- #--------------------------------------------------------------------------
- # ● 光标向下移动
- # wrap : 允许跳过
- #--------------------------------------------------------------------------
- def cursor_down(wrap)
- if @index < 80
- @index += 10
- elsif wrap
- @index -= 80
- end
- end
- #--------------------------------------------------------------------------
- # ● 光标向上移动
- # wrap : 允许跳过
- #--------------------------------------------------------------------------
- def cursor_up(wrap)
- if @index >= 10
- @index -= 10
- elsif wrap
- @index += 80
- end
- end
- #--------------------------------------------------------------------------
- # ● 光标向右移动
- # wrap : 允许跳过
- #--------------------------------------------------------------------------
- def cursor_right(wrap)
- if @index % 10 < 9
- @index += 1
- elsif wrap
- @index -= 9
- end
- end
- #--------------------------------------------------------------------------
- # ● 光标向左移动
- # wrap : 允许跳过
- #--------------------------------------------------------------------------
- def cursor_left(wrap)
- if @index % 10 > 0
- @index -= 1
- elsif wrap
- @index += 9
- end
- end
- #--------------------------------------------------------------------------
- # ● 光标向确定移动
- #--------------------------------------------------------------------------
- def cursor_to_decision
- @index = 89
- end
- #--------------------------------------------------------------------------
- # ● 向下一页移动
- #--------------------------------------------------------------------------
- def cursor_pagedown
- @mode = (@mode + 1) % TABLE.size
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 向前一页移动
- #--------------------------------------------------------------------------
- def cursor_pageup
- @mode = (@mode + TABLE.size - 1) % TABLE.size
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- last_mode = @mode
- last_index = @index
- if Input.repeat?(Input::DOWN)
- cursor_down(Input.trigger?(Input::DOWN))
- end
- if Input.repeat?(Input::UP)
- cursor_up(Input.trigger?(Input::UP))
- end
- if Input.repeat?(Input::RIGHT)
- cursor_right(Input.trigger?(Input::RIGHT))
- end
- if Input.repeat?(Input::LEFT)
- cursor_left(Input.trigger?(Input::LEFT))
- end
- if Input.trigger?(Input::A)
- cursor_to_decision
- end
- if Input.trigger?(Input::R)
- cursor_pagedown
- end
- if Input.trigger?(Input::L)
- cursor_pageup
- end
- if Input.trigger?(Input::C) and is_mode_change
- cursor_pagedown
- end
- if @index != last_index or @mode != last_mode
- Sound.play_cursor
- end
- update_cursor
- end
复制代码 |
|