Message blip delay changed
This commit is contained in:
		
							parent
							
								
									eee13befa7
								
							
						
					
					
						commit
						d0fb509fa5
					
				
					 1 changed files with 10 additions and 6 deletions
				
			
		| 
						 | 
					@ -5,6 +5,7 @@
 | 
				
			||||||
#==============================================================================
 | 
					#==============================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Window_Message < Window_Selectable
 | 
					class Window_Message < Window_Selectable
 | 
				
			||||||
 | 
					  BLIP_TIME = 4
 | 
				
			||||||
  #--------------------------------------------------------------------------
 | 
					  #--------------------------------------------------------------------------
 | 
				
			||||||
  # * Object Initialization
 | 
					  # * Object Initialization
 | 
				
			||||||
  #--------------------------------------------------------------------------
 | 
					  #--------------------------------------------------------------------------
 | 
				
			||||||
| 
						 | 
					@ -21,7 +22,7 @@ class Window_Message < Window_Selectable
 | 
				
			||||||
    @opaque = true # set to false if we're not rendering the window bg
 | 
					    @opaque = true # set to false if we're not rendering the window bg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @text_pause = 0
 | 
					    @text_pause = 0
 | 
				
			||||||
    @blip = false
 | 
					    @blip = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Text drawing flags
 | 
					    # Text drawing flags
 | 
				
			||||||
    @text = nil
 | 
					    @text = nil
 | 
				
			||||||
| 
						 | 
					@ -81,7 +82,7 @@ class Window_Message < Window_Selectable
 | 
				
			||||||
  #--------------------------------------------------------------------------
 | 
					  #--------------------------------------------------------------------------
 | 
				
			||||||
  def refresh
 | 
					  def refresh
 | 
				
			||||||
    # Initialize
 | 
					    # Initialize
 | 
				
			||||||
    @blip = true
 | 
					    @blip = BLIP_TIME
 | 
				
			||||||
    @text = ''
 | 
					    @text = ''
 | 
				
			||||||
    y = -1
 | 
					    y = -1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -183,7 +184,7 @@ class Window_Message < Window_Selectable
 | 
				
			||||||
    return if !@drawing_text
 | 
					    return if !@drawing_text
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Get 1 text character in c (loop until unable to get text)
 | 
					    # Get 1 text character in c (loop until unable to get text)
 | 
				
			||||||
    while ((c = @text.slice!(/./m)) != nil)
 | 
					    while ((c = @text.slice!(0)) != nil)
 | 
				
			||||||
      # \n
 | 
					      # \n
 | 
				
			||||||
      if c == "\n"
 | 
					      if c == "\n"
 | 
				
			||||||
        @text_x = 0
 | 
					        @text_x = 0
 | 
				
			||||||
| 
						 | 
					@ -330,9 +331,12 @@ class Window_Message < Window_Selectable
 | 
				
			||||||
      if @text_pause > 0
 | 
					      if @text_pause > 0
 | 
				
			||||||
        @text_pause -= 1
 | 
					        @text_pause -= 1
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
        Audio.se_play('Audio/SE/text.wav', 70) unless @text.empty? if @blip
 | 
					        if @blip >= BLIP_TIME
 | 
				
			||||||
        @blip = !@blip
 | 
					          Audio.se_play('Audio/SE/text.wav', 70) unless @text.empty?
 | 
				
			||||||
        #tick
 | 
					          @blip = 0
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          @blip += 1
 | 
				
			||||||
 | 
					        end
 | 
				
			||||||
        tick
 | 
					        tick
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue