Polraudio 122 Report post Posted January 16, 2010 Tomo's 1 Person Menu Request #1 Screenshots: Instructions: Place above main. ################################################# # Tomo's 1p Menu Request # # Credits: Polraudio, Tomo2000 # # This script is an rmxpunlimited.net exclusive # ################################################# class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index end def main s1 = $data_system.words.item s2 = $data_system.words.skill s3 = $data_system.words.equip s5 = "Save" s6 = "End Game" @command_window = Window_Command.new(160, [s1, s2, s3, s5, s6]) @command_window.index = @menu_index @command_window.x = 190 @command_window.y = 78 if $game_party.actors.size == 0 @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end if $game_system.save_disabled @command_window.disable_item(4) end @playtime_window = Window_PlayTime.new @playtime_window.x = 190 @playtime_window.y = 270 @steps_window = Window_Steps.new @steps_window.x = 190 @steps_window.y = 343 @gold_window = Window_Gold.new @gold_window.x = 190 @gold_window.y = 416 @status_window = Window_MenuStatus.new @status_window.x = 0 @status_window.y = 0 @actor = $game_party.actors[0] @status2_window = Window_Status.new(@actor) @status2_window.x = 350 @status2_window.y = 0 @menu_window = Window_Menu.new @menu_window.x = 190 @menu_window.y = 0 Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose @status_window.dispose @status2_window.dispose @menu_window.dispose end def update @command_window.update @playtime_window.update @steps_window.update @gold_window.update @status_window.update @status2_window.update @menu_window.update if @command_window.active update_command return end if @status_window.active update_status return end end def update_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) if $game_party.actors.size == 0 and @command_window.index < 4 $game_system.se_play($data_system.buzzer_se) return end case @command_window.index when 0 $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1 $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new when 3 if $game_system.save_disabled $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when 4 $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end end class Window_MenuStatus < Window_Base def initialize super(0, 0, 190, 480) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear @item_max = 1 actor = $game_party.actors[0] draw_actor_graphic(actor, 80, 75) draw_actor_name(actor, 60, 75) draw_actor_class(actor, 80, 100) draw_actor_level(actor, 0, 100) draw_actor_state(actor, 45, 0) draw_actor_exp(actor, 0, 130) draw_actor_hp(actor, 0, 160) draw_actor_sp(actor, 0, 190) draw_actor_parameter(actor, 0, 220, 0) draw_actor_parameter(actor, 0, 250, 1) draw_actor_parameter(actor, 0, 280, 2) draw_actor_parameter(actor, 0, 310, 3) draw_actor_parameter(actor, 0, 340, 4) draw_actor_parameter(actor, 0, 370, 5) draw_actor_parameter(actor, 0, 400, 6) end end class Window_Status < Window_Base def initialize(actor) super(0, 0, 290, 480) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(60, 10, 96, 32, "Equipment") self.contents.draw_text(60, 10, 96, 32, "____________") self.contents.font.color = normal_color draw_item_name($data_weapons[@actor.weapon_id], 60, 85) draw_item_name($data_armors[@actor.armor1_id], 60, 160) draw_item_name($data_armors[@actor.armor2_id], 60, 235) draw_item_name($data_armors[@actor.armor3_id], 60, 310) draw_item_name($data_armors[@actor.armor4_id], 60, 385) self.contents.draw_text(60, 50, 96, 32, $data_system.words.weapon) self.contents.draw_text(60, 125, 96, 32, $data_system.words.armor1) self.contents.draw_text(60, 200, 96, 32, $data_system.words.armor2) self.contents.draw_text(60, 275, 96, 32, $data_system.words.armor3) self.contents.draw_text(60, 350, 96, 32, $data_system.words.armor4) end def dummy draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144) draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208) draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272) draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336) draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400) end end class Window_PlayTime < Window_Base def initialize super(0, 0, 160, 73) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, -9, 120, 32, "Play Time") @total_sec = Graphics.frame_count / Graphics.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 text = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = normal_color self.contents.draw_text(4, 16, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end class Window_Steps < Window_Base def initialize super(0, 0, 160,73) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, -8, 120, 32, "Step Count") self.contents.font.color = normal_color self.contents.draw_text(4, 16, 120, 32, $game_party.steps.to_s, 2) end end class Window_Menu < Window_Base def initialize super(0, 0, 160,78) self.contents = Bitmap.new(width - 32, height - 32) refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.font.size = 45 self.contents.draw_text(15, -5, 120, 64, "Menu") self.contents.draw_text(10, -7, 120, 64, "_____") end end class Scene_End def main s1 = "To Title" s2 = "Shutdown" s3 = "Cancel" @command_window = Window_Command.new(192, [s1, s2, s3]) @command_window.x = 320 - @command_window.width / 2 @command_window.y = 240 - @command_window.height / 2 Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose if $scene.is_a?(Scene_Title) Graphics.transition Graphics.freeze end end def update @command_window.update if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Menu.new(4) return end if Input.trigger?(Input::C) case @command_window.index when 0 command_to_title when 1 command_shutdown when 2 command_cancel end return end end def command_to_title $game_system.se_play($data_system.decision_se) Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) $scene = Scene_Title.new end def command_shutdown $game_system.se_play($data_system.decision_se) Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) $scene = nil end def command_cancel $game_system.se_play($data_system.decision_se) $scene = Scene_Menu.new(4) end end Download for people with troubles with the codebox: Tomo\'s Menu Request Updated.txt 1 Tomo2000 reacted to this Share this post Link to post Share on other sites
Tomo2000 60 Report post Posted January 16, 2010 Yay :lol: It's so cool. +Rep. Share this post Link to post Share on other sites