#==============================================================================
# ** HUD_Properties
#------------------------------------------------------------------------------
# This class holds the constants that are shared across the HUD classes.
#==============================================================================
class HUD_Properties
#--------------------------------------------------------------------------
# * Constant Variables
#--------------------------------------------------------------------------
HUD_Position_X = 0
HUD_Position_Y = 130
HUD_Width = 150
HUD_Mapnames_Height = 64
HUD_Namemyst_Height = 130
end
#==============================================================================
# ** Window_MapName
#------------------------------------------------------------------------------
# This window displays the map name in Scene_Map.
#==============================================================================
class Window_MapName < Window_Base
#--------------------------------------------------------------------------
# * Constant Variables
#--------------------------------------------------------------------------
MAPINFOSHASH = load_data('./Data/MapInfos.rxdata')
INIT_OPACITY = 200
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Initialize our window with the proper values determined in the shared
# constants class of this HUD.
super(HUD_Properties::HUD_Position_X,
HUD_Properties::HUD_Position_Y,
HUD_Properties::HUD_Width,
HUD_Properties::HUD_Mapnames_Height)
# Our drawing surface.
self.contents = Bitmap.new(width - 32, height - 32)
# Define its initial opacity.
self.back_opacity = INIT_OPACITY
# Redraw the MapName window.
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Draw the map name.
self.contents.draw_text(0, 0, width - 32, 32,
MAPINFOSHASH[$game_map.map_id].name, 1)
end
end
#==============================================================================
# ** Window_NameMyst
#------------------------------------------------------------------------------
# This window displays the actor's name and his myst accessory if applicable.
#==============================================================================
class Window_NameMyst < Window_Base
#--------------------------------------------------------------------------
# * Constant Variables
#--------------------------------------------------------------------------
INIT_OPACITY = 128
NO_MYST_ICON = '-'
#------------------------------------------------------------------------
# * MYST_EQUIPID
# The ids of the equipment none as myst equipment. Accesories Only.
#------------------------------------------------------------------------
MYST_EQUIPID = [25,]
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Initialize our window with the proper values determined in the shared
# constants class of this HUD.
super(HUD_Properties::HUD_Position_X,
HUD_Properties::HUD_Position_Y + HUD_Properties::HUD_Mapnames_Height,
HUD_Properties::HUD_Width,
HUD_Properties::HUD_Namemyst_Height)
# Our drawing surface.
self.contents = Bitmap.new(width - 32, height - 32)
# Define its initial opacity.
self.back_opacity = INIT_OPACITY
# Redraw the NameMyst window
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
y = 0
self.contents.font.size = 20
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
self.contents.draw_text(0, y, 80, 24, actor.name)
self.contents.draw_text(80, y, 8, 24, ':')
unless MYST_EQUIPID.include?(actor.armor4_id)
self.contents.draw_text(90, y, 24, 24, NO_MYST_ICON, 1)
else
self.contents.blt(90, y, Bitmap.new('Graphics/Icons/' +
$data_armors[actor.armor4_id].icon_name), Rect.new(0, 0, 24, 24))
end
y += 24
end
end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs map screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Alias Methods
#--------------------------------------------------------------------------
alias_method :trif_custom_HUD_scene_map_main, :main
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Create the window we will be showing.
@map_names = Window_MapName.new
@name_myst = Window_NameMyst.new
# Call the old code.
trif_custom_HUD_scene_map_main
# Dispose of the windows.
@map_names.dispose
@name_myst.dispose
end
end