Window_Message类158行左右加上标注的这句
# 输入数值的情况 if $game_temp.num_input_variable_id > 0 #=================================================== self.width = 50 + $game_temp.num_input_digits_max * 18 #=================================================== digits_max = $game_temp.num_input_digits_max number = $game_variables[$game_temp.num_input_variable_id] @input_number_window = Window_InputNumber.new(digits_max) @input_number_window.number = number @input_number_window.x = self.x + 8 @input_number_window.y = self.y + $game_temp.num_input_start * 32 end end
# 输入数值的情况
if $game_temp.num_input_variable_id > 0
#===================================================
self.width = 50 + $game_temp.num_input_digits_max * 18
#===================================================
digits_max = $game_temp.num_input_digits_max
number = $game_variables[$game_temp.num_input_variable_id]
@input_number_window = Window_InputNumber.new(digits_max)
@input_number_window.number = number
@input_number_window.x = self.x + 8
@input_number_window.y = self.y + $game_temp.num_input_start * 32
end
end
如果想让对话框居中的话可以再加一句
- self.x = 640 - self.width >> 1
复制代码 |