Chaos Project

RPG Maker => RPG Maker Scripts => RMVX Script Database => Topic started by: G_G on January 28, 2009, 02:30:26 pm

Title: [VX] Fullscreen?
Post by: G_G on January 28, 2009, 02:30:26 pm
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




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




Author's Notes

Post and bugs, leave your thoughts, and of course give proper credit.
Title: Re: [VX] Fullscreen in VX?
Post by: Blizzard on January 29, 2009, 07:22:37 am
Actually it's called "Fullscreen?". xD
Title: Re: [VX] Fullscreen?
Post by: Sally on January 29, 2009, 08:09:51 am
how come every code i see on this forum theres only 3lines of text and u have to scroll for all the rest?
Title: Re: [VX] Fullscreen?
Post by: Blizzard on January 29, 2009, 08:17:36 am
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. :/
Title: Re: [VX] Fullscreen?
Post by: G_G on January 29, 2009, 08:54:05 am
I have same problem as sally. I guess because I use I.E.
Title: Re: [VX] Fullscreen?
Post by: Blizzard on January 29, 2009, 11:21:19 am
As I said, my IE displays everything. :/