Zerbu 40 Posted January 6, 2012 (edited) Title Screen Window Options Introduction This script allows you to set window options specifically for the title screen to customize its appearance. Instructions Edit the option near the top of the script to set the appearance of the title screen. Script #============================================================================ # Zerbu Engine - Title Screen Window Options #---------------------------------------------------------------------------- # This script allows you to set window options specifically for the title # screen to customize its appearance. #============================================================================ #============================================================================ # (module) Title_Screen_Window_Options #============================================================================ module Title_Screen_Window_Options ZE_TSWO = { #------------------------------------------------------------------------ # Options #------------------------------------------------------------------------ # What font should be used on the title screen? #------------------------------------------------------------------------ :FONT_FACE => ["VL Gothic", "Verdana", "Arial", "Courier"], #------------------------------------------------------------------------ # What size should the text be? #------------------------------------------------------------------------ :FONT_SIZE => 24, #------------------------------------------------------------------------ # Should the text on the title screen be bold? #------------------------------------------------------------------------ :FONT_BOLD => false, #------------------------------------------------------------------------ # Should the text on the title screen be italic? #------------------------------------------------------------------------ :FONT_ITALIC => false, #------------------------------------------------------------------------ # Should the text on the title screen have a shadow? #------------------------------------------------------------------------ :FONT_SHADOW => false, #------------------------------------------------------------------------ # Should the text on the title screen have an outline? #------------------------------------------------------------------------ :FONT_OUTLINE => true, #------------------------------------------------------------------------ # What colour should the outline be? The format to use is: # [red, green, blue, opacity] #------------------------------------------------------------------------ :FONT_OUT_COL => [0, 0, 0], #------------------------------------------------------------------------ # This is the Windowskin used on the title screen. #------------------------------------------------------------------------ :WINDOWSKIN => "Window", #------------------------------------------------------------------------ # This is the width of the title window. If this is set to 0, the # default width will be used. #------------------------------------------------------------------------ :WINDOW_WIDTH => 200, #------------------------------------------------------------------------ # This is the X position of the title window. If this is set to -1, the # default position will be used. #------------------------------------------------------------------------ :WINDOW_X => 20, #------------------------------------------------------------------------ # This is the Y position of the title window. If this is set to -1, the # default position will be used. #------------------------------------------------------------------------ :WINDOW_Y => 20, #------------------------------------------------------------------------ # This is the opacity of the window. #------------------------------------------------------------------------ :OPACITY => 255, #------------------------------------------------------------------------ # This is the back opacity of the window. #------------------------------------------------------------------------ :BACK_OPACITY => 200, } end #============================================================================ # Window_TitleCommand #============================================================================ class Window_TitleCommand < Window_Command include Title_Screen_Window_Options #-------------------------------------------------------------------------- # alias method: initialize #-------------------------------------------------------------------------- alias ze_tsto_initialize initialize def initialize #--- ze_tsto_initialize #--- self.windowskin = Cache.system(ZE_TSWO[:WINDOWSKIN]) self.opacity = ZE_TSWO[:OPACITY] self.back_opacity = ZE_TSWO[:BACK_OPACITY] #--- end #-------------------------------------------------------------------------- # alias method: window_width #-------------------------------------------------------------------------- alias ze_tswo_window_width window_width def window_width #--- if ZE_TSWO[:WINDOW_WIDTH] != 0 return ZE_TSWO[:WINDOW_WIDTH] else ze_tswo_window_width end #--- end #-------------------------------------------------------------------------- # alias method: draw_item #-------------------------------------------------------------------------- alias ze_tswo_draw_item draw_item def draw_item(index) #--- contents.font.name = ZE_TSWO[:FONT_FACE] contents.font.size = ZE_TSWO[:FONT_SIZE] contents.font.bold = ZE_TSWO[:FONT_BOLD] contents.font.italic = ZE_TSWO[:FONT_ITALIC] contents.font.shadow = ZE_TSWO[:FONT_SHADOW] contents.font.outline = ZE_TSWO[:FONT_OUTLINE] contents.font.out_color = Color.new(ZE_TSWO[:FONT_OUT_COL][0], ZE_TSWO[:FONT_OUT_COL][1], ZE_TSWO[:FONT_OUT_COL][2]) #--- ze_tswo_draw_item(index) #--- end #-------------------------------------------------------------------------- # overwrite method: update_placement #-------------------------------------------------------------------------- def update_placement #--- if ZE_TSWO[:WINDOW_X] != -1 self.x = ZE_TSWO[:WINDOW_X] else self.x = (Graphics.width - width) / 2 end #--- if ZE_TSWO[:WINDOW_Y] != -1 self.y = ZE_TSWO[:WINDOW_Y] else self.y = (Graphics.height * 1.6 - height) / 2 end #--- end end Extras The Windowskin used in the second example is attached to this thread. Edited January 6, 2012 by Zerbu 2 skeletonjack and maohnoraiden reacted to this Share this post Link to post Share on other sites
Oscar92player 1 Posted January 6, 2012 Great script! Reminds me the title screen of Kingdom Hearts. 1 DoctorArtist reacted to this Share this post Link to post Share on other sites
Pringlesguy 8 Posted July 29, 2012 where do I put it Share this post Link to post Share on other sites
ZeoxAeroSmith 0 Posted July 30, 2012 where do I put it Under Materials, above Main. Share this post Link to post Share on other sites
skeletonjack 0 Posted October 10, 2012 Thanks, very useful, Share this post Link to post Share on other sites
DangerZone 21 Posted February 9, 2013 (edited) How do I go about getting the text almost all the way to the left side like in the second screenshot? Edit: Nevermind, I figured it out. Awesome script Zerbu! Edited February 9, 2013 by Jaysynn Share this post Link to post Share on other sites
maohnoraiden 0 Posted March 18, 2013 Awesome script, gonna be using this with my games title screens. Cheers Share this post Link to post Share on other sites
Kestrelio 0 Posted September 1, 2013 Thanks for this! Share this post Link to post Share on other sites
regendo 204 Posted September 1, 2013 Please don't necro-post without good reason. Share this post Link to post Share on other sites
Xera 0 Posted November 3, 2013 Script 'Cache' line 106: RGSSError occurred. failed to create bitmap Whenever I use to second image's Windowskin. What should I do? Share this post Link to post Share on other sites
+ DarthVollis 59 Posted November 5, 2013 @Xera You put the windowskin image in the graphics/system replacing the "window" file. Share this post Link to post Share on other sites