#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Custom Blizz ABS PreMenu
# Version: 1.02
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
module LiTTleDRAgo
PAUSEMENU = false # If you want the game to pause when in the menu.
DISABLE_PREMENU = false # If you want to dispose the Blizz ABS Premenu
TEXT1, TEXT2, TEXT3 = 'Location', 'Steps', 'Money'
CommandsPreMenu = ['Menu', 'Hotkeys', 'AI Behavior', 'AI Triggers', 'Cancel']
FontFacePreMenu = 'Calibri'
FontSizePreMenu = 19
end
module SetFont
def initialize
super(0, 0, 450, 96)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = LiTTleDRAgo::FontFacePreMenu
self.contents.font.size = LiTTleDRAgo::FontSizePreMenu
refresh
end
def update
super
refresh if Graphics.frame_count / Graphics.frame_rate != @total_sec
end
end
class Game_Map
def name
load_data('Data/MapInfos.rxdata')[@map_id].name
end
end
if !LiTTleDRAgo::DISABLE_PREMENU
class Window_Location < Window_Base
include SetFont
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, LiTTleDRAgo::TEXT1)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_map.name.to_s, 2)
end
end
class Window_Steps < Window_Base
alias pre_menu_refresh refresh
def refresh
original = pre_menu_refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, LiTTleDRAgo::TEXT2)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
end
end
if $BlizzABS && BlizzABS::VERSION <= 2.84
class Map_Battler < Game_Character
def increase_steps
if @battler.is_a?(Game_Actor) && @battler.id == $game_party.actors[0].id
$game_party.steps = [$game_party.steps + 1, 9999999999999999].min
end
end
end
end
class Window_NewGold < Window_Base
include SetFont
def refresh
self.contents.clear
self.contents.font.color = system_color
self.contents.draw_text(4, 0, 120, 32, LiTTleDRAgo::TEXT3)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 32, $game_party.gold.to_s+" "+$data_system.words.gold, 2)
end
end
class Window_Clock < Window_Base
if $ccts != nil
include SetFont
def refresh
self.contents.clear
self.contents.font.color = system_color
x = $game_system.time.month - 1
min, hour = $game_system.time.minute, $game_system.time.hour
day, day_name = $game_system.time.day.to_s, $game_system.time.day_name
month = $ccts < 1.2 ? CCTS::Months[x] : CCTS::MONTHS[x]
year = $game_system.time.year.to_s
date = "#{day} #{month}, #{year}"
self.contents.draw_text(0, 0, 200, 32, day_name+", "+date,2)
self.contents.draw_text(0, 32, 200, 32, sprintf('%2d:%02d', hour, min),2)
self.contents.font.color = normal_color
end
end
end
end
class Scene_Menu
alias drago_blizzabs_later main_blizzabs_later
def main
if @index_flag == nil && !LiTTleDRAgo::DISABLE_PREMENU
$game_temp.in_battle = true
@hud = Hud.new if BlizzABS::Config::HUD_ENABLED && $game_system.hud
@hotkeys = Hotkey_Assignment.new if
BlizzABS::Config::HOTKEYS && $game_system.hotkeys
@window = Window_Command.new(192, LiTTleDRAgo::CommandsPreMenu)
if $game_party.actors.size == 0
@window.disable_item(1)
@window.disable_item(2)
@window.disable_item(3)
end
@window.x, @window.y = 320 - @window.width/2, 240 - @window.height/2
@window.z = 21000
#-------------------------------------------------------------------------
@steps_w, @gold_w = Window_Steps.new, Window_NewGold.new
@location_w, @playtime_w = Window_Location.new, Window_PlayTime.new
@clock = Window_Clock.new if $ccts != nil
#-------------------------------------------------------------------------
@steps_w.x , @steps_w.y = 0 , 394
@gold_w.x , @gold_w.y = 0 , 345
@location_w.x, @location_w.y = 480, 394
@playtime_w.x, @playtime_w.y = 480, $ccts != nil ? 49 : 0
@clock.x, @clock.y, @clock.opacity = 400, 0,0 if $ccts != nil
#-------------------------------------------------------------------------
@gold_w.opacity, @window.back_opacity, @steps_w.opacity,
@location_w.opacity, @playtime_w.opacity = 0,0,0,0,0
#-------------------------------------------------------------------------
@spriteset, @view = Spriteset_Map.new, Viewport.new(0, 0, 640, 480)
x = BlizzABS::Config::MENU_COLOR_TINT
tint = x > 0 ? BlizzABS::Config::MENU_COLOR_TINT : rand(8) + 1
case tint
when 1 then @view.tone = Tone.new(-40, -40, -40, 255)
when 2 then @view.tone = Tone.new(-255, -255, 0, 255)
when 3 then @view.tone = Tone.new(-255, 0, -255, 255)
when 4 then @view.tone = Tone.new(0, -255, -255, 255)
when 5 then @view.tone = Tone.new(0, 0, -255, 255)
when 6 then @view.tone = Tone.new(0, -255, 0, 255)
when 7 then @view.tone = Tone.new(-255, 0, 0, 255)
when 8 then @view.tone = Tone.new(-60, -60, -60, 0)
end
Graphics.transition
loop do
[Graphics, Input].each {|s| s.update if s != nil}
break if update_before_main
end
Graphics.freeze
[@hud, @hotkeys, @spriteset, @window, @playtime_w, @steps_w, @gold_w,
@location_w, @clock].each {|s| s.dispose if s != nil}
@view.dispose if $scene.is_a?(Scene_Menu) || $scene.is_a?(Scene_Map)
@window = @spriteset = @view = nil
end
drago_blizzabs_later if $scene.is_a?(Scene_Menu)
end
#----------------------------------------------------------------------------
# Processes the pre-menu.
#----------------------------------------------------------------------------
alias drago_update_before update_before_main
def update_before_main
return drago_update_before if LiTTleDRAgo::DISABLE_PREMENU
[@spriteset, $game_map, $game_system.map_interpreter, $game_system,
$game_screen].each {|s| s.update if s != nil} if !LiTTleDRAgo::PAUSEMENU
$BlizzABS.AI.update
[@playtime_w, @steps_w, @gold_w, @location_w,
@clock].each {|s| s.update if s != nil}
drago_update_before
end
end