Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Vai al contenuto

Rpg²S Forum uses cookies. Read the Privacy Policy for more info. To remove this message, please click the button to the right:    I accept the use of cookies

Screen Contest #90

Kamikun






  • Si prega di effettuare il log in prima di rispondere
Scene_Option non refresha - - - - -

    Frash
  • Utente occasionale

  • Utenti
  • Rens: 1
  • 0
  • StellettaStelletta
  • 139 messaggi
  • Sesso:Maschio
  • Provenienza:Italia
  • Abilità:Adepto

#1 Inviato 22 September 2018 - 19:46 PM

Stavo pensando di fare il menu delle opzioni per lo Scene_Title ma mi sono imbattuto in un errore abbastanza "stupido" che non riesco a risolvere per mancanza di competenze.

Quando entro nelle opzioni, mentre quando premo alla cieca (Il menu non appare ma i tasti se schiacciati si sentono), per tornare allo Scene_Title, mi compare il menu e non se ne va più.

 

Secondo me è un problema di refresh o update dei frame, come potrei risolvere?

#===============================================================================
# OPTION MENU - USERNAME RPG2S
#===============================================================================

  class Scene_Option
    
#-------------------------------------------
#     INIZIALIZZAZIONE DELLA SCHERMATA
#------- Iniziare dal primo select ---------

  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  
#-------------------------------------------
#                  MENU
#-------------------------------------------
  
  def main
      $game_system = Game_System.new
      @sprite = Sprite.new
      @sprite.bitmap = RPG::Cache.title($data_system.title_name)
      s1 = "Musica"
      s2 = "Effetti Sonori"
      s3 = "Schermo Intero"
      s4 = "Finestra"
      s5 = "Indietro"
      @command_window = Window_Command.new(640, [s1, s2, s3, s4, s5])
      @command_window.index = @menu_index
      @command_window.x = 0
      @command_window.y = 0
    loop do
      # Aggiornamento della schermata
      Graphics.update
      # Aggiornamento informazioni
      Input.update
      # Aggiornamento frame
      update
      # Togli loop se la schermata dovesse cambiare
      if $scene != self
        break
      end
    end
  end

#-------------------------------------------
#                 UPDATE
#-------------------------------------------

  def update
    # Aggiornamento finestra
    @command_window.update
    # Se C viene premuto
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 0  # Scelta musica
        command_music
      when 1  # Regolazione effetti sonori
        command_effects
      when 2  # Regolazione schermo intero
        command_fullscreen
      when 3  # Regolazione finestra
        command_windowed
      when 4  # Indietro
        command_back
      end
    end
  end
  
#-------------------------------------------
#         REGOLAZIONE MUSICA - BGM
#-------------------------------------------  

#-------------------------------------------
#     REGOLAZIONE EFFETTI SONORI - SFX
#-------------------------------------------  

#-------------------------------------------
#       SCHERMO INTERO - FULL SCREEN
#-------------------------------------------  

#-------------------------------------------
#           FINESTRA - WINDOWED
#-------------------------------------------  

#-------------------------------------------
#            INDIETRO - RETURN
#------------------------------------------- 

 def command_back
    $scene = Scene_Title.new
  end

#------ FINE SCRIPT ------#
 
end

Ovviamente lo script è da finire e credo lo posterò appena terminato qui sul forum.






  • Feed RSS