Advertisement
Kakakadafi

TheoAllen - VX Style Choices (Shaz's Mouse Script Support)

May 30th, 2015
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.73 KB | None | 0 0
  1. # =============================================================================
  2. # GAME LU GA BOLEH NEP!
  3. # =============================================================================
  4. class Window_Message < Window_Base
  5.   def update_choice_cursor
  6.     mx, my = *Mouse.position
  7.     for i in 0..$game_message.choices.size - 1
  8.       px = Graphics.width - self.width + cursor_rect.x
  9.       py = Graphics.height - self.height + @choice_y + (i * line_height)
  10.       if mx.between?(px, px + cursor_rect.width) &&
  11.         my.between?(py, py + cursor_rect.height)
  12.         Sound.play_cursor if @choice_index != i
  13.         cursor_rect.y = @choice_y + @choice_index * line_height
  14.         @choice_index = i
  15.         break
  16.       end
  17.     end
  18.   end
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement