Project1

标题: 标题画面如何制成横向排列? [打印本页]

作者: 眼中目之瞳    时间: 2014-5-18 19:31
标题: 标题画面如何制成横向排列?
本帖最后由 眼中目之瞳 于 2014-5-18 20:31 编辑

(, 下载次数: 122)

图片来自百度贴吧“Rpgmaker”,这种横版的标题栏怎么设置?
作者: taroxd    时间: 2014-5-18 19:44
最近刚回答过来着~
https://rpg.blue/thread-363860-1-1.html

[pre lang="ruby" line="1"]#encoding:utf-8
#==============================================================================
# ■ Window_TitleCommand
#------------------------------------------------------------------------------
#  标题画面中,选择“开始游戏/继续游戏”的窗口。
#==============================================================================

class Window_TitleCommand < Window_Command
  #--------------------------------------------------------------------------
  # ● 获取窗口的宽度
  #--------------------------------------------------------------------------
  def window_width
    return 360
  end
  #--------------------------------------------------------------------------
  # ● 获取显示行数
  #--------------------------------------------------------------------------
  def visible_line_number
    return 1
  end
  #--------------------------------------------------------------------------
  # ● 获取列数
  #--------------------------------------------------------------------------
  def col_max
    return 3
  end
  #--------------------------------------------------------------------------
  # ● 获取行间距的宽度
  #--------------------------------------------------------------------------
  def spacing
    return 8
  end
  #--------------------------------------------------------------------------
  # ● 计算窗口内容的宽度
  #--------------------------------------------------------------------------
  def contents_width
    (item_width + spacing) * item_max - spacing
  end
  #--------------------------------------------------------------------------
  # ● 计算窗口内容的高度
  #--------------------------------------------------------------------------
  def contents_height
    item_height
  end
  #--------------------------------------------------------------------------
  # ● 获取首列位置
  #--------------------------------------------------------------------------
  def top_col
    ox / (item_width + spacing)
  end
  #--------------------------------------------------------------------------
  # ● 设置首列位置
  #--------------------------------------------------------------------------
  def top_col=(col)
    col = 0 if col < 0
    col = col_max - 1 if col > col_max - 1
    self.ox = col * (item_width + spacing)
  end
  #--------------------------------------------------------------------------
  # ● 获取尾列位置
  #--------------------------------------------------------------------------
  def bottom_col
    top_col + col_max - 1
  end
  #--------------------------------------------------------------------------
  # ● 设置尾列位置
  #--------------------------------------------------------------------------
  def bottom_col=(col)
    self.top_col = col - (col_max - 1)
  end
  #--------------------------------------------------------------------------
  # ● 确保光标在画面范围内滚动
  #--------------------------------------------------------------------------
  def ensure_cursor_visible
    self.top_col = index if index < top_col
    self.bottom_col = index if index > bottom_col
  end
  #--------------------------------------------------------------------------
  # ● 获取项目的绘制矩形
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = super
    rect.x = index * (item_width + spacing)
    rect.y = 0
    rect
  end
  #--------------------------------------------------------------------------
  # ● 获取对齐方向
  #--------------------------------------------------------------------------
  def alignment
    return 1
  end
  #--------------------------------------------------------------------------
  # ● 光标向下移动
  #--------------------------------------------------------------------------
  def cursor_down(wrap = false)
  end
  #--------------------------------------------------------------------------
  # ● 光标向上移动
  #--------------------------------------------------------------------------
  def cursor_up(wrap = false)
  end
  #--------------------------------------------------------------------------
  # ● 光标移至下一页
  #--------------------------------------------------------------------------
  def cursor_pagedown
  end
  #--------------------------------------------------------------------------
  # ● 光标移至上一页
  #--------------------------------------------------------------------------
  def cursor_pageup
  end
end
[/pre]
作者: 喵kano    时间: 2014-5-18 20:08
这不是原创区《妖怪猎人G》的标题画面吗
https://rpg.blue/thread-365088-1-1.html
作者: 黄濑凉太    时间: 2014-5-18 20:17
喵kano 发表于 2014-5-18 20:08
这不是原创区《妖怪猎人G》的标题画面吗
https://rpg.blue/thread-365088-1-1.html ...

对啊 LZ就是拿来做个例子
作者: djs789783    时间: 2024-4-7 16:55
这个脚本 不能显示图片,好可惜。。用那个魔法窗口脚本 可以,但它是竖的。。。




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X5.0