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.

[RESOLVED] Help getting rid of the window border on the title screen.

Ive searched the forums for hours. tried altering many line in scene_title, etc.

What im trying to do is get rid of the border around the "new game, continue, shutdown" on my title screen, ive figured out how to move screen location and set the background color to not show. Also id like to arrange the input commands left to right instead of top to bottom

basically i have  ___________          and i want just 
                      |New Game |                                   
                      |    Cont'    |                                     
                      |    End    |                            New Game Cont' End           
                      ------------
Any help would be much appreciated. I dont want to use a CMS, just this one change.
The only tutorial ive been able to find to edit the code manually like this was on a Japanese website. and alas i dont know Japanese.

Thanks in advance.
 

khmp

Sponsor

The SDK has a Window_HorizCommand class that arranges the options horizontally. Changing the text should be pretty simple if you sifted through the Scene_Title code. If you would like to remove the border however. I'd recommend making a special window skin that the command window in Scene_Title will use that doesn't have a border and just have the back_opacity of the window at 0.

Good luck with it Gulch666! :thumb:
 
thanks for the prompt reply, im not as worried about arranging the options along the bottom, tho it would look nice with the panoramic title screen script im using. the main deal is ditching that border, and since im new to the scripting scene (been using rpg maker since 2k, great artist, mapper, events etc, actually went to school for game art & design but dropped out...ranting)

anyway, you wouldnt know by chance what i have to add to scene_title to make it point to a different window skin? and where said line(s) would go (line# aprox)
 

khmp

Sponsor

Import the window skin into your Windowskin directory. Then go to your Scene_Title script.

Right after this line:
Code:
@command_window = Window_Command.new(192, [s1, s2, s3])
Add the line below:
Code:
@command_window.windowskin = RPG::Cache.windowskin("window_skin_name_here")

Where "window_skin_name_here" is the name of your Windowskin be sure to keep the quotes around it.

Good luck with it Gulch666! :thumb:

If you still want those commands to appear horizontally:
Code:
#==============================================================================
# ** Window_HorizCommand
#------------------------------------------------------------------------------
#  This window deals with general command choices. (Horizontal)
#==============================================================================

class Window_HorizCommand < Window_Selectable
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :commands
  attr_accessor :c_spacing
  attr_accessor :alignment
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(width, commands, c_spacing = (width - 32) / commands.size)
    # Compute window height from command quantity
    super(0, 0, width, 64)
    @commands     = commands
    @item_max     = commands.size
    @column_max   = @item_max
    @c_spacing    = c_spacing
    @alignment    = 1
    self.contents = Bitmap.new(@item_max * @c_spacing, height - 32)
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Command
  #--------------------------------------------------------------------------
  def command(index = self.index)
    return @commands[index]
  end
  #--------------------------------------------------------------------------
  # * Commands
  #--------------------------------------------------------------------------
  def commands=(commands)
    # Return if Commands Are Same
    return if @commands == commands
    # Reset Commands
    @commands = commands
    # Resets Item Max
    item_max    = @item_max
    @item_max   = @commands.size
    @column_max = @item_max
    # If Item Max Changes
    unless item_max == @item_max
      # Deletes Existing Contents (If Exist)
      unless self.contents.nil?
        self.contents.dispose
        self.contents = nil
      end
      # Recreates Contents
      self.contents = Bitmap.new(@item_max * @c_spacing, height - 32)
    end
    # Refresh Window
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    command = commands[index]
    x = index * @c_spacing + 4
    self.contents.font.color = color
    self.contents.draw_text(x, 0, @c_spacing - 8, 32, command, @alignment)
  end
  #--------------------------------------------------------------------------
  # * Disable Item
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(@c_spacing * @index, 0, @c_spacing, 32)
    end
  end
end

Just create an empty code section, "Insert", between Window_Command and Window_Selectable and paste in that code. Then go to your Scene_Title code again and search for this line:
Code:
@command_window = Window_Command.new(192, [s1, s2, s3])
Replace with this line:
Code:
@command_window = Window_HorizCommand.new(192, [s1, s2, s3])
 

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