Main Menu
  • Welcome to The RPG Maker Resource Kit.

Promped for Full Screen

Started by Mr_Wiggles, December 04, 2009, 06:37:09 AM

0 Members and 1 Guest are viewing this topic.

Mr_Wiggles

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




=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.

[spoiler]
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com

[/spoiler]

modern algebra

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

#2
working on DONE - 1.3
modern algebra's sugestion noted and added, thanx for the tip.  ;D
[spoiler]
METALFRESH is a paint contractor that specializes in refinishing metal and vinyl siding. We paint metal buildings as well as siding on homes.

We also

    Refinish decks
    Do custom interior painting
    Strip wallpaper
    Refinish cedar siding
    Metal front doors and sidelights
    Metal garage and service doors
    Grained fiberglass doors

    If your structure is *RUSTED *FADED *CHALKING *IN NEED OF COLOR CHANGE, we can fix it with a guarentee!

northern Illinois and southern Wisconsin.

http://metalfreshcoatings.com

[/spoiler]