Cerca nel Forum
Showing results for tags 'Barra Testo'.
Trovato 1 risultato
-
Nome Script: Barra Testo Versione: N/D Autore/i: Death10 Informazioni: Script che permette di visualizzare una barra con un testo nella mappa (funzione utile se si vuole far comparire il nome della mappa). Screenshots: Istruzioni: Inserite lo script sotto Material. Istruzioni all'interno dello script. Script: #============================================================================== # ** Text Bar #============================================================================== # Author: Death10 # [url="http://itbinhdan.com"]http://itbinhdan.com[/url] #============================================================================== # *Call script: # -On: $game_system.ads_option = 1 # -Off: $game_system.ads_option = 2 # -Change: # +Text: $game_system.ads_x = "Text" # +Back image: $game_system.ads_back = "Back.png" #============================================================================== DataManager.load_normal_databaseclass Game_System attr_accessor :ads attr_accessor :ads_on attr_accessor :ads_x attr_accessor :ads_option attr_accessor :ads_back alias initialize_ads initialize def initialize initialize_ads @ads = "Text Bar" @ads_back = Cache.title1($data_system.title1_name) @ads_option = 1 @ads_on = 1 @ads_x = 0 end end class TB < Window_Base def initialize super(0, 0, 544, 64) self.opacity = 0 $game_system = Game_System.new refresh end def refresh case $game_system.ads_option when 1 $game_system.ads_on = 1 $game_system.ads_x = -contents.text_size($game_system.ads).width $game_system.ads_option = 0 when 2 $game_system.ads_on = 0 $game_system.ads_option = 0 end contents.clear cx = contents.text_size($game_system.ads).width if $game_system.ads_x == 544 $game_system.ads_x = -cx else $game_system.ads_x += 0.5 end if $game_system.ads_on == 1 contents.blt(0, 0, $game_system.ads_back, Rect.new(0, 0, 544, 32), 160) contents.draw_text($game_system.ads_x, 0, cx, 32, $game_system.ads, 2) end end def open super refresh end end class Scene_Map alias caw create_all_windows def create_all_windows caw @ads = TB.new end alias update_ads update def update update_ads @ads.open end alias utp update_transfer_player def update_transfer_player utp case $game_system.ads_on when 0 @map_name_window.y = 0 when 1 @map_name_window.y = 44 end end end