Skip to content

Commit

Permalink
[MenuScreen_while_Message]: simplified code
Browse files Browse the repository at this point in the history
regendo committed Aug 11, 2013

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 9098bb9 commit d25614f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions MenuScreen_while_message/menuscreen_while_message.rb
Original file line number Diff line number Diff line change
@@ -38,8 +38,10 @@ module Menu_during_Message
end

class Window_Message < Window_Base

BUTTON = Regendo::Menu_during_Message::BUTTON
NOCALLMENU = Regendo::Menu_during_Message::NOCALLMENU

alias update_old update
def update
update_old
@@ -55,26 +57,24 @@ def call_menu
def input_pause
self.pause = true
wait(10)
case BUTTON
when Input::B
Fiber.yield until Input.trigger?(:C)
when Input::C
Fiber.yield until Input.trigger?(:B)
else

case BUTTON
when Input::B
Fiber.yield until Input.trigger?(:C)
when Input::C
Fiber.yield until Input.trigger?(:B)
else
Fiber.yield until Input.trigger?(:B) || Input.trigger?(:C)
end
end

Input.update
self.pause = false
end

def forbidden_scene_by_regendo
if NOCALLMENU
a = NOCALLMENU.any? do |scene|
SceneManager.scene_is?(scene)
end
a
else
false
return false unless NOCALLMENU
NOCALLMENU.any? do |scene|
SceneManager.scene_is?(scene)
end
end
end

0 comments on commit d25614f

Please sign in to comment.