查看: 3633|回复: 3

[已经解决] 鼠标问题(不止)!

[复制链接]
梦石
0
星屑
3841
在线时间
723 小时
注册时间
2014-3-29
回帖
449
发表于 2014-8-19 12:41:37 | 显示全部楼层 |阅读模式

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

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

×

就是“VIP礼包系统”的脚本会产生一个像输入名字内样的窗口,但是这个窗口并不能用鼠标点击,

只能用键盘(输入时鼠标会移动,移出游戏的窗口时,1.然后在按确定输入这样的数值,就蹦出错误)

想 就是让这个窗口也能用鼠标。
                                                                                               麻烦了~{:2_249:}



工程。(这简单的工程好像没出现像1内样的错误,但主要是让鼠标能够用)
工程.zip (391.64 KB, 下载次数: 63)


梦石
0
星屑
3841
在线时间
723 小时
注册时间
2014-3-29
回帖
449
 楼主| 发表于 2014-8-19 14:19:24 | 显示全部楼层
本帖最后由 neverstop 于 2014-8-24 14:23 编辑

没银。
或者怎么让 @Sion 的鼠标脚本的鼠标不随方向键的移动而移动捏,鼠标脚本会和内个事件防卡脚本发生冲突(鼠标不可离开游戏窗口)
。好急好急好急 求救啊~  

工程!

Project2.zip

427.5 KB, 下载次数: 65

点评

@Sion  发表于 2014-8-30 13:46
不知为啥传不上百度网盘。。就用了腾讯微云,抱歉,麻烦你了 http://url.cn/UcKOWQ  发表于 2014-8-30 13:46
有点大。。  发表于 2014-8-30 13:07
哦好的。我找一下啊~  发表于 2014-8-30 13:06
没办法运行,缺素材  发表于 2014-8-30 13:01
回复

使用道具 举报

bluer
公主殿下

梦石
0
星屑
283
在线时间
533 小时
注册时间
2013-10-19
回帖
2017
发表于 2014-8-19 14:24:00 | 显示全部楼层
总觉得可以。。其实泥说的那些窝没太明白。。黑子头像萌翻了好评=w=

点评

有点可怕啊。  发表于 2014-8-19 16:20
直播艾特sion  发表于 2014-8-19 15:59
天哪,是脚本冲突我不会告诉你是sion大神的两个脚本互相冲突==,但现在想让鼠标不跟着键盘走,有没办法捏  发表于 2014-8-19 15:30
打不下了。(输入完后,然后 enter ,鼠标在游戏的总窗口外,就会出错) “我也很喜欢的说~~啦啦啦”  发表于 2014-8-19 15:15
就是想让内个鼠标能够点击窗口中的选项(或者让鼠标不要随着方向键的移动而移动),不知为啥,鼠标只要一出去,内个很多脚本的工程就会出错  发表于 2014-8-19 15:13
回复

使用道具 举报

梦石
0
星屑
266
在线时间
2355 小时
注册时间
2009-3-13
回帖
2257

贵宾

发表于 2014-8-30 15:54:08 | 显示全部楼层
替换脚本 ├Window_CDKeyInput ┤
点击展开/收起[pre lang="ruby" line="1"]#encoding:utf-8
#==============================================================================
# ■ Window_NameInput
#------------------------------------------------------------------------------
#  名字输入画面中,选择文字的窗口。
#==============================================================================

class Window_CDKeyInput < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 文字表
  #--------------------------------------------------------------------------
  TABLE0 = [ '1','2','3','4','5','6','7','8','9','0',
             'Q','W','E','R','T','Y','U','I','O','P',
             'A','S','D','F','G','H','J','K','L','Enter',
             'Z','X','C','V','B','N','M','-','','Shift']
  TABLE1 = [ '1','2','3','4','5','6','7','8','9','0',
             'q','w','e','r','t','y','u','i','o','p',
             'a','s','d','f','g','h','j','k','l','Enter',
             'z','x','c','v','b','n','m','-','','Shift']
  #--------------------------------------------------------------------------
  # ● 初始化对象
  #--------------------------------------------------------------------------
  def initialize(edit_window)
    super(edit_window.x, edit_window.y + edit_window.height + 8,
          edit_window.width, fitting_height(4))
    @edit_window = edit_window
    @page = 0
    @index = 0
    refresh
    update_cursor
    activate
  end
  #--------------------------------------------------------------------------
  # ● 获取字表
  #--------------------------------------------------------------------------
  def table
    return [TABLE0,TABLE1]
  end
  #--------------------------------------------------------------------------
  # ● 获取文字
  #--------------------------------------------------------------------------
  def character
    ((@index != 29)&&(@index != 39))? table[@page][@index] : ""
  end
  #--------------------------------------------------------------------------
  # ● 判定光标位置是否在“切换”上(平假/片假)
  #--------------------------------------------------------------------------
  def is_page_change?
    @index == 39
  end
  #--------------------------------------------------------------------------
  # ● 判定光标位置是否在“确定”上
  #--------------------------------------------------------------------------
  def is_ok?
    @index == 29
  end
  #--------------------------------------------------------------------------
  # ●
  #--------------------------------------------------------------------------
#~   def item_rect(index)
#~     rect = Rect.new
#~     rect.x = index % 10 * 40# + index % 10 / 5 * 16
#~     rect.y = index / 10 * line_height
#~     rect.width = 40
#~     rect.height = line_height
#~     rect
#~   end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    change_color(normal_color)
    90.times {|i| draw_text(item_rect(i), table[@page], 1) }
  end
  #--------------------------------------------------------------------------
  # ● 更新光标
  #--------------------------------------------------------------------------
  def update_cursor
    cursor_rect.set(item_rect(@index))
  end
  #--------------------------------------------------------------------------
  # ● 判定光标是否可以移动
  #--------------------------------------------------------------------------
  def cursor_movable?
    active
  end
  #--------------------------------------------------------------------------
  # ● 光标向下移动
  #     wrap : 允许循环
  #--------------------------------------------------------------------------
  def cursor_down(wrap)
    if @index < 30 or wrap
      @index = (index + 10) % 40
    end
  end
  #--------------------------------------------------------------------------
  # ● 光标向上移动
  #     wrap : 允许循环
  #--------------------------------------------------------------------------
  def cursor_up(wrap)
    if @index >= 10 or wrap
      @index = (index + 30) % 40
    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_pagedown
    @page = (@page + 1) % table.size
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 向上一页移动
  #--------------------------------------------------------------------------
  def cursor_pageup
    @page = (@page + table.size - 1) % table.size
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 处理光标的移动
  #--------------------------------------------------------------------------
  def process_cursor_move
    last_page = @page
    super
    update_cursor
    Sound.play_cursor if @page != last_page
  end
  #--------------------------------------------------------------------------
  # ● “确定”、“删除字符”和“取消输入”的处理
  #--------------------------------------------------------------------------
  def process_handling
    return unless open? && active
    process_jump if Input.trigger?(:A)
    process_back if Input.repeat?(:B)
    process_ok   if Input.trigger?(:C)
  end
  #--------------------------------------------------------------------------
  # ● 跳转“确定”
  #--------------------------------------------------------------------------
  def process_jump
    if @index != 40
      @index = 40
      Sound.play_cursor
    end
  end
  #--------------------------------------------------------------------------
  # ● 后退一个字符
  #--------------------------------------------------------------------------
  def process_back
    Sound.play_cancel if @edit_window.back
  end
  #--------------------------------------------------------------------------
  # ● 按下确定键时的处理
  #--------------------------------------------------------------------------
  def process_ok
    if !character.empty?
      on_name_add
    elsif is_page_change?
      Sound.play_ok
      cursor_pagedown
    elsif is_ok?
      on_name_ok
    end
  end
  #--------------------------------------------------------------------------
  # ● 添加名字字符
  #--------------------------------------------------------------------------
  def on_name_add
    if @edit_window.add(character)
      Sound.play_ok
    else
      Sound.play_buzzer
    end
  end
  #--------------------------------------------------------------------------
  # ● 确定名字
  #--------------------------------------------------------------------------
  def on_name_ok
    call_ok_handler
  end
  
  def col_max
    10
  end
  def row_max
    4
  end
  def item_max
    40
  end
  def spacing
    3
  end
end
[/pre]

点评

你用这么多脚本很容易冲突..  发表于 2014-9-1 23:44
恩,就是还有个问题没解决(宠物进阶那块,宠物要进化成什么无法用鼠标点,点了就会错误)。如果没时间的话可以不理这句话  发表于 2014-8-30 17:02
那。蟹蟹~梦妖萌萌哒~  发表于 2014-8-30 16:54
回复

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部