AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  ConnexionConnexion  



Le deal à ne pas rater :
Jeux, jouets et Lego : le deuxième à -50% (large sélection)
Voir le deal

Partagez
 

 [VX] Écran Titre

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
Manoe
Citadin Lv.7
Citadin Lv.7
Manoe


Masculin Age : 27
Avertissements : 3
Inscrit le : 02/07/2009
Messages : 189

[VX] Écran Titre Empty
MessageSujet: [VX] Écran Titre   [VX] Écran Titre Icon_minitimeSam 4 Juil 2009 - 6:43

Voila un script d'écran titre:
[VX] Écran Titre Ecrantitreff
Auteur : Euromaster?
Remarque : Tésté et opérationnel


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

# ** Scene_Title

#------------------------------------------------------------------------------

#  This class performs the title screen processing.

#==============================================================================

class Window_Basic < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize(x, y, width, height)

    super(x, y, width, height)

    self.contents = Bitmap.new(width - 32, height - 32)

    @writtentext  = ""

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    rect = Rect.new(0, 0, self.contents.text_size(@writtentext).width, self.contents.text_size(@writtentext).height)

    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))

    self.contents.draw_text(rect, @writtentext, 1)

  end

 

  def setText(newText)

      @writtentext  = newText

      refresh

  end

end





class Scene_Title < Scene_Base

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    super

    @command_window.update

    if Input.trigger?(Input::C)

      case @command_window.index

      when 0    #New game

        command_new_game

      when 1    # Continue

        command_continue

      when 2    # Shutdown

        command_shutdown

      end

    end

    case @command_window.index

      when 0  # New game

        @text_window.setText("Commencer un nouveau jeu")

      when 1  # Continue

        @text_window.setText("Charger une partie")

      when 2  # Shutdown

        @text_window.setText("Quitter le jeu")

      end

    end

      #--------------------------------------------------------------------------

  # * Dispose of Command Window

  #--------------------------------------------------------------------------

  def dispose_command_window

    @command_window.dispose

    @text_window.dispose

  end

  #--------------------------------------------------------------------------

  # * Create Command Window

  #--------------------------------------------------------------------------

  def create_command_window

    s1 = Vocab::new_game

    s2 = Vocab::continue

    s3 = Vocab::shutdown

    @text_window = Window_Basic.new(20,30,480,60)

    @text_window.setText("Starts a New Game.")

    @command_window = Window_Command.new(172, [s1, s2, s3])

    @command_window.x = 325

    @command_window.y = 95

    if @continue_enabled                    # If continue is enabled

      @command_window.index = 1            # Move cursor over command

    else                                    # If disabled

      @command_window.draw_item(1, false)  # Make command semi-transparent

    end

    @text_window.openness = 0

    @command_window.openness = 0

    @command_window.open

    @text_window.open

  end

 

    def open_command_window

    @text_window.open

    @command_window.open

    begin

      @text_window.update

      @command_window.update

      Graphics.update

    end until @command_window.openness == 255

  end

 

    def close_command_window

    @text_window.close

    @command_window.close

    begin

      @text_window.update

      @command_window.update

      Graphics.update

      @text_window.openness = @command_window.openness

    end until @command_window.openness == 0

  end

  end

Edit Raito-san: Veuillez s'il vous plait mettre les balises Codes.
Revenir en haut Aller en bas
Blockade
Ex-Admin Cruelle
Ex-Admin Cruelle
Blockade


Féminin Age : 32
Inscrit le : 03/07/2008
Messages : 2441

[VX] Écran Titre Empty
MessageSujet: Re: [VX] Écran Titre   [VX] Écran Titre Icon_minitimeSam 4 Juil 2009 - 8:28

Et j'aimerais bien que tu fasse une description brève du script merci. Ça sert à rien d'en poster à la volée comme ca tu ne gagnera pas de points.
Revenir en haut Aller en bas
Manoe
Citadin Lv.7
Citadin Lv.7
Manoe


Masculin Age : 27
Avertissements : 3
Inscrit le : 02/07/2009
Messages : 189

[VX] Écran Titre Empty
MessageSujet: Re: [VX] Écran Titre   [VX] Écran Titre Icon_minitimeSam 4 Juil 2009 - 8:32

Ben l'explication c'est le screen pour montrer comme sa donne non? :depression:
Revenir en haut Aller en bas
hinola
Voyageur Lv.10
Voyageur Lv.10
hinola


Inscrit le : 07/03/2009
Messages : 380

[VX] Écran Titre Empty
MessageSujet: Re: [VX] Écran Titre   [VX] Écran Titre Icon_minitimeSam 4 Juil 2009 - 8:36

dans le script, il y a moyen de déplacer les fenêtres?

parce que du coup, l'écran titre doit être modifié.
Revenir en haut Aller en bas
Blockade
Ex-Admin Cruelle
Ex-Admin Cruelle
Blockade


Féminin Age : 32
Inscrit le : 03/07/2008
Messages : 2441

[VX] Écran Titre Empty
MessageSujet: Re: [VX] Écran Titre   [VX] Écran Titre Icon_minitimeSam 4 Juil 2009 - 8:58

Pour la fenêtre de confirmation (Nouveau jeu...) c'est ici :
Code:
@command_window.x = 325
        @command_window.y = 95

Et pour l'autre c'est ici :
Code:
@text_window = Window_Basic.new(20,30,480,60)
20 c'est la position X (Horizontale)
30 la position Y (verticale)
480 la longueur
60 la largeur
Revenir en haut Aller en bas
Contenu sponsorisé




[VX] Écran Titre Empty
MessageSujet: Re: [VX] Écran Titre   [VX] Écran Titre Icon_minitime

Revenir en haut Aller en bas
 

[VX] Écran Titre

Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

 Sujets similaires

-
» Fusion de script d'écran titre (carte+appuyez sur start+ecran titre animé)
» Mon écran titre
» Ecran titre
» Ecran titre!
» Ecran Titre by me

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX :: Entraide :: Scripts :: Scripts VX - RGSS2 :: Écran Titre-
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Forum gratuit