Vai al contenuto


Toggle Chat RM - Chat Apri la Chat in un popup

E' severamente vietato richiedere supporto su RPG Maker in chat!
@  Pech93 : (22 May 2012 - 06:48 PM) Night l'hai visto???
@  Pech93 : (22 May 2012 - 06:42 PM) night MP
@  Pech93 : (22 May 2012 - 06:42 PM) Ciaoooooooooo
@  Night : (22 May 2012 - 06:35 PM) bene, mi sto allenando sui disegni, ho in mente molte scene disegnate da presentare nel gioco
@  Night : (22 May 2012 - 06:35 PM) so di essere un po' in ritardo, ma rispondo lo stesso XD
@  NoxChibi : (22 May 2012 - 02:59 PM) hi night come procede il tuo progetto?
@  Night : (22 May 2012 - 02:56 PM) buongiornooo :3
@  MihaChan : (22 May 2012 - 01:20 PM) lol
@  MihaChan : (22 May 2012 - 01:20 PM) !!oaiC
@  Melosx : (22 May 2012 - 12:47 PM) ^.^ !!nahCahiM oaiC
@  MihaChan : (22 May 2012 - 12:41 PM) buonsalve
@  Melosx : (22 May 2012 - 12:28 PM) cmq buongiorno a tutti
@  Melosx : (22 May 2012 - 12:28 PM) Dimmi Nox
@  MihaChan : (22 May 2012 - 12:07 PM) Illusi ghgh
@  MihaChan : (22 May 2012 - 12:06 PM) Gli piacerebbe.... xDDDD
@  MihaChan : (22 May 2012 - 12:06 PM) e Francesi che dicono che il Ferrero Rocher è Francese....
@  MihaChan : (22 May 2012 - 12:06 PM) Tedeschi che dicono che la Nutella, il Kinder Cioccolato e L'ovetto Kinder sono tedeschi...
@  MihaChan : (22 May 2012 - 12:06 PM) Ah
@  NoxChibi : (21 May 2012 - 10:20 PM) melosx
@  NoosiTD : (21 May 2012 - 05:10 PM) lololo

Colonne Multiple in Command Window


  • Per cortesia connettiti per rispondere
1 risposta a questa discussione

#1 OFFLINE   Ally

Ally

    Fondatori

  • Amministratori
  • 5558 Messaggi:
  • Localitàrpgmkr
  • Ruolo:
    Scripter
  • Progetto VX:
    Essence
  • Tool:
    RM2k/2k3

Inviato 08 January 2012 - 07:44 PM

Nome Script: Colonne Multiple in Command Window
Versione: N/D
Autore/i: bStefan

Informazioni:
Questo script aggiunge una nuova classe Window_HorizontalCommand.
HorizontalCommand può mostrare più colonne una accanto all'altra (ad esempio nella selezione delle scelte). Inoltre, sia window_width che item_width vengono calcolati automaticamente quindi nulla viene tagliato.

Screenshots:
Spoiler

Istruzioni:
Inserite lo script sotto Material.
Istruzioni all'interno dello script.

Script:
#==========================================
# Multiple Cols Command Window
#==========================================
# by bStefan aka. regendo
# requested by monstrumgod
# : http://www.rpgmakervxace.net/index.php?/user/313-monstrumgod/
# please give credit if used
#==========================================
# C&P this as a new script above Main
#==========================================

#============================================================
#                         HOW TO USE
#============================================================
# 1. make a new window class
#   class Window_Something < Window_HorizontalCommand
# 2. add commands to Window_Something#make_command_list
#   add_command("Displayed_Name", :symbol, condition)
# example:
#   add_command("Give Item", :give, $game_variables[0] > 5)
# 3. make a scene use this window
#   @command_window = Window_Something.new
#   @command_window.set_handler(:give, method(:give_item))
# 4. define that method
#   def give_item
#     #code
#   end
# 5. ???
# 6. Profit.
#============================================================


module Regendo

  unless @scripts
    @scripts = Hash.new
    def self.contains?(key)
      @scripts[key] == true
    end
  end
  @scripts["Horizontal_Command"] = true

  module Horizontal_Command
    #==============
    # CONFIG
    #==============

        #spacing in pixels
    def self.spacing
      32
    end

        #padding in pixels
    def self.standard_padding
      12
    end

        #number of columns if no number is given upon calling intialize 
    def self.standard_cols
      2
    end
  end
end
  #==============
  # Script
  #==============
class Window_HorizontalCommand < Window_Command  
  def initialize(x = 0, y = 0, cols = standard_cols, width = "fitting")
    col_max(cols)
    @list = []
    make_command_list
    width == "fitting" ? window_width(fitting_width) : window_width(width)
    clear_command_list
    super(x, y)
  end
  # the value is only so that window_width can be called without specifying
  # : width. Changing the standard value from 255 to something else, unless
  # : it's a method, will not actually change the result.
  def window_width(width = 255)
    @width ? @width : @width = width
    @width > Graphics.width ? @width = Graphics.width : @width
  end

  def col_max(cols = standard_cols)
    @cols ? @cols : @cols = cols
  end

  def visible_line_number
    row_max
  end

  def fitting_width
    (item_width + spacing) * col_max - spacing + standard_padding * 2
  end

 def item_width
  bmp = Bitmap.new(1,1)
  length = []
  @list.each do |index|
   length.push((bmp.text_size(index[:name])).width)
  end
  if @width
   if length.max > (@width - standard_padding * 2 + spacing) / col_max - spacing
      (@width - standard_padding * 2 + spacing) / col_max - spacing
   else
      length.max
   end
  else
   length.max
  end
 end

  def spacing
    Regendo::Horizontal_Command::spacing
  end

  def standard_padding
    Regendo::Horizontal_Command::standard_padding
  end

  def standard_cols
    Regendo::Horizontal_Command::standard_cols
  end

end

Incompatibilità:
N/D
Immagine inserita
Spoiler

#2 ONLINE   Melosx

Melosx

    Maker di rpgmkr.net

  • RM-Dreamers
  • 894 Messaggi:
  • LocalitàAvola
  • Ruolo:
    Scripter
  • Progetto Ace:
    Menu Chora
  • Tool:
    RPG Maker VX/VX Ace

Inviato 10 January 2012 - 03:10 PM

utile ma piccola nota per tutti... Nell'Ace la HorizzontalCommand di defauòt c'è si chiama HorzCommand... magari avrebbe potuto aggiungere funzionalità a quella al posto di ricreare il tutto... comnque resta un buon script
Immagine inserita
Immagine inserita
Immagine inserita
Immagine inserita

Immagine inserita
Immagine inserita

Targhette vinte nei contest
Spoiler

from skype with love
Spoiler




1 utente(i) stanno leggendo questa discussione

0 utenti, 1 ospiti, 0 utenti anonimi