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

Project1

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

[已经解决] 菜单和选择框的位置

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
48 小时
注册时间
2013-1-16
帖子
29
跳转到指定楼层
1
 楼主| 发表于 2013-2-10 13:34:26 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 繁华落尽丶cc 于 2013-2-11 08:31 编辑

把菜单和选择框的位置放到中间 本人脚本盲 求助怎么修改脚本

1.jpg (103.09 KB, 下载次数: 14)

1.jpg

2.jpg (46.81 KB, 下载次数: 16)

2.jpg
Q

Lv3.寻梦者

虚空人形

梦石
0
星屑
4557
在线时间
2037 小时
注册时间
2011-8-11
帖子
3398

贵宾

2
发表于 2013-2-10 14:12:35 | 只看该作者
在Window_ChoiceList有
  1.   #--------------------------------------------------------------------------
  2.   # ● 初始化对象
  3.   #--------------------------------------------------------------------------
  4.   def initialize(message_window)
  5.     @message_window = message_window
  6.     super(0, 0)
  7.     self.openness = 0
  8.     deactivate
  9.   end
  10.   #--------------------------------------------------------------------------
  11.   # ● 开始输入的处理
  12.   #--------------------------------------------------------------------------
  13.   def start
  14.     update_placement
  15.     refresh
  16.     select(0)
  17.     open
  18.     activate
  19.   end
  20.   #--------------------------------------------------------------------------
  21.   # ● 更新窗口的位置
  22.   #--------------------------------------------------------------------------
  23.   def update_placement
  24.     self.width = [max_choice_width + 12, 96].max + padding * 2
  25.     self.width = [width, Graphics.width].min
  26.     self.height = fitting_height($game_message.choices.size)
  27.     self.x = Graphics.width - width
  28.     if @message_window.y >= Graphics.height / 2
  29.       self.y = @message_window.y - height
  30.     else
  31.       self.y = @message_window.y + @message_window.height
  32.     end
  33.   end
复制代码
把初始化对象的(0,0)改为数字或者self.x和self.y的值改为你想要的值试试。

点评

嗯谢谢  发表于 2013-2-11 08:31
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
48
在线时间
841 小时
注册时间
2010-8-11
帖子
1135
3
发表于 2013-2-10 14:54:50 | 只看该作者
1.事件选择框:
在main前插入:
  1. class Window_ChoiceList < Window_Command
  2.   #--------------------------------------------------------------------------
  3.   # ● 更新窗口的位置
  4.   #--------------------------------------------------------------------------
  5.   def update_placement
  6.     self.width = [max_choice_width + 12, 96].max + padding * 2
  7.     self.width = [width, Graphics.width].min
  8.     self.height = fitting_height($game_message.choices.size)
  9.     self.x = Graphics.width / 2 - width / 2
  10.     self.y = Graphics.height / 2 - height / 2
  11.   end
  12. end
复制代码
2.菜单:
在main之前插入:
  1. class Window_MenuCommand < Window_Command
  2.   alias oi initialize
  3.   #--------------------------------------------------------------------------
  4.   # ● 初始化对象
  5.   #--------------------------------------------------------------------------
  6.   def initialize
  7.     oi
  8.     self.x = Graphics.width / 2 - width / 2
  9.     self.y = Graphics.height / 2 - height / 2
  10.   end
  11. end
复制代码
(以上全都未经测试)

点评

谢谢  发表于 2013-2-11 08:30
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-5-21 07:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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