Cerca nel Forum
Showing results for tags 'Window_MenuPlus'.
Trovato 1 risultato
-
Nome Script: Window_MenuPlus Versione: 1.0 Autore/i: Melosx Informazioni: Aggiunge tempo di gioco, luogo e passi al menu. Screenshot: Istruzioni: Copiare sotto materials e sopra Main Script: #============================================================================= # ** Window_MenuPlus #============================================================================= # Autore: Melosx # Piattaforma: RGSS3 # Versione: 1.0 => 26-12-2011 #============================================================================= class Window_MenuPlus < Window_Base def initialize(x, y) super(x, y, 160, 176) refresh end def update super sec = (Graphics.frame_count / Graphics.frame_rate) % 60 if sec > @total_sec % 60 or sec == 0 refresh end end def refresh self.contents.clear @total_sec = Graphics.frame_count / Graphics.frame_rate ora = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 tempo = sprintf("%02d:%02d:%02d", ora, min, sec) self.contents.draw_text(0, 10, 130 ,56, tempo, 2) self.contents.draw_text(0, -10, 130, 56, "Tempo:", 0) self.contents.draw_text(0, 40, 130, 56, "Luogo:", 0) if $game_map.display_name.empty? self.contents.draw_text(0, 60, 130, 56, "-", 2) else self.contents.draw_text(0, 60, 130, 56, $game_map.display_name, 2) end self.contents.draw_text(0, 90, 130, 56, "Passi:", 0) self.contents.draw_text(0, 110, 130, 56, $game_party.steps.to_s, 2) end end #============================================================================ # ** Scene_Menu #============================================================================= class Scene_Menu < Scene_MenuBase alias msx_start start unless $@ def start msx_start @menu_plus = Window_MenuPlus.new(0, 192) end alias msx_terminate terminate unless $@ def terminate @menu_plus.dispose msx_terminate end alias msx_update update unless $@ def update @menu_plus.update msx_update end end