Jump to content
Rpg²S Forum

*UMS Choice Window Cursor Patch [UCWCP]


Broly88
 Share

Recommended Posts

UMS Choice Window Cursor Patch

1. Descrizione

Una piccola patch al già ottimo e famosissimo script UMS di ccoa. In pratica, permette di abilitare un cursore durante la visualizzazione delle scelte (quelle avviabili tramite l'evento "Show Choices").


2. Autore

Broly88



3. Allegati

Ecco lo script e il file grafico del cursore:

post-162-1188223369.png

#==============================================================================#
# ■ UMS Choice Window Cursor Patch v1.0  -  Broly88                            #
#==============================================================================#
# REQUISITI                                                                    #
# 1) Ccoa's UMS - Universal Message System                                     #
# ---------------------------------------------------------------------------- #
# DESCRIZIONE - Questo script costituisce una piccola patch all'UMS script di  #
# Ccoa. In pratica consente l'utilizzo di un cursore durante la selezione,     #
# eseguibile attraverso l'evento "Show Choices".                               #
# ---------------------------------------------------------------------------- #
# FUNZIONAMENTO - Per abilitare o disabilitare questa funzione, è sufficiente  #
# utilizzare il seguente comando:                                              #
#  - $game_system.choice_cursor = true/false                                   #
# La grafica del cursore deve avere una dimensione di 20 x 20 pixel, deve      #
# chiamarsi "Cursore.png" e trovarsi all'interno della cartella "Picture".     #
#==============================================================================#

#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of 
#  this class.
#==============================================================================
class Game_System
  
  # Definisce il nuovo parametro di Game System
  attr_accessor :choice_cursor # Abilita o meno il cursore durante la selezione
  
  # Inizializza il nuovo parametro di Game System
  alias ucwcp_init initialize
  def initialize
    ucwcp_init
    @choice_cursor = true
  end
  
end

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

#==============================================================================
# ** Window_Choice
#------------------------------------------------------------------------------
#  This message window is used to display choices.
#==============================================================================
class Window_Choice < Window_Selectable
  
  #--------------------------------------------------------------------------
  # - Inizializzazione
  #--------------------------------------------------------------------------
  alias wc_init initialize
  def initialize(choices)
    # Chiamata originale
    wc_init(choices)
    # Disegna il cursore se è abilitato
    if $game_system.choice_cursor
      @cur = Sprite.new
      @cur.bitmap = RPG::Cache.picture("Cursore")
      @cur.z = self.z + 10
      @cur.visible = false
    end
  end  

  #--------------------------------------------------------------------------
  # - Aggiornamento (Update)
  #--------------------------------------------------------------------------
  alias wc_up update
  def update
    # Chiamata originale
    wc_up
    # Aggiorna il cursore se è abilitato
    if !@cur.disposed?
      @cur.visible = true if !@cur.visible
      @cur.x = self.x + self.width - 40
      @cur.y = self.y + (self.index * 32) + 26
    end
  end
  
  #--------------------------------------------------------------------------
  # - Aggiornamento (Refresh)
  #--------------------------------------------------------------------------
  alias wc_rf refresh
  def refresh
    # Chiamata originale
    wc_rf
    # Verifica l'abilitazione del cursore
    if $game_system.choice_cursor
      # Se il cursore "non esiste", viene ridisegnato
      if @cur.disposed? or @cur == nil
        @cur = Sprite.new
        @cur.bitmap = RPG::Cache.picture("Cursore")
        @cur.z = self.z + 10
        @cur.visible = false
      end
    else
      # Elimina il cursore se "esiste"
      if !@cur.disposed? or @cur != nil
        @cur.dispose
      end
    end
    # Aggiorna la dimensione della finestra se il cursore è abilitato
    if $game_system.choice_cursor and @cur != nil
      self.width += 16
    end
  end
  
  #--------------------------------------------------------------------------
  # - Eliminazione
  #--------------------------------------------------------------------------  
  def dispose
    super
    # Elimina il cursore se è abilitato
    @cur.dispose if @cur != nil
  end
  
  #--------------------------------------------------------------------------
  # - Visibilità del cursore
  #--------------------------------------------------------------------------  
  def set_cur_visibility(bool)
    @cur.visible = bool if @cur != nil
  end
  
end

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

#==============================================================================
# ** Window_Message
#------------------------------------------------------------------------------
#  This message window is used to display text.
#==============================================================================

class Window_Message < Window_Selectable
  
  #--------------------------------------------------------------------------
  # - Terminazione messaggio
  #--------------------------------------------------------------------------
  alias curs_tm terminate_message
  def terminate_message
    # Chiamata originale
    curs_tm
    # Imposta la visibilità del cursore della finestra delle scelte
    if $game_system.choice_cursor
      @choice_window.set_cur_visibility(@choice_window.visible)
    end
  end
  
end

 

4. Istruzioni per l'uso

Scritte nel commento all'interno dello script

Il mondo è il cancro... Io la cura...

 

Il mio sport preferito:

Gli altri --> (T_T#)O==(^_^Q) <-- IO

 

I miei alias:

http://www.naruto-kun.com/images/narutotest/shikamaru.jpg

-----------------------------------------------------

http://www.naruto-kun.com/images/narutotest/rocklee.jpg

-----------------------------------------------------

http://www.ff-fan.com/chartest/banners/auron.jpg

 

Broly88's

http://pokejungle.net/other/pokepet/trainers/e4k2.png http://pokejungle.net/other/pokepet/Charizard.gif

Flame Dancer the level 99 Charizard!

 

http://img259.imageshack.us/img259/7446/rockleeoj1.gif http://img233.imageshack.us/img233/7449/sorajm1.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...