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

Project1

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

[已经解决] 标题画面如何制成横向排列?

[复制链接]

Lv2.观梦者

梦石
0
星屑
325
在线时间
252 小时
注册时间
2014-4-11
帖子
265
跳转到指定楼层
1
发表于 2014-5-18 19:31:31 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 眼中目之瞳 于 2014-5-18 20:31 编辑



图片来自百度贴吧“Rpgmaker”,这种横版的标题栏怎么设置?

Lv3.寻梦者 (版主)

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

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

开拓者贵宾

2
发表于 2014-5-18 19:44:48 | 只看该作者
最近刚回答过来着~
https://rpg.blue/thread-363860-1-1.html

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

点评

谢谢o.o  发表于 2014-5-18 20:29

评分

参与人数 1星屑 +150 收起 理由
Sion + 150 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

Lv4.逐梦者

运否天赋

梦石
10
星屑
5138
在线时间
3561 小时
注册时间
2014-5-15
帖子
1599

开拓者

3
发表于 2014-5-18 20:08:16 | 只看该作者
这不是原创区《妖怪猎人G》的标题画面吗
https://rpg.blue/thread-365088-1-1.html
土猫三国开发完成
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
70
在线时间
1083 小时
注册时间
2013-3-29
帖子
2394
4
发表于 2014-5-18 20:17:14 | 只看该作者
喵kano 发表于 2014-5-18 20:08
这不是原创区《妖怪猎人G》的标题画面吗
https://rpg.blue/thread-365088-1-1.html ...

对啊 LZ就是拿来做个例子

点评

只是奇怪为什么不直接问作者w  发表于 2014-5-18 20:45

坑的进度如上                                                                                                        点击↑
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
806
在线时间
72 小时
注册时间
2023-12-26
帖子
106
5
发表于 2024-4-7 16:55:06 | 只看该作者
这个脚本 不能显示图片,好可惜。。用那个魔法窗口脚本 可以,但它是竖的。。。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

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

GMT+8, 2024-4-30 02:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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