[VX] Fullscreen?

Started by G_G, January 28, 2009, 02:30:26 pm

Previous topic - Next topic

G_G

January 28, 2009, 02:30:26 pm Last Edit: February 21, 2009, 05:43:38 am by shdwlink1993
Fullscreen?
Authors: game_guy, Blizzard
Version: 1.0
Type: Misc Add-On
Key Term: Misc Add-On



Introduction

I converted Blizzard's Fullscreen Snippet to VX that way Sally could use it in her game.


Features


  • Can automatically go to fullscreen when game starts.
  • Can be set to ask you if you would like fullscreen.



Screenshots

C'mon is it necessary in a fullscreen script?


Demo

Here if you want it.
http://www.sendspace.com/file/vnggxj


Script


Spoiler: ShowHide

module ADDON
  ASK_FULLSCREEN = false # if set to false it wont ask you and it'll go straight to
                    # fullscreen
end
class Window_Text < Window_Base
  def initialize(x, y)
    super(x, y, 544, 64)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(0, 0, 544, 32, "Would You Like To Switch to Fullscreen?")
  end
end

class Scene_Title
 
  alias main_fullscreen? main
  def main
    if ADDON::ASK_FULLSCREEN
      unless $game_started
        Graphics.freeze
        $data_system = load_data('Data/System.rvdata')
        $game_system = Game_System.new
        @text_window = Window_Text.new(92, 128)
        @text_window.back_opacity = 0
        @text_window.opacity = 0
        s1 = "Yes"
        s2 = "No"
        @window = Window_Command.new(96, [s1 ,s2])
        @window.x = 92
        @window.y = 240 - @window.height / 2
        @window.opacity = 0
        Graphics.transition
        loop do
          Graphics.update
          Input.update
          @window.update
          update_window
          break if $game_started
        end
        Graphics.freeze
        @window.dispose
        @window = nil
        @text_window.dispose
        Graphics.transition
        Graphics.freeze
      end
    else
      $game_started = true
      auto
    end
    main_fullscreen?
  end
 
  def update_window
    if Input.trigger?(Input::C)
      if @window.index == 0
        Sound.play_decision
        keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
        keybd.call(0xA4, 0, 0, 0)
        keybd.call(13, 0, 0, 0)
        keybd.call(13, 0, 2, 0)
        keybd.call(0xA4, 0, 2, 0)
      else
      end
      $game_started = true
    elsif Input.trigger?(Input::B)
      $game_started = true
    end
  end
  def auto
    keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v'
    keybd.call(0xA4, 0, 0, 0)
    keybd.call(13, 0, 0, 0)
    keybd.call(13, 0, 2, 0)
    keybd.call(0xA4, 0, 2, 0)
    $game_started = true
  end
end



Instructions

In the config you'll see this.

ASK_FULLSCREEN = true/false

If true it will ask you if you would like to switch to fullscreen
If false it will go fullscreen automatically.


Compatibility

None that I know of really. I don't use vx.


Credits and Thanks


  • game_guy for converting it
  • Almighty Blizzard for creating XP version.



Author's Notes

Post and bugs, leave your thoughts, and of course give proper credit.

Blizzard

Actually it's called "Fullscreen?". xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Sally

how come every code i see on this forum theres only 3lines of text and u have to scroll for all the rest?

Blizzard

That's weird. On my PC in Opera and Firefox it shows 20 lines and a scrollbar and in Internet Explorer it shows the entire box. :/ Which are you using? I definitely set the max height to 20 lines + scrollbar if over 20 lines. :/
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

I have same problem as sally. I guess because I use I.E.

Blizzard

As I said, my IE displays everything. :/
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.