2 changes to basic text boxes
-If niko's character graphic is one of the gasmask graphics, change all his facepics to the gasmask facepic -User can now prompt text to show instantly by pressing action or cancel while text is scrolling
This commit is contained in:
parent
99fbdf04cc
commit
ad48a874df
|
|
@ -28,6 +28,7 @@ class Window_Message < Window_Selectable
|
||||||
@text = nil
|
@text = nil
|
||||||
@text_y = @text_x = 0
|
@text_y = @text_x = 0
|
||||||
@drawing_text = false # set to true when message text is drawing
|
@drawing_text = false # set to true when message text is drawing
|
||||||
|
@skip_text = false
|
||||||
|
|
||||||
# Number/Choices
|
# Number/Choices
|
||||||
self.active = false
|
self.active = false
|
||||||
|
|
@ -157,6 +158,11 @@ class Window_Message < Window_Selectable
|
||||||
|
|
||||||
# Blit face graphic
|
# Blit face graphic
|
||||||
if $game_temp.message_face != nil
|
if $game_temp.message_face != nil
|
||||||
|
if $game_player.character_name == "niko_gasmask" || $game_player.character_name == "niko_bulb_gasmask"
|
||||||
|
if $game_temp.message_face.start_with?("niko")
|
||||||
|
$game_temp.message_face = "niko_gasmask"
|
||||||
|
end
|
||||||
|
end
|
||||||
face = RPG::Cache.face($game_temp.message_face)
|
face = RPG::Cache.face($game_temp.message_face)
|
||||||
self.contents.blt(self.contents.width - 96, 0, face, Rect.new(0, 0, 96, 96))
|
self.contents.blt(self.contents.width - 96, 0, face, Rect.new(0, 0, 96, 96))
|
||||||
end
|
end
|
||||||
|
|
@ -229,20 +235,29 @@ class Window_Message < Window_Selectable
|
||||||
end
|
end
|
||||||
self.contents.fill_rect(self.contents.width - 96, 0, 96, 96, Color.new(0,0,0,0))
|
self.contents.fill_rect(self.contents.width - 96, 0, 96, 96, Color.new(0,0,0,0))
|
||||||
$game_temp.message_face = face_name
|
$game_temp.message_face = face_name
|
||||||
|
if $game_player.character_name == "niko_gasmask" || $game_player.character_name == "niko_bulb_gasmask"
|
||||||
|
if $game_temp.message_face.start_with?("niko")
|
||||||
|
$game_temp.message_face = "niko_gasmask"
|
||||||
|
end
|
||||||
|
end
|
||||||
face = RPG::Cache.face($game_temp.message_face)
|
face = RPG::Cache.face($game_temp.message_face)
|
||||||
self.contents.blt(self.contents.width - 96, 0, face, Rect.new(0, 0, 96, 96))
|
self.contents.blt(self.contents.width - 96, 0, face, Rect.new(0, 0, 96, 96))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if c == "\004"
|
if c == "\004"
|
||||||
@drawing_text = false
|
@drawing_text = false
|
||||||
|
@skip_text = false
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
# Draw text
|
# Draw text
|
||||||
self.contents.draw_text(4 + @text_x, 24 * @text_y, 40, 24, c)
|
self.contents.draw_text(4 + @text_x, 24 * @text_y, 40, 24, c)
|
||||||
# Add x to drawn text width
|
# Add x to drawn text width
|
||||||
@text_x += self.contents.text_size(c).width
|
@text_x += self.contents.text_size(c).width
|
||||||
|
if !@skip_text
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
@skip_text = false
|
||||||
|
|
||||||
# If text is empty, set up choices/numbers and indicate that we're done
|
# If text is empty, set up choices/numbers and indicate that we're done
|
||||||
if @text.empty?
|
if @text.empty?
|
||||||
|
|
@ -362,6 +377,9 @@ class Window_Message < Window_Selectable
|
||||||
end
|
end
|
||||||
tick
|
tick
|
||||||
end
|
end
|
||||||
|
if Input.trigger?(Input::ACTION) || Input.trigger?(Input::CANCEL)
|
||||||
|
@skip_text = true
|
||||||
|
end
|
||||||
else
|
else
|
||||||
# Handle user input
|
# Handle user input
|
||||||
if @choice_start >= 0
|
if @choice_start >= 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue