Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #*******************************************************************************************
- #
- # * Imitation Menu - Witch's House *
- #
- # for RGSS2
- #
- # Ver 1.1.0 2016.08.12
- #
- # Author:魂(Lctseng),Bahamut Forum ID:play123
- #
- # Please keep this label reprinted
- #
- # Home link:http://home.gamer.com.tw/homeindex.php?owner=play123
- #
- # Description:
- # A menu similar to Witch's House
- #
- #
- # Update Log:
- # Ver 1.0.0 :
- # Date:2014.02.13
- # Summary:First release
- # A menu similar to Witch's House
- #
- # Ver 1.1.0 :
- # Date:2016.08.12
- # Summary:Fixed size problem
- #
- #
- # Summary:
- # The following categories can be modiefied or redefined:
- # 1.Scene_Menu
- # 2.Scene_File
- # 3.Scene_End
- # 4.Window_MenuStatus
- #
- #*******************************************************************************************
- #*******************************************************************************************
- #
- # DO NOT MODIFY UNLESS YOU KNOW WHAT TO DO !
- #
- #*******************************************************************************************
- #==============================================================================
- # ■ Scene_Menu
- #------------------------------------------------------------------------------
- # Class that handles menu screen
- #==============================================================================
- class Scene_Menu < Scene_Base
- #--------------------------------------------------------------------------
- # ● Start processing
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- create_command_window
- @gold_window = Window_Gold.new(0, 360)
- @gold_window.visible = false
- @status_window = Window_MenuStatus.new(160, 0)
- @status_window.y = Graphics.height - @status_window.height
- @command_window.y = Graphics.height - @status_window.height + (@status_window.height - @command_window.height ) / 2
- end
- #--------------------------------------------------------------------------
- # ● Create command window
- #--------------------------------------------------------------------------
- def create_command_window
- s1 = Vocab::item
- s5 = Vocab::save
- s6 = Vocab::game_end
- @command_window = Window_Command.new(160, [s1, s5 , s6])
- @command_window.index = @menu_index
- if $game_party.members.size == 0 # If no party members
- @command_window.draw_item(0, false) # Invalid item option
- end
- if $game_system.save_disabled # If save is not allowed
- @command_window.draw_item(1, false) # Invalid save option
- end
- end
- #--------------------------------------------------------------------------
- # ● Update command selection
- #--------------------------------------------------------------------------
- def update_command_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Map.new
- elsif Input.trigger?(Input::C)
- if $game_party.members.size == 0 and @command_window.index < 1
- Sound.play_buzzer
- return
- elsif $game_system.save_disabled and @command_window.index == 1
- Sound.play_buzzer
- return
- end
- Sound.play_decision
- case @command_window.index
- when 0 # Item
- $scene = Scene_Item.new
- when 1 # File
- $scene = Scene_File.new(true, false, false)
- when 2 # End game
- $scene = Scene_End.new
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● Actor update selection
- #--------------------------------------------------------------------------
- def update_actor_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- end_actor_selection
- elsif Input.trigger?(Input::C)
- end
- end
- end
- #==============================================================================
- # ■ Scene_File
- #------------------------------------------------------------------------------
- # Class of file and end scene screen
- #==============================================================================
- class Scene_File < Scene_Base
- #--------------------------------------------------------------------------
- # ● Return to original scene
- #--------------------------------------------------------------------------
- def return_scene
- if @from_title
- $scene = Scene_Title.new
- elsif @from_event
- $scene = Scene_Map.new
- else
- $scene = Scene_Menu.new(1)
- end
- end
- end
- #==============================================================================
- # ■ Scene_End
- #------------------------------------------------------------------------------
- # Class that handles end scene
- #==============================================================================
- class Scene_End < Scene_Base
- #--------------------------------------------------------------------------
- # ● Return to original scene
- #--------------------------------------------------------------------------
- def return_scene
- $scene = Scene_Menu.new(2)
- end
- end
- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # Windows displays menu screen and status counterpart
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● Initialize object
- # x : X window coordinate
- # y : Y window coordinate
- #--------------------------------------------------------------------------
- def initialize(x, y)
- super(x, y, 384, 120)
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # ● Refresh
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.members.size
- for actor in $game_party.members
- draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
- x = 104
- y = actor.index * 96 + WLH / 2
- draw_actor_name(actor, x, y)
- draw_actor_class(actor, x + 120, y)
- draw_actor_level(actor, x, y + WLH * 1)
- draw_actor_state(actor, x, y + WLH * 2)
- draw_actor_hp(actor, x + 120, y + WLH * 1)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement