赞 | 1 |
VIP | 220 |
好人卡 | 25 |
积分 | 7 |
经验 | 51477 |
最后登录 | 2013-1-12 |
在线时间 | 943 小时 |
Lv2.观梦者 花开堪折直须折
- 梦石
- 0
- 星屑
- 671
- 在线时间
- 943 小时
- 注册时间
- 2010-7-17
- 帖子
- 4963
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
名称输入的。。字不太多。。。。但是常用字大多数都有了。。。。
请在脚本里找到Window_NameInput,再把内容替换进去。。。- #==============================================================================
- # ■ Window_NameInput
- #------------------------------------------------------------------------------
- # 输入名称的画面、文字选择窗口。
- #==============================================================================
- class Window_NameInput < Window_Base
- #--------------------------------------------------------------------------
- # ● 文字码表
- #--------------------------------------------------------------------------
- 姓 = [ '王','张','李','刘','陈', '杨','赵','周','孙','吴',
- '徐','黄','朱','马','郭', '高','胡','何','宋','郑',
- '曹','林','于','韩','许', '罗','沈','谢','冯','唐',
- '梁','雷','姜','魏','杜', '袁','丁','任','陆','潘',
- '田','彭','程','吕','崔', '金','顾','蔡','范','肖',
- '蒋','姚','苏','贾','叶', '秦','邓','余','孟','曾',
- '卢','石','汪','薛','尹', '史','侯','夏','钟','方',
- '付','钱','白','谭','廖', '段','邹','郝','龚','戴',
- '毛','邵','施','武','邱', '孔','江','严','切换','确定']
- 复姓 = [ '欧阳','太史','端木','上官','司马', '东方','独孤','南宫','万俟','闻人',
- '夏侯','诸葛','尉迟','公羊','赫连', '澹台','皇甫','宗政','濮阳','公冶',
- '太叔','申屠','公孙','慕容','仲孙', '钟离','长孙','宇文','司徒','鲜于',
- '司空','闾丘','子车','亓官','司寇', '巫马','公西','颛孙','壤驷','公良',
- '漆雕','乐正','宰父','谷梁','拓跋', '夹谷','轩辕','令狐','段干','百里',
- '呼延','东郭','南门','羊舌','微生', '公户','公玉','公仪','梁丘','公仲',
- '公上','公门','公山','公坚','左丘', '公伯','西门','公祖','第五','公乘',
- '贯丘','公皙','南荣','东里','东宫', '仲长','子书','子桑','即墨','达奚',
- '褚师','','','','', '','','','切换','确定']
-
- 名 = [ '金','木','水','火','土', '阿','六','殷','渝','旭',
- '雷','风','福','思','雪', '儿','七','吟','羽','晴',
- '光','麒','符','气','血', '大','八','凤','碧','铃',
- '电','麟','燃','繁','伊', '小','九','曦','恩','芸',
- '力','雨','媚','暗','翼', '一','石','归','漓','祭',
- '姬','义','燕','幽','易', '二','魂','桂','欺','溪',
- '舞','灵','嫣','缤','亿', '三','步','香','滴','紫',
- '季','琳','万','冰','依', '四','银','狱','妲','古',
- '龙','鳞','婉','沁','亦', '五','隐','语','切换','确定']
-
- 名2 = [ '华','军','明','平','伟', '强','峰','林','红','勇',
- '杰','东','辉','涛','国', '敏','斌','文','波','芳',
- '梅','刚','荣','丽','霞', '英','幻','民','玲','生',
- '娟','龙','新','燕','云', '忠','亮','鹏','静','春',
- '飞','祥','超','成','海', '良','锋','磊','君','兵',
- '宇','清','莉','青','俊', '光','艳','利','宁','凯',
- '武','兰','慧','健','婷', '德','建','宏','琴','娜',
- '珍','兴','庆','彬','梦', '山','洁','玉','毅','元',
- '群','阳','松','泉','安', '福','胜','☆','切换','确定']
- 特殊符号 = ['!','?','˙','#','&', '*','※','§','○','●',
- '△','▽','▼','▲','■', '□','◇','◆','♀','♂',
- '☆','★','◎','⊙','〤', ',',';',':','『','』',
- '↑','↓','←','→','↖', '↗','↙','↘','「','」',
- '1','2','3','4','5', '6','7','8','9','0',
- '|','…','.','、','-', '(',')','〔','〕',' ',
- '+','-','*','/','\', '',' ',' ',' ',' ',
- ' ',' ',' ',' ',' ', ' ',' ',' ',' ',' ',
- ' ',' ',' ',' ','符', '号',' ',' ','切换','确定']
- TABLE = [姓, 复姓, 名, 名2, 特殊符号]
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # mode : 默认输入模式
- #--------------------------------------------------------------------------
- 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
- end
复制代码 声明——其中一部分字来自于别的作者。。= =
整理了一些~
好啦~这些字大概够玩家普通输入了吧~ |
|