设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1521|回复: 0
打印 上一主题 下一主题

横向标题画面选项

[复制链接]

…あたしは天使なんかじゃないわ

梦石
0
星屑
2208
在线时间
4033 小时
注册时间
2010-10-4
帖子
10779

开拓者贵宾

跳转到指定楼层
1
发表于 2014-5-21 16:16:24 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
本帖最后由 taroxd 于 2014-7-13 16:59 编辑

此脚本不需要置顶的脚本

RUBY 代码复制
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ Window_TitleCommand
  4. #------------------------------------------------------------------------------
  5. #  标题画面中,选择“开始游戏/继续游戏”的窗口。
  6. #==============================================================================
  7. class Window_TitleCommand < Window_Command
  8.   #--------------------------------------------------------------------------
  9.   # ● 获取窗口的宽度
  10.   #--------------------------------------------------------------------------
  11.   def window_width
  12.     return 360
  13.   end
  14.   #--------------------------------------------------------------------------
  15.   # ● 获取显示行数
  16.   #--------------------------------------------------------------------------
  17.   def visible_line_number
  18.     return 1
  19.   end
  20.   #--------------------------------------------------------------------------
  21.   # ● 获取列数
  22.   #--------------------------------------------------------------------------
  23.   def col_max
  24.     return 3
  25.   end
  26.   #--------------------------------------------------------------------------
  27.   # ● 获取行间距的宽度
  28.   #--------------------------------------------------------------------------
  29.   def spacing
  30.     return 8
  31.   end
  32.   #--------------------------------------------------------------------------
  33.   # ● 计算窗口内容的宽度
  34.   #--------------------------------------------------------------------------
  35.   def contents_width
  36.     (item_width + spacing) * item_max - spacing
  37.   end
  38.   #--------------------------------------------------------------------------
  39.   # ● 计算窗口内容的高度
  40.   #--------------------------------------------------------------------------
  41.   def contents_height
  42.     item_height
  43.   end
  44.   #--------------------------------------------------------------------------
  45.   # ● 获取首列位置
  46.   #--------------------------------------------------------------------------
  47.   def top_col
  48.     ox / (item_width + spacing)
  49.   end
  50.   #--------------------------------------------------------------------------
  51.   # ● 设置首列位置
  52.   #--------------------------------------------------------------------------
  53.   def top_col=(col)
  54.     col = 0 if col < 0
  55.     col = col_max - 1 if col > col_max - 1
  56.     self.ox = col * (item_width + spacing)
  57.   end
  58.   #--------------------------------------------------------------------------
  59.   # ● 获取尾列位置
  60.   #--------------------------------------------------------------------------
  61.   def bottom_col
  62.     top_col + col_max - 1
  63.   end
  64.   #--------------------------------------------------------------------------
  65.   # ● 设置尾列位置
  66.   #--------------------------------------------------------------------------
  67.   def bottom_col=(col)
  68.     self.top_col = col - (col_max - 1)
  69.   end
  70.   #--------------------------------------------------------------------------
  71.   # ● 确保光标在画面范围内滚动
  72.   #--------------------------------------------------------------------------
  73.   def ensure_cursor_visible
  74.     self.top_col = index if index < top_col
  75.     self.bottom_col = index if index > bottom_col
  76.   end
  77.   #--------------------------------------------------------------------------
  78.   # ● 获取项目的绘制矩形
  79.   #--------------------------------------------------------------------------
  80.   def item_rect(index)
  81.     rect = super
  82.     rect.x = index * (item_width + spacing)
  83.     rect.y = 0
  84.     rect
  85.   end
  86.   #--------------------------------------------------------------------------
  87.   # ● 获取对齐方向
  88.   #--------------------------------------------------------------------------
  89.   def alignment
  90.     return 1
  91.   end
  92.   #--------------------------------------------------------------------------
  93.   # ● 光标向下移动
  94.   #--------------------------------------------------------------------------
  95.   def cursor_down(wrap = false)
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # ● 光标向上移动
  99.   #--------------------------------------------------------------------------
  100.   def cursor_up(wrap = false)
  101.   end
  102.   #--------------------------------------------------------------------------
  103.   # ● 光标移至下一页
  104.   #--------------------------------------------------------------------------
  105.   def cursor_pagedown
  106.   end
  107.   #--------------------------------------------------------------------------
  108.   # ● 光标移至上一页
  109.   #--------------------------------------------------------------------------
  110.   def cursor_pageup
  111.   end
  112. end
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-21 22:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表