O TEMA DO FÓRUM ESTÁ EM MANUTENÇÃO. FEEDBACKS AQUI: ACESSAR

XS - Popup Item

Iniciado por Musphelhein, 08/01/2013 às 08:23


Popup Item
Por Nicke

[box class=catbg2]Utilidade[/box]
Cria uma janela mostrando algumas informações sobre o item que o personagem acabar de adquirir.

[box class=catbg2]Características[/box]
► Fácil mudança de posição;
► Customização da fonte;
► Mostrar e esconder tudo na janela;
► Esconder a janela para alguns itens;

[box class=catbg2]Instalação[/box]
Insira o código na área destinada aos "Scripts Adicionais" no RPG Maker VX Ace.

[box class=catbg2]Instruções de Uso[/box]
Para ativar a janela, é necessário ativar a Switch de id 90 no evento e depois usar os comandos "Mudar Dinheiro" ou "Mudar Item". As instruções de customização da janela se encontram no script. É necessário o XS- Core, que se encontra logo abaixo.

[box class=catbg2]Código em Funcionamento[/box]


[box class=catbg2]Códigos[/box]
Código: XS - Core
#==============================================================================
#   XaiL System - Core
#   Author: Nicke
#   Created: 07/01/2012
#   Edited: 03/01/2013
#   Version: 2.1c
#==============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#
# Core script for XaiL System.
# Caution! This needs to be located before any other XS scripts.
#
# *** Only for RPG Maker VX Ace. ***
#==============================================================================
($imported ||= {})["XAIL-XS-CORE"] = true

module Colors
  #--------------------------------------------------------------------------#
  # * Colors
  #--------------------------------------------------------------------------#
  White = Color.new(255,255,255)
  LightRed = Color.new(255,150,150)
  LightGreen = Color.new(150,255,150)
  LightBlue = Color.new(150,150,255)
  DarkYellow = Color.new(225,225,20)
  Alpha = Color.new(0,0,0,128)
  AlphaMenu = 100
end
module XAIL
  module CORE
  #--------------------------------------------------------------------------#
  # * Settings
  #--------------------------------------------------------------------------#
  # Graphics.resize_screen(width, height ) 
  Graphics.resize_screen(544, 416) 
  
  # FONT DEFAULTS:
  Font.default_name = ["VL Gothic"]
  Font.default_size = 20
  Font.default_bold = false
  Font.default_italic = false
  Font.default_shadow = true
  Font.default_outline = true
  Font.default_color = Colors::White
  Font.default_out_color = Colors::Alpha
  
  # USE_TONE = true/false:
  # Window tone for all windows ingame. Default: true.
  USE_TONE = false
  
  # SAVE
  SAVE_MAX = 20       # Default 16.
  SAVE_FILE_VIS = 4   # Default 4.
  
  end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================#
# ** String
#==============================================================================#
class String
  
  def to_class(parent = Kernel)
    # // Method to convert string to class.
    chain = self.split "::"
    klass = parent.const_get chain.shift
    return chain.size < 1 ? (klass.is_a?(Class) ? klass : nil) : chain.join("::").to_class(klass)
    rescue
    nil
  end
  
  def cap_words
    # // Method to capitalize every word.
    self.split(' ').map {|w| w.capitalize }.join(' ')
  end
  
  def slice_char(char)
    # // Method to slice char.
    self.split(char).map {|w| w.sub(char, " ") }.join(" ")
  end

end
#==============================================================================#
# ** Vocab
#==============================================================================#
class << Vocab
  
  def xparam(id)
    # // Method to return xparam name.
    case id
    when 0 ; "Hit Chance"
    when 1 ; "Evasion"
    when 2 ; "Critical Chance"
    when 3 ; "Critical Evasion"
    when 4 ; "Magic Evasion"
    when 5 ; "Magic Reflection"
    when 6 ; "Counter Attack"
    when 7 ; "HP Regeneration"
    when 8 ; "MP Regeneration"
    when 9 ; "TP Regeneration"
    end
  end
  
end
#==============================================================================
# ** Sound
#==============================================================================
class << Sound
  
  def play(name, volume, pitch, type = :se)
    # // Method to play a sound. If specified name isn't valid throw an error.
    case type
    when :se   ; RPG::SE.new(name, volume, pitch).play rescue valid?(name)
    when :me   ; RPG::ME.new(name, volume, pitch).play rescue valid?(name)
    when :bgm  ; RPG::BGM.new(name, volume, pitch).play rescue valid?(name)
    when :bgs  ; RPG::BGS.new(name, volume, pitch).play rescue valid?(name)
    end
  end
  
  def valid?(name)
    # // Method to raise error if specified sound name is invalid.
    msgbox("Error. Unable to find sound file: " + name)
    exit 
  end
  
end
#==============================================================================
# ** DataManager
#==============================================================================
class << DataManager

  def savefile_max
    # // Method override, save file max.
    return XAIL::CORE::SAVE_MAX
  end
  
end
#==============================================================================
# ** DataManager
#==============================================================================
class << SceneManager
  
  def call_ext(scene_class, args = nil)
    # // Method to call a scene with arguments.
    @stack.push(@scene)
    @scene = scene_class.new(args)
  end
  
end
#==============================================================================
# ** Scene_File
#==============================================================================
class Scene_File < Scene_MenuBase
  
  def visible_max
    # // Method override, visible_max for save files.
    return XAIL::CORE::SAVE_FILE_VIS
  end
  
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# Importing font fix that will remove weird characters.
# Adding new methods such as new gauge, actor param, font text, icon drawing,
# big icon drawing and a line with a shadow.
#==============================================================================
class Window_Base < Window
  
  # // Importing Custom font fix. (Credit Lone Wolf).
  alias :process_normal_character_vxa :process_normal_character
  def process_normal_character(c, pos)
    return unless c >= ' '
    process_normal_character_vxa(c, pos)
  end unless method_defined? :process_normal_character
  
  def draw_text_ex_no_reset(x, y, text)
    # // Method to draw ex text without resetting the font.
    text = convert_escape_characters(text)
    pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
    process_character(text.slice!(0, 1), text, pos) until text.empty?
  end 
  
  alias xail_core_winbase_upt_tone update_tone
  def update_tone(*args, &block)
    # // Method to change tone of the window.
    return unless XAIL::CORE::USE_TONE
    xail_core_winbase_upt_tone(*args, &block)
  end
  
  def draw_gauge_ex(x, y, width, height, rate, color1, color2)
    # // Method to draw a gauge.
    fill_w = (width * rate).to_i
    gauge_y = y + line_height - 8
    contents.fill_rect(x, gauge_y, width + 1, height + 1, Color.new(255,255,255,64))
    contents.fill_rect(x, gauge_y, width, height, Color.new(0,0,0,100))
    contents.gradient_fill_rect(x, gauge_y, fill_w, height, color1, color2)
  end
  
  def draw_actor_param_gauge(actor, x, y, width, param_id, font, size, bar_color1, bar_color2, txt_color1, txt_color2)
    # // Method to draw actor parameters with a gauge.
    case param_id
    when 2 ; param_rate = actor.param(2) / actor.param_max(2).to_f
    when 3 ; param_rate = actor.param(3) / actor.param_max(3).to_f
    when 4 ; param_rate = actor.param(4) / actor.param_max(4).to_f
    when 5 ; param_rate = actor.param(5) / actor.param_max(5).to_f
    when 6 ; param_rate = actor.param(6) / actor.param_max(6).to_f
    when 7 ; param_rate = actor.param(7) / actor.param_max(7).to_f
    end
    contents.font.name = font
    contents.font.size = size
    contents.font.bold = true
    contents.font.shadow = false
    draw_gauge_ex(x, y - 14, width, 20, param_rate, bar_color1, bar_color2)
    contents.font.color = txt_color1
    draw_text(x + 10, y, 120, line_height, Vocab::param(param_id))
    contents.font.color = txt_color2
    draw_text(x + width - 38, y, 36, line_height, actor.param(param_id), 2)
    reset_font_settings
  end
  
  def draw_actor_xparam_gauge(actor, x, y, width, xparam_id, font, size, bar_color1, bar_color2, txt_color1, txt_color2)
    # // Method to draw actor xparameters with a gauge.
    case xparam_id
    when 0
      xparam_rate = actor.xparam(0) / 100.to_f
      xparam_name = Vocab.xparam(0)
    when 1
      xparam_rate = actor.xparam(1) / 100.to_f
      xparam_name = Vocab.xparam(1)
    when 2
      xparam_rate = actor.xparam(2) / 100.to_f
      xparam_name = Vocab.xparam(2)
    when 3
      xparam_rate = actor.xparam(3) / 100.to_f
      xparam_name = Vocab.xparam(3)
    when 4
      xparam_rate = actor.xparam(4) / 100.to_f
      xparam_name = Vocab.xparam(4)
    when 5
      xparam_rate = actor.xparam(5) / 100.to_f
      xparam_name = Vocab.xparam(5)
    when 6
      xparam_rate = actor.xparam(6) / 100.to_f
      xparam_name = Vocab.xparam(6)
    when 7
      xparam_rate = actor.xparam(7) / 100.to_f
      xparam_name = Vocab.xparam(7)
    when 8
      xparam_rate = actor.xparam(8) / 100.to_f
      xparam_name = Vocab.xparam(8)
    when 9
      xparam_rate = actor.xparam(9) / 100.to_f
      xparam_name = Vocab.xparam(9)
    end
    contents.font.name = font
    contents.font.size = size
    contents.font.bold = true
    contents.font.shadow = false
    draw_gauge_ex(x, y - 14, width, 20, xparam_rate, bar_color1, bar_color2)
    contents.font.color = txt_color1
    draw_text(x + 10, y, 120, line_height, xparam_name)
    contents.font.color = txt_color2
    draw_text(x + width - 38, y, 36, line_height, "#{actor.xparam(xparam_id)}%", 2)
    reset_font_settings 
  end
  
  def draw_line_ex(x, y, color, shadow)
    # // Method to draw a line with a shadow.
    line_y = y + line_height / 2 - 1
    contents.fill_rect(x, line_y, contents_width, 2, color)
    line_y += 1
    contents.fill_rect(x, line_y, contents_width, 2, shadow)
  end
  
  def draw_icons(icons, alignment, x = 0, y = 0, offset_icon = [])
    # // Method to draw icons in a horizonal or vertical alignment.
    for i in icons
      # // If included in offset do extra line_height.
      for o in offset_icon
        if i == o
          y += line_height * 1 if alignment == :vertical
          x += line_height * 1 if alignment == :horizontal
        end
      end
      draw_icon(i.nil? ? nil : i, x.nil? ? 0 : x, y.nil? ? 0 : y) rescue nil
      y += line_height if alignment == :vertical
      x += line_height if alignment == :horizontal
      next if i.nil?
    end
  end
  
  def draw_big_icon(icon, x, y, width, height, opacity = 255)
    # // Method to draw a big icon.
    bitmap = Cache.system("Iconset")
    rect = Rect.new(icon % 16 * 24, icon / 16 * 24, 24, 24)
    rect2 = Rect.new(x, y, width, height)
    contents.stretch_blt(rect2, bitmap, rect, opacity)
  end
  
  def draw_font_text(text, x, y, width, alignment, font, size, color, bold = true, shadow = true)
    # // Method to draw font text.
    contents.font.name = font
    contents.font.size = size
    contents.font.color = color
    contents.font.bold = bold
    contents.font.shadow = shadow
    contents.font.out_color = Color.new(0,0,0,255)
    draw_text(x, y, width, calc_line_height(text), text, alignment)
    reset_font_settings
  end
  
  def draw_font_text_ex(text, x, y, font, size, color, bold = true, shadow = true)
    # // Method todraw font text. (Special)
    contents.font.name = font
    contents.font.size = size
    contents.font.color = color
    contents.font.bold = bold
    contents.font.shadow = shadow
    contents.font.out_color = Color.new(0,0,0,255)
    text = convert_escape_characters(text)
    pos = {:x => x, :y => y, :new_x => x, :height => calc_line_height(text)}
    process_character(text.slice!(0, 1), text, pos) until text.empty?
    reset_font_settings
  end
  
end
#==============================================================================#
# ** Window_Selectable
#------------------------------------------------------------------------------
#  Adding support for pageleft and pageright for window selectable.
#==============================================================================#
class Window_Selectable < Window_Base
  
  def cursor_pageright ; end
  def cursor_pageleft ; end

  alias xail_core_winselect_process_cursor_move process_cursor_move
  def process_cursor_move(*args, &block)
    # // Method to process cursor movement.
    xail_core_winselect_process_cursor_move(*args, &block)
    cursor_pageright if !handle?(:pageright) && Input.trigger?(:RIGHT)
    cursor_pageright if !handle?(:pageleft) && Input.trigger?(:LEFT)
  end
  
  alias xail_core_winselect_process_handling process_handling
  def process_handling(*args, &block)
    # // Method to process handling.
    xail_core_winselect_process_handling(*args, &block)
    return process_pageright if handle?(:pageright) && Input.trigger?(:RIGHT)
    return process_pageleft if handle?(:pageleft) && Input.trigger?(:LEFT)
  end
    
  def process_pageright
    # // Method to process page right.
    Sound.play_cursor
    Input.update
    deactivate
    call_handler(:pageright)
  end
  
  def process_pageleft
    # // Method to process page left.
    Sound.play_cursor
    Input.update
    deactivate
    call_handler(:pageleft)
  end
  
end
#==============================================================================#
# ** Window_Icon
#------------------------------------------------------------------------------
#  New Window :: Window_Icon - A window for drawing icon(s).
#==============================================================================#
class Window_Icon < Window_Base
  
  attr_accessor :enabled
  attr_accessor :alignment
  
  def initialize(x, y, window_width, hsize)
    # // Method to initialize the icon window.
    super(0, 0, window_width, window_height(hsize))
    @icons = []
    @index = 0
    @enabled = true
    @alignment = 0
    refresh
  end
  
  def window_height(hsize)
    # // Method to return the height.
    fitting_height(hsize)
  end
  
  def refresh
    # // Method to refresh the icon window.
    contents.clear
  end
  
  def draw_cmd_icons(icons, index)
    # // Draw all of the icons.
    return if !@enabled
    count = 0
    for i in icons
      align = 0
      x = 110
      next if i[index].nil?
      case @alignment
      when 1, 2 ; align = -110
      end
      draw_icon(i[index], x + align, 24 * count)
      count += 1
      break if (24 * count > height - 24)
    end
  end
  
end
#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
# Adding check item method to return a item based on the type.
#==============================================================================
class Game_Party < Game_Unit
  
  def check_item?(item, type)
    # // Method to return a item based on the type.
    case type
    when :item    ; item = $data_items[item]
    when :weapon  ; item = $data_weapons[item]
    when :armor   ; item = $data_armors[item]
    end
  end

end 
#==============================================================================
# ** Game_Event
#------------------------------------------------------------------------------
# Adding methods to check for comments on events.
#==============================================================================
class Game_Event < Game_Character
  
  def comment?(comment)
    # // Method to check if comment is included in event.
    unless empty? or @list.nil?
      for evt in @list
        if evt.code == 108 or evt.code == 408
          if evt.parameters[0].include?(comment)
            return true
          end
        end
      end
    end
    return false
  end
  
  def comment_int?(comment)
    # // Method to check variable integer in event.
    unless empty? or @list.nil?
      for evt in @list
        if evt.code == 108 or evt.code == 408
          if evt.parameters[0] =~ /<#{comment}:[ ]?(\d*)>?/
            return ($1.to_i > 0 ? $1.to_i : 0)
          end
        end
      end
    end
  end

end # END OF FILE

#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#

Código: Popup Item
==============================================================================
#   XS - Popup Item
#   Author: Nicke
#   Created: 06/04/2012
#   Edited: 19/09/2012
#   Version: 1.1c
#==============================================================================
# ☻ Utilidade ☻
#Cria uma janela onde é mostrado o item que o personagem adiquiriu.
#==============================================================================
# ☻ Instruções ☻
#Insira esse script no espaço de "Scripts Adicionais" do RPG Maker VX Ace. 
#Para fazer com que a janlea apareça, ative a Switch 90 e então use os comandos
#do evento para adionar itens, equipamentos e dinheiros.
#==============================================================================
# ☻ Requisitos ☻
#XS - Core Script.
#==============================================================================

($imported ||= {})["XAIL-POPUP-ITEM"] = true

module XAIL
  module POPUP_ITEM
  #--------------------------------------------------------------------------#
  # * Definições
  #--------------------------------------------------------------------------#
    # FONTE = [nome, tamanho, cor, negrito, sombra]
    FONT_ITEM = [["Anklada™", "Verdana"], 16, Color.new(202,255,200), true, true]
    FONT_AMT = [["Anklada™", "Verdana"], 24, Color.new(255,200,22), true, true]
    FONT_DESC = [["Anklada™", "Verdana"], 16, Color.new(255,255,255), true, true]
            
    # Defina a largura, altura e opacidade da janela.
    # Você também precisa-rá mudar o valor da switch para habilitar a janela.
    # Mostre/esconda cada texto usando o comando show_* items.
    # POP = [largura, altura, opacidade, switch_id, velocidade da animação, mostrar icone
    # mostrar nome, mostrar preço, mostrar quantidade, mostrare, mostrar linha]
    POP = [360, 100, 255, 90, 6, true, true, true, true, true, true]
    
    # POS_TYPE = :symbol
    # :screen = Posição da janela na tela. (padrão)
    # :player = Posição da janela próximo ao jogador.
    # Nota: Se você definir :player, a janela poderá não aparecer no mapa se
    # você colocá-lo no canto da tela.
    POS_TYPE = :screen
    
    # OFFSET = número.
    # Use isso para mudar a posição da janela.
    X_OFFSET = POP[0] / 2
    Y_OFFSET = POP[1] / 2
    
    # Mude a windowskin da janela.
    # SKIN = windowskin (localizado em Graphics/System folder)
    SKIN = nil
    
    # Icone do Gold = id do icone mostrado
    GOLD_ICON = 262
    
    # GOLD_ACQUIRED = string
    GOLD_ACQUIRED = "Adquirido — "
    
    # ITEM_ACQUIRED = string
    ITEM_ACQUIRED = "Adquirido — "
    
    # LINE_COLOR = [Cor, Sombra]
    LINE_COLOR = [Color.new(255,255,255,200), Color.new(0,0,0,160)]
    
    # Mostra a quantidade anterior e a próxima. Deixe vazio se não quiser que apareça.
    # AMOUNT_SYMBOL = string
    AMT_SYM_BEFORE = "  "
    AMT_SYM_AFTER = "x "
    
    # NO_POP_ITEM = {type, item_id}
    # type = :weapons, :item, :armour
    # item_id = number
    NO_POP_ITEM = {
      :weapons   => [2,3],
      :item      => [12,12],
      :armour    => [32,52,24],
    }
    
    # Escolha um botão para pesquisar sobre esse item
    # Pode ser habilitado e desabilitado, com cronometro apenas.
    # Set the time to the amount you wish to wait before the next item is displayed.
    # BUTTON = [enable_wait, button, time]
    BUTTON = [true, Input::C, 100]   
  end
end
# *** Don't edit below unless you know what you are doing. ***
#==============================================================================#
# ** Error Handler
#==============================================================================#
  unless $imported["XAIL-XS-CORE"]
    # // Error handler when XS - Core is not installed.
    msg = "The script %s requires the latest version of XS - Core in order to function properly."
    name = "XS - Popup Item"
    msgbox(sprintf(msg, name))
    exit
  end
#==============================================================================#
# ** Game_Interpreter
#==============================================================================#
class Game_Interpreter
  
  def pop(type, amount, index, params, param_index)
    # // Method to call the popup.
    if $game_switches[XAIL::POPUP_ITEM::POP[3]] && params[param_index] == 0
      index = (type == :gold) ? 0 : index
      SceneManager.scene.pop_item(type, amount, index)
    end
  end
  
  alias xail_pop_item_cmd_125 command_125
  def command_125(*args, &block)
    # // Method when gold changes.
    value = operate_value(@params[0], @params[1], @params[2])
    pop(:gold, value, 1, @params, 0)
    xail_pop_item_cmd_125(*args, &block)
  end

  alias xail_pop_item_cmd_126 command_126
  def command_126(*args, &block)
    # // Method when item changes.
    value = operate_value(@params[1], @params[2], @params[3])
    pop(:item, value, @params[0], @params, 1)
    xail_pop_item_cmd_126(*args, &block)
  end

  alias xail_pop_item_cmd_127 command_127
  def command_127(*args, &block)
    # // Method when weapon changes.
    value = operate_value(@params[1], @params[2], @params[3])
    pop(:weapons, value, @params[0], @params, 1)
    xail_pop_item_cmd_127(*args, &block)
  end
  
  alias xail_pop_item_cmd_128 command_128
  def command_128(*args, &block)
    # // Method when armour changes.
    value = operate_value(@params[1], @params[2], @params[3])
    pop(:armour, value, @params[0], @params, 1)
    xail_pop_item_cmd_128(*args, &block)
  end
  
end
#==============================================================================#
# ** Scene_Map
#==============================================================================#
class Scene_Map < Scene_Base
  
  def create_pop_window
    # // Method to create the popup window.
    case XAIL::POPUP_ITEM::POS_TYPE
    when :screen
      x, y = Graphics.width / 2 - XAIL::POPUP_ITEM::X_OFFSET, Graphics.height / 2 - XAIL::POPUP_ITEM::Y_OFFSET
    when :player
      x, y = $game_player.screen_x - XAIL::POPUP_ITEM::X_OFFSET, $game_player.screen_y - XAIL::POPUP_ITEM::Y_OFFSET
    end
    @pop_window = Window_Base.new(x, y, XAIL::POPUP_ITEM::POP[0], XAIL::POPUP_ITEM::POP[1])
    @pop_window.opacity = @pop_window.contents_opacity = XAIL::POPUP_ITEM::POP[2]
    @pop_window.windowskin = Cache.system(XAIL::POPUP_ITEM::SKIN) unless XAIL::POPUP_ITEM::SKIN.nil?
    if XAIL::POPUP_ITEM::POP[10]
      @lines = Window_Base.new(x, y, @pop_window.width, @pop_window.height)
      @lines.opacity = @lines.contents_opacity = 0
    end
  end
  
  def pop_item(type, amount, index)
    # // Method to display the popup.
    item = nil
    case type
    when :item # // Items.
      item = $data_items[index]
    when :weapons # // Weapons.
      item = $data_weapons[index]
    when :armour # // Armors.
      item = $data_armors[index]
    end
    # // Return if included in no popup.
    XAIL::POPUP_ITEM::NO_POP_ITEM.each_pair {|key,item_id|
      return if key == type && item_id.include?(item.id)
    }
    icon = item.nil? ? XAIL::POPUP_ITEM::GOLD_ICON : item.icon_index
    create_pop_window
    max = XAIL::POPUP_ITEM::POP[4] * 3
    # // Fade in windows.
    for i in 1..max
      update_basic
      @pop_window.contents_opacity = i * (255 / max)
      @lines.contents_opacity = i * (255 / max) if XAIL::POPUP_ITEM::POP[10]
    end
    gold_ac = XAIL::POPUP_ITEM::GOLD_ACQUIRED
    item_ac = XAIL::POPUP_ITEM::ITEM_ACQUIRED
    price = XAIL::POPUP_ITEM::POP[7] ? " (#{item.price} #{Vocab::currency_unit})" : "" unless item.nil?
    pop_item = item.nil? ? gold_ac + amount.to_s + " " + Vocab::currency_unit : item_ac + item.name + price
    pop_amt = XAIL::POPUP_ITEM::AMT_SYM_BEFORE + amount.to_s + XAIL::POPUP_ITEM::AMT_SYM_AFTER
    # // Draw icons.
    if XAIL::POPUP_ITEM::POP[5]
      @pop_window.draw_big_icon(icon, -2, -10, @pop_window.contents_width/4, @pop_window.contents_width/4, 100)
      @pop_window.draw_icon(icon, 2, 8) 
    end
    # // Draw item.
    @pop_window.draw_font_text(pop_item, 0, 10, @pop_window.contents_width-24, 1, XAIL::POPUP_ITEM::FONT_ITEM[0], XAIL::POPUP_ITEM::FONT_ITEM[1], XAIL::POPUP_ITEM::FONT_ITEM[2], XAIL::POPUP_ITEM::FONT_ITEM[3], XAIL::POPUP_ITEM::FONT_ITEM[4]) if XAIL::POPUP_ITEM::POP[6]
    # // Draw amount.
    @pop_window.draw_font_text(pop_amt, 0, 8, @pop_window.contents_width, 2, XAIL::POPUP_ITEM::FONT_AMT[0], XAIL::POPUP_ITEM::FONT_AMT[1], XAIL::POPUP_ITEM::FONT_AMT[2], XAIL::POPUP_ITEM::FONT_AMT[3], XAIL::POPUP_ITEM::FONT_AMT[4]) unless item.nil? || !XAIL::POPUP_ITEM::POP[8]
    if XAIL::POPUP_ITEM::POP[9]
      # // Draw description.
      @pop_window.contents.font.name = XAIL::POPUP_ITEM::FONT_DESC[0]
      @pop_window.contents.font.size = XAIL::POPUP_ITEM::FONT_DESC[1]
      @pop_window.contents.font.color = XAIL::POPUP_ITEM::FONT_DESC[2]
      @pop_window.contents.font.bold = XAIL::POPUP_ITEM::FONT_DESC[3]
      @pop_window.contents.font.shadow = XAIL::POPUP_ITEM::FONT_DESC[4]
      @pop_window.draw_text_ex_no_reset(2, 34, item.description) unless item.nil?
      @pop_window.reset_font_settings
    end
    # // Draw lines.
    if XAIL::POPUP_ITEM::POP[10]
      @lines.draw_line_ex(@pop_window.contents_width/4, -6, XAIL::POPUP_ITEM::LINE_COLOR[0], XAIL::POPUP_ITEM::LINE_COLOR[1])
      @lines.draw_line_ex(-@pop_window.contents_width/4, 24, XAIL::POPUP_ITEM::LINE_COLOR[0], XAIL::POPUP_ITEM::LINE_COLOR[1])
    end
    # // Fade in windows.
    count = 0
      loop do
        update_basic
        count += 1 unless XAIL::POPUP_ITEM::BUTTON[0]
        break if Input.trigger?(XAIL::POPUP_ITEM::BUTTON[1])
        break if count == XAIL::POPUP_ITEM::BUTTON[2] && !XAIL::POPUP_ITEM::BUTTON[0]
      end
      for i in 1..max
        update_basic
        @pop_window.contents_opacity = 255 - i * (255 / max)
        @lines.contents_opacity = 255 - i * (255 / max) if XAIL::POPUP_ITEM::POP[10]
      end
    dispose_popup
  end
  
  def dispose_popup
    # // Method to dispose the popup window.
    @pop_window = nil, @pop_window.dispose unless @pop_window.nil?
    @lines = nil, @lines.dispose unless @lines.nil? and !XAIL::POPUP_ITEM::POP[10]
  end
  
end # END OF FILE

#=*==========================================================================*=#
# ** END OF FILE
#=*==========================================================================*=#

[box class=catbg2]Créditos[/box]
Nicke

Interessante... Vou testar aqui e talvez até use em algum projeto!
Depois eu vejo o que eu coloco aqui.

08/01/2013 às 12:00 #2 Última edição: 08/01/2013 às 13:11 por Raizen
O nicke das comunidades gringas, é um dos que tem mais scripts, e todos são bem feitos, e tipo esse é um bem legalzinho dele, vou ver se consigo trazer mais alguns dele, vlw a contribuição :)

É o Nicke tem vários scripts, e todos com ótimos designes.
Eu também pretendo trazer mais scripts dele pra CRM, assim que eu tiver mais tempo e também quem sabe futuramente criar os meus próprios.