Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- # Play Game Whilst Displaying a Window
- # Version: 1.0
- # Author: DiamondandPlatinum3
- # Date: 29/06/2012
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- # Description:
- # This Script will allow you to display a window
- # with text, but will also allow the player
- # to move.
- #
- # Useful for instructions, or to remind the player
- # about their current quest objectives.
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- #------------------------------------------------------------------------------
- # Instructions:
- #
- # - Place this script in the materials section, above Main.
- #
- # - In a script call event, paste the following:
- #
- # Message_Window_Options::Window_Text[0] =
- # " "
- #
- # Message_Window_Options::Window_Text[1] =
- # " "
- #
- # Message_Window_Options::Window_Text[2] =
- # " "
- #
- # Message_Window_Options::Window_Text[3] =
- # " "
- #
- #
- # - Inside those quotation marks, you insert your line of text
- # for the window.
- # If you have no text to put on any one line, then just leave
- # a space in the quotation marks.
- #
- #
- #
- # - You can also edit the location and size of the window itself.
- # You do not have to do this, but if you wish to make your displayed
- # windows to look somewhat more dynamic rather than just the same
- # over and over again, you can do this.
- #
- # Message_Window_Options::Window_Xpos = ?
- #
- # Message_Window_Options::Window_Ypos = ?
- #
- # Message_Window_Options::Window_Width = ?
- #
- # Message_Window_Options::Window_Height = ?
- #
- # Message_Window_Options::Window_Opacity = ?
- #
- #
- # The ? is where you would need to insert a number.
- # They all mean exactly what they say, so Window_Width is the width of the
- # Window and Window_Opacity is the Opacity of the Window.
- #
- #
- # - If you choose not to define your options before calling the window,
- # either the default values will be used or your previously inserted
- # values will be reused.
- #
- #
- # - Once you have inserted your text and options (if you chose to do so),
- # You now call the window with:
- #
- # @Message_Window = Message_Window.new
- #
- #
- # - When you're finished with the window being displayed, you use this script
- # call to get rid of it:
- #
- # @Message_Window.dispose
- #
- #
- #==============================================================================
- #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
- module Message_Window_Options
- #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- Window_Xpos = 0
- Window_Ypos = 0
- Window_Width = 544
- Window_Height = 128
- Window_Text = ["Line1","Line2","Line3","Line4"]
- Window_Opacity = 100
- #=========------------============---------==--=
- end # of module
- #--------=============------------==========--=-
- class Message_Window < Window_Base
- def initialize
- super(Message_Window_Options::Window_Xpos,Message_Window_Options::Window_Ypos,Message_Window_Options::Window_Width,Message_Window_Options::Window_Height)
- @WLH = line_height
- self.opacity = Message_Window_Options::Window_Opacity
- for i in 0..Message_Window_Options::Window_Text.size
- self.contents.draw_text(0, @WLH*i, Message_Window_Options::Window_Width, @WLH, Message_Window_Options::Window_Text[i], 0)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement