Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

full Screan?

Um, I was just wondering....

How do you make it, so that when you open your game, it will automaticly go into full screan?
that's my only question.
It can be a script, or an event, but I'd rather it not be a script. (I wouldn't mind though.)
Thank you :smile:
 
This is created by Blizzard, taken out of his 'Tons of Addons'.  I changed a couple of things so it will work without the rest of the addons.

EDIT:  This one asks "Would you like to use Fullscreen?" at the very beginning.  The one below this does it automatically.


class Window_FullScreen < Window_Selectable

  def initialize(width, commands)
    super(0, 0, width, commands.size * 32 + 64)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32 + 32)
    if $fontface != nil
      self.contents.font.name = $fontface
      self.contents.font.size = $fontsize
    elsif $defaultfonttype != nil
      self.contents.font.name = $defaultfonttype
      self.contents.font.size = $defaultfontsize
    end
    refresh
    self.index = 0
  end

  def refresh
    self.contents.clear
    qu = 'Switch to fullscreen?'
    self.contents.draw_text(0, 0, width - 32, 32, qu, 1)
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end

  def draw_item(index, color)
    rect = Rect.new(4, 32+32 * index, self.contents.width - 8, 32)
    rect2 = Rect.new(4+1, 32+32 * index+1, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.font.color = color
    self.contents.draw_text(rect, @commands[index], 1)
  end
 
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    self.top_row = row if row < self.top_row
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    cursor_width = 64
    x = (self.contents.width - cursor_width) / 2
    y = @index / @column_max * 32 - self.oy
    self.cursor_rect.set(x, y + 32, cursor_width, 32)
  end

end
 
#==============================================================================
# Scene_Title
#==============================================================================

class Scene_Title
 
  alias main_fullscreen? main
  def main
    if 1 == 1
      unless $game_started
        Graphics.freeze
        $data_system = load_data('Data/System.rxdata')
        $game_system = Game_System.new
        @window = Window_FullScreen.new(320, ['Yes' ,'No'])
        @window.x = 320 - @window.width / 2
        @window.y = 240 - @window.height / 2
        @window.opacity = 0
        Graphics.transition(10)
        loop do
          Graphics.update
          Input.update
          @window.update
          update_window
          break if $game_started
        end
        Graphics.freeze
        @window.dispose
        @window = nil
        Graphics.transition(10)
        Graphics.freeze
      end
    else
      $game_started = true
    end
    main_fullscreen?
  end
 
  def update_window
    if Input.trigger?(Input::C)
      if @window.index == 0
        $game_system.se_play($data_system.decision_se)
        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
        $game_system.se_play($data_system.cancel_se)
      end
      $game_started = true
    elsif Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $game_started = true
    end
  end

end
 
Here you go......

#==============================================================================
# ** Full_Screen
#------------------------------------------------------------------------------
#  Automatically sets the game screen to 'Full screen' upon launch.
#==============================================================================
begin
if $full == nil
$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)
$full = 1
end
end
 
SWEET Script there Bunktown207!! question though any chance of having that as on option in the menu window? I think it would be as simple as changing the class to scene and adding it to the scene_menu as "Display" kind of thing.  Please let me know if I am on the right path or not and stuff, thanks.


[edit] I am using the one that gives you the option
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top