Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Advanced Menu Screen
#1
Advanced Menu Screen
by Kanon
Version 1.9
Nov 21, 2008

This is a locked, two-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.


Introduction
This script was designed to modify entire of the menu screen.

This is my first script so any comments are welcomes here...
I'm sorry, I still learning how to use WYSIWYG editor.

Part 1 (Part 2 in 2nd post)

Code:
#==============================================================================
# Custom Menu Screen
#------------------------------------------------------------------------------
# By Kanon
# Version 1.9
# Date 15/10/2008
# Last Update 12/11/2008
#------------------------------------------------------------------------------
#
# * INSTRUCTION:
#
# If you want to add icons in the Command Window:
# 1. You need to create a new folder inside the Icon folder named Command_Icon.
# 2. Then, you need to add the icons and named them:
#    command0, command1, command2, command3 and command4
# 3. If you don't want to add icons, you can set [Command_Icon = false]
#
# If you want to add icons in the Stats Window:
# 1. You need to create a new folder inside the Icon folder named Stats_Icon.
# 2. Then, you need to add the icons and named them:
#    location, playtime, encounter, gold and step
# 3. If you don't want to add icons, you can set [Stats_Icon = false]
#
# Finally, place all of this scripts above main and it should be done.
#
#
# * COMPATIBILITY:
#
# This script should be 100% compatibly with everything except other CMS.
# Already compatible with SDK.
#
#
# * FEATURES:
#
# ~ Slide-in windows, which still 85%.
# ~ HP/SP/EXP with bars included.
# ~ Parameter with bars included.
# ~ Command window and Player Stats window with Icons.
# ~ Custom Sprite's movement by Constance.
#
#
# * VERSION HISTORY:
#
# Ver 1.0 -------------------------------------------------------- (15/10/2008)
# ~ The script was first made.
#
# Ver 1.5 -------------------------------------------------------- (26/10/2008)
# ~ Added HP/SP/EXP bar in the menu status.
# ~ Added custom sprite's movement.
# ~ Added parameter bars in the status window.
#
# ver 1.7 -------------------------------------------------------- (1/11/2008)
# ~ Re-edit the menu status window.
# ~ Equip Window is finished.
# ~ Status Window is already completed.
# ~ Fixed Custom sprite's movement bug.
# ~ HP/SP/EXP bars are fixed and improved.
# ~ Decreased lag.
#
# Ver 1.8 -------------------------------------------------------- (2/11/2008)
# ~ Skill Window is finished.
# ~ Fixed HP/SP/EXP bars' position.
# ~ Fixed Slide-in movement.
# ~ Fixed Skill Target window bug.
# ~ Re-model exit window.
# ~ Decreased lag slightly.
#
# ver 1.9 -------------------------------------------------------- (12/11/2008)
# ~ Compatibly for SDK.
# ~ Fixed Slide-in windows' movement bugs and glitches.
# ~ Re-model entire menu status window.
# ~ Fixed skill target window's slide-in movement.
#
#
# * CUSTOMIZATION:
#
# Font_Name
# Customize the font name which will be used for all-in script.
# Font Name list which suitable for this CMS:
# ~ Tahoma
# ~ Verdana
# ~ Comic Sans MS
# ~ Baldessare
# ~ UmePlus Gothic
#
# Font_Size
# Customize the font size which will be used for all-in script.
# The default is 20.
#
# Command_Icon
# Set to true if you want to add icon in the command window or set to false
# if you want the normal command window.
#
# Stats_Icon
# Set to true if you want to add icon in the stats window or set to false
# if you want the normal stats window.
#
# Transition
# Customize the scene transition model.
# e.g = Graphics/Transitions/001-Blind01
#
# Transition_Wait
# Customize the scene transition time. Set to 0 if you don't want to wait
# for the transition.
#
#
# * REPORT:
#
# kanon_gate@yahoo.com
# Visit RMXP Ultimate for more scripts.
#
# NOTE: RMXP Ultimate are looking for new member, join it now. ^^
#==============================================================================

#------------------------------------------------------------------------------
# * SDK Log Script
#------------------------------------------------------------------------------
SDK.log('Custom Menu Screen', 'Kanon', 1.9, '12-11-2008')

#------------------------------------------------------------------------------
# * Begin SDK Enabled Check
#------------------------------------------------------------------------------
if SDK.state('Custom Menu Screen') == true
  
  
  
  #----- C O N F I G U R A T I O N -----#
  module CMS
  ##-----------------------------------##
    Font_Name = "UmePlus Gothic"
  ##-----------------------------------##
    Font_Size = 20
  ##-----------------------------------##
    Command_Icon = true
  ##-----------------------------------##
    Stats_Icon = true
  ##-----------------------------------##
    Transition = ""
  ##-----------------------------------##
    Transition_Wait = 20
  ##-----------------------------------##
  end
  #-----    E        N        D    -----#

  
  
#==============================================================================
# ** Game_System
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :battle_count
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias custom_menu_screen_initialize initialize
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    custom_menu_screen_initialize
    @battle_count = 0
  end
end

#==============================================================================
# ** Scene_Battle
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Alias Listing
  #--------------------------------------------------------------------------
  alias custom_menu_screen_main main
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def main
    $game_system.battle_count += 1
    custom_menu_screen_main
  end
end

#==============================================================================
# ** Game_Map
#==============================================================================
  
class Game_Map
  #--------------------------------------------------------------------------
  # * Load Map Name
  #--------------------------------------------------------------------------
  def name
    load_data('Data/MapInfos.rxdata')[@map_id].name
  end  
end

#==============================================================================
# ** Game_Actor
#==============================================================================
  
class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # * Get Current Experience Points
  #--------------------------------------------------------------------------
  def now_exp
    return @exp - @exp_list[@level]
  end
  #--------------------------------------------------------------------------
  # * Get Needed Experience Points
  #--------------------------------------------------------------------------
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
  #--------------------------------------------------------------------------
  # * Get EXP String
  #--------------------------------------------------------------------------
  def exp_s
    return @exp_list[@level+1] > 0 ? @exp.to_s : "---"
  end
  #--------------------------------------------------------------------------
  # * Get Next Level EXP String
  #--------------------------------------------------------------------------
  def next_exp_s
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1].to_s : "---"
  end
  #--------------------------------------------------------------------------
  # * Get Until Next Level EXP String
  #--------------------------------------------------------------------------
  def next_rest_exp_s
    return @exp_list[@level+1] > 0 ? (@exp_list[@level+1] - @exp).to_s : "---"
  end
end

#==============================================================================
# ** Window_Base
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Get special Text Color
  #--------------------------------------------------------------------------
  def special_color
    return Color.new(0, 230, 240, 255)
  end
  
  #--------------------------------------------------------------------------
  # * Get Plus Text Color
  #--------------------------------------------------------------------------
  def plus_color
    return Color.new(0, 230, 255, 255)
  end
  
  #--------------------------------------------------------------------------
  # * Get Minus Text Color
  #--------------------------------------------------------------------------
  def minus_color
    return Color.new(255, 0, 0, 255)
  end
  
  #--------------------------------------------------------------------------
  # * Draw Kanon Bar (based on Slant Bar by SephirothSpawn)
  #--------------------------------------------------------------------------
  def draw_kanon_bar(x, y, min, max, width = 152, height = 8, bar_color = Color.new(150, 0, 0, 255), end_color = Color.new(255, 255, 60, 255))
    #------------------------------------------------------------------------
    # Draw Border
    #------------------------------------------------------------------------
    for i in 0..height
      self.contents.fill_rect(x + i, y + height + i, width - 1, 1.5, Color.new(50, 50, 50, 255))
    end
    #------------------------------------------------------------------------
    # Draw Background
    #------------------------------------------------------------------------
    for i in 1..(height - 1)
      r = 96 * (height - i) / height + 64 * i / height + 32
      g = 96 * (height - i) / height + 64 * i / height + 32
      b = 96 * (height - i) / height + 64 * i / height + 32
      a = 255 * (height - i) / height + 255 * i / height + 32
      self.contents.fill_rect(x + i, y + height + i, width + 1, 1.5, Color.new(r, b, g, a))
    end
    #------------------------------------------------------------------------
    # Draw Bar Gauge
    #------------------------------------------------------------------------
    for i in 1..( (min.to_f / max.to_f) * width - 1)
      for j in 1..(height - 1)
        r = bar_color.red * (width - i) / width + end_color.red * i / width
        g = bar_color.green * (width - i) / width + end_color.green * i / width
        b = bar_color.blue * (width - i) / width + end_color.blue * i / width
        a = bar_color.alpha * (width - i) / width + end_color.alpha * i / width
        self.contents.fill_rect(x + i + j - 1, y + height + j, 1 + 2, 1, Color.new(r, g, b, a))
      end
    end
  end
  
  #--------------------------------------------------------------------------
  # * Draw HP with Bar
  #--------------------------------------------------------------------------
  def draw_actor_hp_bar(actor, x, y, width = 160)
    #------------------------------------------------------------------------
    # Calculate if there is draw space for Max HP
    #------------------------------------------------------------------------
    if width - 32 >= 108
      hp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      hp_x = x + width - 48
      flag = false
    end
    #------------------------------------------------------------------------
    # Battle Processing
    #------------------------------------------------------------------------
    if $game_temp.in_battle
      bar_width = hp_x - x + 50
      else
      bar_width = hp_x - x + 100
    end
    #------------------------------------------------------------------------
    # Draw Kanon Bar
    #------------------------------------------------------------------------
    draw_kanon_bar(x + 6, y + 10, actor.hp, actor.maxhp, bar_width, 7, bar_color = Color.new(0, 150, 0, 255), end_color = Color.new(60, 255, 120, 255))
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    self.contents.font.color = actor.hp == 0 ? knockout_color :
    actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 1)
    #------------------------------------------------------------------------
    # Draw Max HP
    #------------------------------------------------------------------------
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 2)
      self.contents.draw_text(hp_x + 64, y, 48, 32, actor.maxhp.to_s)
    end
  end
  
  #--------------------------------------------------------------------------
  # * Draw SP with Bar
  #--------------------------------------------------------------------------
  def draw_actor_sp_bar(actor, x, y, width = 160)
    #------------------------------------------------------------------------
    # Calculate if there is draw space for Max SP
    #------------------------------------------------------------------------
    if width - 32 >= 108
      sp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      sp_x = x + width - 48
      flag = false
    end
    #------------------------------------------------------------------------
    # Battle Processing
    #------------------------------------------------------------------------
    if $game_temp.in_battle
      bar_width = sp_x - x + 50
      else
      bar_width = sp_x - x + 100
    end
    #------------------------------------------------------------------------
    # Draw Kanon Bar
    #------------------------------------------------------------------------
    draw_kanon_bar(x + 6, y + 10, actor.sp, actor.maxsp, bar_width, 7, bar_color = Color.new(0, 0, 150, 255), end_color = Color.new(60, 120, 255, 255))
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    self.contents.font.color = actor.sp == 0 ? knockout_color :
    actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 1)
    #------------------------------------------------------------------------
    # Draw Max SP
    #------------------------------------------------------------------------
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 2)
      self.contents.draw_text(sp_x + 64, y, 48, 32, actor.maxsp.to_s)
    end
  end
  
  #--------------------------------------------------------------------------
  # * Draw EXP with Bar
  #--------------------------------------------------------------------------
  def draw_actor_exp_bar(actor, x, y)
    if actor.level == 99
      draw_kanon_bar(x + 6, y + 10, 1, 1, 160, 7, bar_color = Color.new(150, 150, 0, 255), end_color = Color.new(255, 255, 60, 255))
    else
      draw_kanon_bar(x + 6, y + 10, actor.now_exp, actor.next_exp, 160, 7, bar_color = Color.new(120, 120, 0, 255), end_color = Color.new(255, 255, 60, 255))
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 640, 32, "Next")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 96, y, 96, 32, actor.next_rest_exp_s, 1)
  end
  
  #--------------------------------------------------------------------------
  # * Draw Current EXP
  #--------------------------------------------------------------------------
  def draw_actor_current_exp(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 320, 32, "Exp")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 96, y, 96, 32, actor.exp_s, 1)
  end
  
  #--------------------------------------------------------------------------
  # * Draw Level
  #--------------------------------------------------------------------------
  def draw_actor_level(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, "Lv")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 96, y, 96, 32, actor.level.to_s, 1)
  end
  
  #--------------------------------------------------------------------------
  # * Draw Parameter
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      para_name = $data_system.words.atk
      para_color1 = Color.new(125, 75, 0, 255)
      para_color2 = Color.new(255, 150, 0, 255)
      para_stat = actor.atk
    when 1
      para_name = $data_system.words.pdef
      para_color1 = Color.new(0, 125, 125, 255)
      para_color2 = Color.new(0, 255, 255, 255)
      para_stat = actor.pdef
    when 2
      para_name = $data_system.words.mdef
      para_color1 = Color.new(125, 125, 0, 255)
      para_color2 = Color.new(255, 255, 0, 255)
      para_stat = actor.mdef
    when 3
      para_name = $data_system.words.str
      para_color1 = Color.new(125, 0, 25, 255)
      para_color2 = Color.new(255, 0, 75, 255)
      para_stat = actor.str
    when 4
      para_name = $data_system.words.dex
      para_color1 = Color.new(0, 125, 25, 255)
      para_color2 = Color.new(0, 255, 75, 255)
      para_stat = actor.dex
    when 5
      para_name = $data_system.words.agi
      para_color1 = Color.new(125, 0, 125, 255)
      para_color2 = Color.new(255, 0, 255, 255)
      para_stat = actor.agi
    when 6
      para_name = $data_system.words.int
      para_color1 = Color.new(0, 25, 125, 255)
      para_color2 = Color.new(0, 150, 255, 255)
      para_stat = actor.int
    end
    draw_kanon_bar(x + 6, y + 10, para_stat, 999, 150, 6.5, bar_color = para_color1, end_color = para_color2)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, para_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, para_stat.to_s, 2)
  end
  
  #--------------------------------------------------------------------------
  # * Draw Sprite
  #--------------------------------------------------------------------------
  def draw_sprite(x, y, name, hue, pose, frame)
    bitmap = RPG::Cache.character(name, hue)
    cw = bitmap.width / 4
    ch = bitmap.height / 4
    case pose
    when 0;a = 0
    when 1;a = ch
    when 2;a = ch * 3
    when 3;a = ch * 2
    end
    case frame
    when 0;b = 0
    when 1;b = cw
    when 2;b = cw * 2
    when 3;b = cw * 3
    end
    src_rect = Rect.new(b, a, cw, ch)
    self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect)
  end
  
  #--------------------------------------------------------------------------
  # * Draw Item Name
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y)
    if item == nil
      self.contents.font.color = normal_color
      self.contents.draw_text(0, y, 320, 32, "Nothing Equipped", 0)
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
end

#==============================================================================
# ** Window_New_Command
#==============================================================================

class Window_New_Command < Window_Command
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize(index)
    commands = [$data_system.words.item, $data_system.words.skill, $data_system.words.equip, "Status", "Exit"]
    super(160, commands)
    self.index = index
    self.x = 480
    self.y = 0
    self.height = 7 * 32 + 32
    self.opacity = 255
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  if CMS::Command_Icon
    def draw_item(index, color)
      self.contents.font.color = color
      rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))    
      self.contents.blt(4, 4 + index * 32, RPG::Cache.icon("Command_Icon/command#{index}"), Rect.new(0, 0, 24, 24))
      self.contents.font.name = CMS::Font_Name
      self.contents.font.size = CMS::Font_Size
      self.contents.draw_text(32, index * 32, 148, 32, @commands[index])
    end
  else
    def draw_item(index, color)
      self.contents.font.color = color
      self.contents.font.name = CMS::Font_Name
      self.contents.font.size = CMS::Font_Size
      self.contents.draw_text(4, index * 32, 148, 32, @commands[index])
    end
  end
end

#==============================================================================
# ** Window_New_Command_Exit
#==============================================================================

class Window_New_Command_Exit < Window_Command
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize(index)
    commands = ["To Title", "Continue", "Quit Game"]
    super(160, commands)
    self.index = index
    self.x = 640
    self.y = 256
    self.height = 3 * 32 + 32
    self.opacity = 255
    self.active = false
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    self.contents.font.name = CMS::Font_Name
    self.contents.font.size = CMS::Font_Size
    self.contents.draw_text(4, index * 32, 148, 32, @commands[index])
  end
end

#==============================================================================
# ** Window_Player_Status
#==============================================================================

class Window_Player_Status < Window_Base
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 384, 640, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = CMS::Font_Name
    self.contents.font.size = CMS::Font_Size
    self.opacity = 255
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    if CMS::Stats_Icon
      #----------------------------------------------------------------------
      # * Playtime
      #----------------------------------------------------------------------
      bitmap = RPG::Cache.icon("Stats_Icon/playtime")
      self.contents.blt(0, 36, bitmap, Rect.new(0, 0, 24, 24))
      self.contents.font.color = system_color
      self.contents.draw_text(35, 32, 100, 32, "Playtime")
      @total_sec = Graphics.frame_count / Graphics.frame_rate
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      text = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(140, 32, 100, 32, text, 0)
      #----------------------------------------------------------------------
      # * Gold
      #----------------------------------------------------------------------
      bitmap = RPG::Cache.icon("Stats_Icon/gold")
      self.contents.blt(435, 6, bitmap, Rect.new(0, 0, 24, 24))
      cx = contents.text_size($data_system.words.gold).width
      self.contents.font.color = system_color
      self.contents.draw_text(470, 0, cx, 32, $data_system.words.gold, 2)  
      self.contents.font.color = normal_color
      self.contents.draw_text(480, 0, 120, 32, $game_party.gold.to_s, 2)
      #----------------------------------------------------------------------
      # * Steps
      #----------------------------------------------------------------------
      bitmap = RPG::Cache.icon("Stats_Icon/step")
      self.contents.blt(435, 36, bitmap, Rect.new(0, 0, 24, 24))
      self.contents.font.color = system_color
      self.contents.draw_text(470, 32, 100, 32, "Steps")
      self.contents.font.color = normal_color
      self.contents.draw_text(480, 32, 120, 32, $game_party.steps.to_s, 2)
      #----------------------------------------------------------------------
      # * Location
      #----------------------------------------------------------------------
      bitmap = RPG::Cache.icon("Stats_Icon/location")
      self.contents.blt(0, 4, bitmap, Rect.new(0, 0, 24, 24))
      self.contents.font.color = system_color
      self.contents.draw_text(35, 0, 100, 32, "Location")
      self.contents.font.color = normal_color
      self.contents.draw_text(140, 0, 320, 32, $game_map.name.to_s, 0)
      #----------------------------------------------------------------------
      # * Encounters
      #----------------------------------------------------------------------
      bitmap = RPG::Cache.icon("Stats_Icon/encounter")
      self.contents.blt(245, 36, bitmap, Rect.new(0, 0, 24, 24))
      self.contents.font.color = system_color
      self.contents.draw_text(280, 32, 100, 32, "Encounters")
      self.contents.font.color = normal_color
      self.contents.draw_text(310, 32, 120, 32, $game_system.battle_count.to_s, 2)
    else
      #----------------------------------------------------------------------
      # * Playtime
      #----------------------------------------------------------------------
      self.contents.font.color = system_color
      self.contents.draw_text(0, 32, 100, 32, "Playtime")
      @total_sec = Graphics.frame_count / Graphics.frame_rate
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      text = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(105, 32, 100, 32, text, 0)
      #----------------------------------------------------------------------
      # * Gold
      #----------------------------------------------------------------------
      cx = contents.text_size($data_system.words.gold).width
      self.contents.font.color = system_color
      self.contents.draw_text(470, 0, cx, 32, $data_system.words.gold, 2)  
      self.contents.font.color = normal_color
      self.contents.draw_text(480, 0, 120, 32, $game_party.gold.to_s, 2)
      #----------------------------------------------------------------------
      # * Steps
      #----------------------------------------------------------------------
      self.contents.font.color = system_color
      self.contents.draw_text(470, 32, 100, 32, "Steps")
      self.contents.font.color = normal_color
      self.contents.draw_text(480, 32, 120, 32, $game_party.steps.to_s, 2)
      #----------------------------------------------------------------------
      # * Location
      #----------------------------------------------------------------------
      self.contents.font.color = system_color
      self.contents.draw_text(0, 0, 100, 32, "Location")
      self.contents.font.color = normal_color
      self.contents.draw_text(105, 0, 320, 32, $game_map.name.to_s, 0)
      #----------------------------------------------------------------------
      # * Encounters
      #----------------------------------------------------------------------
      self.contents.font.color = system_color
      self.contents.draw_text(245, 32, 100, 32, "Encounters")
      self.contents.font.color = normal_color
      self.contents.draw_text(275, 32, 120, 32, $game_system.battle_count.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

#==============================================================================
# ** Window_MenuStatus
#==============================================================================

class Window_Menu_Status < Window_Selectable
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 480, 384)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = CMS::Font_Name
    self.contents.font.size = CMS::Font_Size
    self.opacity = 255
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      x = 64
      y = i * 96
      draw_actor_name(actor, x + 8, y - 6)
      draw_actor_level(actor, x + 8, y + 14)
      draw_actor_hp_bar(actor, x + 192, y -6)
      draw_actor_sp_bar(actor, x + 192, y + 14)
      draw_actor_exp_bar(actor, x + 192, y + 34)
      draw_actor_current_exp(actor, x + 8, y + 34)
    end
  end
  #--------------------------------------------------------------------------
  # * Update Cursor Rect
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(2, 0 + @index * 96, self.width / 8, 62)
    end
  end
end

#==============================================================================
# * Window_Sprite1
#==============================================================================

class Window_Sprite1 < Window_Base
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(-480, 0, 480, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    @pose = 0
    @frame = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    actor = $game_party.actors[0]
    draw_sprite(32, 52, actor.character_name, actor.character_hue , @pose, @frame)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def frame_update
    @frame == 3 ? @frame = 0 : @frame += 1
    refresh
  end
  #--------------------------------------------------------------------------
  # * Pose Update
  #--------------------------------------------------------------------------
  def update_pose(direction)
    if direction == 0
      @pose == 0 ? @pose = 3 : @pose -= 1
    else
      @pose == 3 ? @pose = 0 : @pose += 1
    end
    refresh
  end
end
  
#==============================================================================
# * Window_Sprite2
#==============================================================================

class Window_Sprite2 < Window_Base
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(-480, 96, 480, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    @pose = 0
    @frame = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    actor = $game_party.actors[1]
    draw_sprite(32, 52, actor.character_name, actor.character_hue , @pose, @frame)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def frame_update
    @frame == 3 ? @frame = 0 : @frame += 1
    refresh
  end
  #--------------------------------------------------------------------------
  # * Pose Update
  #--------------------------------------------------------------------------
  def update_pose(direction)
    if direction == 0
      @pose == 0 ? @pose = 3 : @pose -= 1
    else
      @pose == 3 ? @pose = 0 : @pose += 1
    end
    refresh
  end
end

#==============================================================================
# * Window_Sprite3
#==============================================================================

class Window_Sprite3 < Window_Base
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(-480, 192, 480, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    @pose = 0
    @frame = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------  
  def refresh
    self.contents.clear
    actor = $game_party.actors[2]
    draw_sprite(32, 52, actor.character_name, actor.character_hue , @pose, @frame)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def frame_update
    @frame == 3 ? @frame = 0 : @frame += 1
    refresh
  end
  #--------------------------------------------------------------------------
  # * Pose Update
  #--------------------------------------------------------------------------
  def update_pose(direction)
    if direction == 0
      @pose == 0 ? @pose = 3 : @pose -= 1
    else
      @pose == 3 ? @pose = 0 : @pose += 1
    end
    refresh
  end
end

#==============================================================================
# * Window_Sprite4
#==============================================================================

class Window_Sprite4 < Window_Base
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(-480, 288, 480, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    @pose = 0
    @frame = 0
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------  
  def refresh
    self.contents.clear
    actor = $game_party.actors[3]
    draw_sprite(32, 52, actor.character_name, actor.character_hue , @pose, @frame)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def frame_update
    @frame == 3 ? @frame = 0 : @frame += 1
    refresh
  end
  #--------------------------------------------------------------------------
  # * Pose Update
  #--------------------------------------------------------------------------
  def update_pose(direction)
    if direction == 0
      @pose == 0 ? @pose = 3 : @pose -= 1
    else
      @pose == 3 ? @pose = 0 : @pose += 1
    end
    refresh
  end
end

#==============================================================================
# ** Window_Skill_Status
#==============================================================================

class Window_Skill_Status < Window_Base
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(640, 64, 320, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = CMS::Font_Name
    self.contents.font.size = CMS::Font_Size
    self.opacity = 255
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 0, 0)
    self.contents.font.color = system_color
    self.contents.draw_text(0, 32, 160, 32, "State:")
    draw_actor_state(@actor, 192, 32)
    draw_actor_hp_bar(@actor, 0, 64)
    draw_actor_sp_bar(@actor, 0, 96)
    draw_actor_level(@actor, 128, 0)
    draw_actor_current_exp(@actor, 0, 128)
    draw_actor_exp_bar(@actor, 0, 160)
  end
end

#==============================================================================
# ** Window_SkillHelp
#==============================================================================

class Window_SkillHelp < Window_Base
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(640, 0, 640, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = CMS::Font_Name
    self.contents.font.size = CMS::Font_Size
    self.opacity = 255
  end
  #--------------------------------------------------------------------------
  # * Set Text
  #--------------------------------------------------------------------------
  def set_text(text, align = 0)
    if text != @text or align != @align
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 0, self.width - 40, 32, text, align)
      @text = text
      @align = align
      @actor = nil
    end
    self.visible = true
  end
end

#==============================================================================
# ** Window_Skill
#==============================================================================

class Window_Skill < Window_Selectable
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(960, 64, 320, 416)
    @actor = actor
    @column_max = 1
    refresh
    self.index = 0
    self.opacity = 255
    if $game_temp.in_battle
      self.x = 0
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
  #--------------------------------------------------------------------------
  # * Acquiring Skill
  #--------------------------------------------------------------------------
  def skill
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.skills.size
      skill = $data_skills[@actor.skills[i]]
      if skill != nil
        @data.push(skill)
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index)
    skill = @data[index]
    if @actor.skill_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 1 * (288 + 32)
    y = index / 1 * 32
    self.contents.font.name = CMS::Font_Name
    self.contents.font.size = CMS::Font_Size
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(skill.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
    self.contents.draw_text(x + 224, y, 48, 32, skill.sp_cost.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
  end
end

#==============================================================================
# ** Window_Skill_Detail
#==============================================================================

class Window_Skill_Detail < Window_Base
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize(skill)
    super(640, 288, 320, 192)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = CMS::Font_Name
    self.contents.font.size = CMS::Font_Size
    self.opacity = 0
    refresh(skill)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh(skill)
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -6, 640, 32, "Element")
    self.contents.font.color = system_color
    self.contents.draw_text(160, -6, 640, 32, "Status Effect")
    elements = []
    skill.element_set.each do |i|
      elements << $data_system.elements[i]
    end
    for i in 0...elements.size
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 14 + (i * 20), 640, 32, elements[i])
    end
    minus_status_data = []
    for i in 1...$data_states.size
      if skill.minus_state_set.include?(i)
        minus_status_data.push($data_states[i].name)
      end
    end
    for i in 0...minus_status_data.size
      self.contents.font.color = normal_color
      self.contents.draw_text(160, 14 + (i * 20), 640, 32, minus_status_data[i])
    end
    plus_status_data = []
    for i in 1...$data_states.size
      if skill.plus_state_set.include?(i)
        plus_status_data.push($data_states[i].name)
      end
    end
    for i in 0...plus_status_data.size
      self.contents.font.color = normal_color
      self.contents.draw_text(160, 14 + (i * 20), 120, 32, plus_status_data[i])
    end
  end
end

#==============================================================================
# ** Window_Skill_Target
#==============================================================================

class Window_Skill_Target < Window_Selectable
  #--------------------------------------------------------------------------
  # * Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(320, 64, 320, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = CMS::Font_Name
    self.contents.font.size = CMS::Font_Size
    self.opacity = 255
    self.z += 10
    @item_max = $game_party.actors.size
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...$game_party.actors.size
      x = 4
      y = i * 96
      actor = $game_party.actors[i]
      draw_actor_name(actor, x, y)
      draw_actor_hp_bar(actor, x, y + 22)
      draw_actor_sp_bar(actor, x, y + 44)
      draw_actor_level(actor, x + 128, y)
      self.contents.font.color = system_color
      self.contents.draw_text(x, y + 66, 160, 32, "State:", 0)
      draw_actor_state(actor, x + 192, y + 66)
    end
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index <= -2
      self.cursor_rect.set(0, (@index + 10) * 96, self.width - 32, 96)
    elsif @index == -1
      self.cursor_rect.set(0, 0, self.width - 32, @item_max * 96)
    else
      self.cursor_rect.set(0, @index * 96, self.width - 32, 96)
    end
  end
end
}


Messages In This Thread
Advanced Menu Screen - by Kanon - 11-21-2008, 01:00 PM
RE: Advanced Menu Screen - by Kanon - 11-21-2008, 01:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Advanced Equipment Screen Narc the Jester 0 2,550 04-04-2011, 01:00 PM
Last Post: Narc the Jester
  FF7 style menu system Narc the Jester 0 2,549 05-04-2010, 01:00 PM
Last Post: Narc the Jester
  L's Custom Menu Scenes Landarma 0 2,495 02-27-2009, 01:00 PM
Last Post: Landarma
  Legend of dragoon type Equipment Menu Genshyu 0 2,438 09-02-2008, 01:00 PM
Last Post: Genshyu
  Final Fantasy III Menu Style DragonKnigth 0 2,496 09-07-2007, 01:00 PM
Last Post: DragonKnigth
  SilentSteps Menu System Silentwalker 0 2,055 06-17-2007, 01:00 PM
Last Post: Silentwalker
  New Personalized status screen alwayzconfuzed 0 2,493 06-04-2007, 01:00 PM
Last Post: alwayzconfuzed
  Ring Menu for SDK2 Landarma 0 2,846 06-01-2007, 01:00 PM
Last Post: Landarma
  Variable Image Menu Chrono Cry 0 2,059 04-25-2007, 01:00 PM
Last Post: Chrono Cry
  Ztorm's Speed Menu ztorm 0 2,387 01-21-2007, 01:00 PM
Last Post: ztorm



Users browsing this thread: