Author Topic: Promped for Full Screen  (Read 1373 times)

0 Members and 1 Guest are viewing this topic.
Mr_Wiggles Male
****
Rep: +23/-21
Offline Offline
Level 54 (89%)
Promped for Full Screen
« on: December 04, 2009, 01:37:09 AM »

  • Full Screen Prompt
    Version: 1.3
    Author: Mr Wiggles (Creator)
    Date: Dec. 6, 2009

    Version History


    • Version: 1.3 - Plug and Play (Dec. 6, 2009
    • Version: 1.0 - Created (Dec. 2, 2006)

    Planned Future Versions

    • None as of now.

    Description


    This script Prompts the player if they would like to play in full screen with out them having to push Alt + Enter to do so.

    Features

    • Convenient
    • Simple Install
    • Plug and Play - New!

    Screenshots



    Instructions

    Copy and paste ABOVE main and BELLOW everything else!

    Script


    Code: [Select]
    =begin
    ==============================================================================
    Writen by: Mr Wiggles
    ver. 1.3
    Date 12/3/09

    This script is for those who want to make the option of haveing the player
    decide if they would want to play in full screen with out having to press
    Alt + Enter

    Instructions:

    This script is plug and play, just paste it ABOVE main, and BELLOW everything
    else!
    lable it Scene_FullPromt and thats it!

    Hope you enjoy!  >.<

    ==============================================================================
    =end
    #--------------------------------------------------------------------------
    #--------------------------------------------------------------------------
    # Start Scene_FullPromp
    #--------------------------------------------------------------------------
    class Scene_FullPromp
    #------------------------------------------------------------------------------  
    # Begin by loading DataBase
    #------------------------------------------------------------------------------
        $data_system = load_data("Data/System.rxdata")
        $game_system = Game_System.new
    def main
        s1 = "Full Screen"
        s2 = "Windowed"
        @command_window = Window_Command.new(192, [s1, s2])    
        @command_window.back_opacity = 160
        @command_window.x = 320 - @command_window.width / 2
        @command_window.y = 200
        Graphics.transition
        loop do
          Graphics.update
          Input.update
          update
          if $scene != self
            break
          end
        end
        Graphics.freeze
        @command_window.dispose
    end
    #--------------------------------------------------------------------------
    #  Update
    #--------------------------------------------------------------------------
    def update
        @command_window.update
        # If C button was pressed
        if Input.trigger?(Input::C)
          case @command_window.index
          when 0  # Yes
           showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ''
           showm.call(18,0,0,0)
           showm.call(13,0,0,0)
           showm.call(13,0,2,0)
           showm.call(18,0,2,0)
           $scene = nil
          when 1  # No
           $scene = nil
          end
        end
      end
    end
    #---------------------------------------------------------------------------
    # Re-Write Main - It's Temperary for plug and play
    #---------------------------------------------------------------------------
    begin
      Graphics.freeze
       $scene = Scene_FullPromp.new
      while $scene != nil
        $scene.main
      end
      Graphics.transition(20)
    rescue Errno::ENOENT
      filename = $!.message.sub("No such file or directory - ", "")
      print("Unable to find file #{filename}.")
    end


    Credit


    • Mr Wiggles

    Thanks

    • Albertfish - For boosing my self Esteem... lol
    • Modern Algebra - Suggesting Plug and Play

    Support


    If you have any problems PM me or post your question it here.

    Known Compatibility Issues

    None that I know of "I tested with the game I'm making, witch is using ALOT of scripts, it worked fine!"

    Demo


    See attached

    Author's Notes


    Wrote this my self to further teach my self scripting for my game and i figured why not share it and get people's opinions and possibly some hints on how to improve.

    Restrictions

    Don't post this on any other sites.

    « Last Edit: December 06, 2009, 08:02:28 PM by Mr_Wiggles »
    Outbreak: First Blood

    Progress: [=                    ]  9%
    Demo:     [==                  ] 13%
    modern algebra Male
    *
    Rep: +336/-113
    Online Online
    Level 79 (49%)
    Re: Promped for Full Screen
    « Reply #1 on: December 04, 2009, 07:18:08 AM »

  • A nice little script. Good job Wiggles!

    I would suggest that in the future, you write it so that it doesn't require editing of the default scripts and can just be plug & play, but all in all - a good idea for a script.


    Mr_Wiggles Male
    ****
    Rep: +23/-21
    Offline Offline
    Level 54 (89%)
    Re: Promped for Full Screen
    « Reply #2 on: December 06, 2009, 06:53:36 PM »

  • working on DONE - 1.3
    modern algebra's sugestion noted and added, thanx for the tip.  ;D
    « Last Edit: December 06, 2009, 07:58:07 PM by Mr_Wiggles »
    Outbreak: First Blood

    Progress: [=                    ]  9%
    Demo:     [==                  ] 13%
     

    hi

    RMRK.net Theme Super Ultra Mega Beta

    Follow RMRK on Twitter Ask RMRK Questions on Formspring Get RMRK Updates via Windows Live

    Page created in 0.148 seconds with 19 queries.