mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 13:29:54 +00:00
The game would try to catch up in frames when a window prompt was opened, so if the window was open for 140 frames the game would process the next 140 frames instantly after the game was closed. To fix this, I have the window prompt time how long it's opened and then I tell the game to sleep for however many frames it was opened for. Credits message works but does not yet have all the desired features, will finish up later.
25 lines
831 B
Ruby
25 lines
831 B
Ruby
module EdText
|
|
def self.blue_understand
|
|
Oneshot.msgbox Oneshot::Msg::YESNO, tr("Do you understand what this means?")
|
|
end
|
|
def self.info(text)
|
|
timestart = Time.now
|
|
text.gsub!("\\p", $game_oneshot.player_name)
|
|
Oneshot.msgbox Oneshot::Msg::INFO, tr(text)
|
|
$game_temp.prompt_wait = ((Time.now - timestart) * 60).round
|
|
end
|
|
def self.yesno(text)
|
|
timestart = Time.now
|
|
text.gsub!("\\p", $game_oneshot.player_name)
|
|
result = Oneshot.msgbox Oneshot::Msg::YESNO, tr(text)
|
|
$game_temp.prompt_wait = ((Time.now - timestart) * 60).round
|
|
return result
|
|
end
|
|
def self.err(text)
|
|
timestart = Time.now
|
|
text.gsub!("\\p", $game_oneshot.player_name)
|
|
result = Oneshot.msgbox Oneshot::Msg::ERR, tr(text)
|
|
$game_temp.prompt_wait = ((Time.now - timestart) * 60).round
|
|
return result
|
|
end
|
|
end
|