Hi,
I'm working with PAC compact menu add-on: https://pacmanvx.wordpress.com/2012/07/16/pac-main-menu-ace-compact-addon/
Currently, I have a menu background for the command window only. I achieved this by using a script snippet by TheoAllen:
My current predicament is that there's a sliding component to the Compact menu add on. Basically, anytime you have to make a character selection, the command window slides to the left, and the menu background does not slide with it.
Basically, what I'm trying to do is either have the background slide along with the compact command menu, or edit the compact menu so that the selection screen appears in the center above the command window, without it moving.
TL;DR - How can I edit the compact menu script so that the Status selection appears centered in the screen and doesn't slide the command window?
I'm working with PAC compact menu add-on: https://pacmanvx.wordpress.com/2012/07/16/pac-main-menu-ace-compact-addon/
Currently, I have a menu background for the command window only. I achieved this by using a script snippet by TheoAllen:
Code:
module Theo
#----------------------------------------------------------------------------
# To identify window name. Only use to debug. Set to false if not used.
# Because extra sprite adds up an extra process.
#----------------------------------------------------------------------------
DisplayWindowName = false
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
# Record all windows name here that you wish to display a background image
# The format goes like:
#
# Window_ClassName => 'image name'
# The image name must be located in Graphics/system
#----------------------------------------------------------------------------
WindowList = {
Window_MenuCommand => 'Menu_Background',
} # <-- Don't remove this
#----------------------------------------------------------------------------
end
class Window_Base
alias background_init initialize
def initialize(*args)
background_init(*args)
text = self.class.to_s
size = text_size(text)
if Theo::DisplayWindowName
@name_text = Sprite.new
@name_text.bitmap = Bitmap.new(size.width+2, size.height)
@name_text.bitmap.font.size = 19
@name_text.bitmap.fill_rect(@name_text.bitmap.rect, Color.new(0,0,0,128))
@name_text.bitmap.draw_text(@name_text.bitmap.rect, text)
end
if Theo::WindowList[self.class]
@back_img = Sprite.new
@back_img.bitmap = Cache.system(Theo::WindowList[self.class])
end
update_extra
end
alias bg_update update
def update
bg_update
update_extra
end
def update_extra
if @name_text
@name_text.viewport = self.viewport
@name_text.x = self.x
@name_text.y = self.y
@name_text.z = self.z + 1
@name_text.visible = self.visible
end
if @back_img
@back_img.viewport = self.viewport
@back_img.x = 0
@back_img.y =
@back_img.z = self.z - 1
@back_img.opacity = self.openness
@back_img.visible = self.visible
end
end
alias bg_dispose dispose
def dispose
bg_dispose
dispose_extra
end
def dispose_extra
@name_text.dispose if @name_text
@back_img.dispose if @back_img
end
end
My current predicament is that there's a sliding component to the Compact menu add on. Basically, anytime you have to make a character selection, the command window slides to the left, and the menu background does not slide with it.
Basically, what I'm trying to do is either have the background slide along with the compact command menu, or edit the compact menu so that the selection screen appears in the center above the command window, without it moving.
TL;DR - How can I edit the compact menu script so that the Status selection appears centered in the screen and doesn't slide the command window?