Accueil du SiteAccueil du Site  AccueilAccueil  Dernières imagesDernières images  RechercherRechercher  ConnexionConnexion  S'enregistrerS'enregistrer  



Le Deal du moment :
Cartes Pokémon 151 : où trouver le ...
Voir le deal

Partagez
 

 [VX] Pop Up nom de la map

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Elekami
Fondateur
Fondateur
Elekami

Masculin
Messages postés : 19071
Date d'inscription : 19/07/2008
Jauge LPC :
[VX] Pop Up nom de la map 8915271400100 / 100100 / 100[VX] Pop Up nom de la map 8915271400

[VX] Pop Up nom de la map Pater_10
[VX] Pop Up nom de la map Staffe10
[VX] Pop Up nom de la map Mythe_10
[VX] Pop Up nom de la map Membre11
[VX] Pop Up nom de la map Doyen10
[VX] Pop Up nom de la map Scanar10
[VX] Pop Up nom de la map Compos10
[VX] Pop Up nom de la map Testeu10
[VX] Pop Up nom de la map Membre15
[VX] Pop Up nom de la map Partag10
[VX] Pop Up nom de la map Projet10
[VX] Pop Up nom de la map Projet16
[VX] Pop Up nom de la map Riche_10
[VX] Pop Up nom de la map Travai10
[VX] Pop Up nom de la map Collec10
[VX] Pop Up nom de la map Collec11
[VX] Pop Up nom de la map Collec12
[VX] Pop Up nom de la map Collec13
[VX] Pop Up nom de la map Connar10


[VX] Pop Up nom de la map Empty
MessageSujet: [VX] Pop Up nom de la map   [VX] Pop Up nom de la map EmptyVen 3 Sep 2010 - 17:13



auteur: Dargor
Rpg Maker Vx
A chaque Téléportation de map, en haut, une boite de dialogue s'affiche pour donner le nom
de la map puis s'efface.

Code:
#=========================================================================

# ** Map Name Popup
#------------------------------------------------------------------------------
# © Dargor, 2008
# 06/03/08
# Version 1.0
#------------------------------------------------------------------------------
# INSTRUCTIONS:
# - Paste this above main
# - Edit the Exclude_Maps array in the Map_Name_Popup module
# VERSION HISTORY:
# - 1.0 (06/03/08), Initial release
#==============================================================================

#==============================================================================
# ** Map Name Popup Configuration
#==============================================================================

module Map_Name_Popup
# These maps will not popup the name window
Exclude_Maps = [2,3]
end

#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
# This class handles maps. It includes scrolling and passage determination
# functions. The instance of this class is referenced by $game_map.
#==============================================================================

class Game_Map
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :show_name
#--------------------------------------------------------------------------
# Alias Listing
#--------------------------------------------------------------------------
alias dargor_map_name_window_setup setup
#--------------------------------------------------------------------------
# * Setup
# map_id : map ID
#--------------------------------------------------------------------------
def setup(map_id)
dargor_map_name_window_setup(map_id)
@show_name = true
end
#--------------------------------------------------------------------------
# * Get Map ID
#--------------------------------------------------------------------------
def name
map_infos = load_data("Data/MapInfos.rvdata")
name = map_infos[@map_id].name
name.gsub!(/\N[([0-9]+)]/i) { $game_actors[$1.to_i].name }
return name
end
end

#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
# This class brings together map screen sprites, tilemaps, etc. It's used
# within the Scene_Map class.
#==============================================================================

class Spriteset_Map
#--------------------------------------------------------------------------
# Alias Listing
#--------------------------------------------------------------------------
alias dargor_spriteset_name_window_initialize initialize
alias dargor_spriteset_name_window_update update
alias dargor_spriteset_name_window_dispose dispose
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
create_windows
dargor_spriteset_name_window_initialize
update
end
#--------------------------------------------------------------------------
# * Create Windows
#--------------------------------------------------------------------------
def create_windows
@name_window = Window_MapName.new
if $game_map.show_name
@name_window.show_name($game_map.name, 128)
end
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
dargor_spriteset_name_window_update
@name_window.update
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
dargor_spriteset_name_window_dispose
@name_window.dispose
end
end

#==============================================================================
# ** Window_MapName
#------------------------------------------------------------------------------
# This window shows the map name when the player is transfered.
#==============================================================================

class Window_MapName < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(name="", count=128)
super(0, 0, 544, 64)
self.visible = false
self.openness = 0
@name = name
@count = count
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
#return unless $game_map.display_name
self.visible = true
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(0,0,504,32,@name,1)
$game_map.show_name = false
end
#--------------------------------------------------------------------------
# * Show Name
#--------------------------------------------------------------------------
def show_name(name=@name, count=@count)
return if Map_Name_Popup::Exclude_Maps.include?($game_map.map_id)
@name = name
@count = count
refresh
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
unless $scene.is_a?(Scene_Map)
self.visible = false
return
end
if self.visible
if @count == 0
self.openness -= 24
self.visible = false if self.openness == 0
return
end
self.openness += 24
@count -= 1
end
end
end
Revenir en haut Aller en bas
https://www.ledijonshow.fr https://twitter.com/EleKoptes
Afr0man
Chevalier (niveau 4)
Chevalier (niveau 4)
Afr0man

Messages postés : 118
Date d'inscription : 20/08/2010
Jauge LPC :
[VX] Pop Up nom de la map 89152714007 / 1007 / 100[VX] Pop Up nom de la map 8915271400


[VX] Pop Up nom de la map Empty
MessageSujet: Re: [VX] Pop Up nom de la map   [VX] Pop Up nom de la map EmptyVen 3 Sep 2010 - 17:36

En haut a droite et en jaune nan??
Revenir en haut Aller en bas
http://www.neone.forumactif.org
 
[VX] Pop Up nom de la map
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Le Palais Créatif :: ~ PARTAGE ~ :: Scripts et plugins :: RPG Maker VX :: Autres-
Sauter vers: