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.

Title screen change

Acera

Sponsor

I'm looking for a small change in the Title Screen coding, i want the "new game", "continue" and "shutdown" buttons in a stair-like formation, i have a picture to show you what i mean. (sorry about the picture, imageshacks upload seems down).

The 3 buttons should also be around that location.

Thanks in advance
~MindHunterr

Ow, and you get full credit for this ofcourse
 
I have what's for you :)

Code:
#==============================================================================
# Custom Title Screen ver. 1.01
# Script by Paradog Rewritten By Trickster
# http://rpg.para.s3p.net/
#==============================================================================
#--------------------------------------------------------------------------
# * Begin SDK Log
#--------------------------------------------------------------------------
SDK.log("Custom Title Screen", "Paradog/Trickster", 1.01, "3.5.07")

#--------------------------------------------------------------------------
# * Begin SDK Requirement Check
#--------------------------------------------------------------------------
SDK.check_requirements(2.0, [1,2,3,4])

#--------------------------------------------------------------------------
# * Begin SDK Enable Test
#--------------------------------------------------------------------------
if SDK.enabled?("Custom Title Screen")
  
module Para_Title
  #--------------------------------------------------------------------------
  # * Image Menu
  #   - Use Images Instead of a Command Window
  #--------------------------------------------------------------------------
  Image_Menu = true
  #--------------------------------------------------------------------------
  # * Transparent Command Window
  #--------------------------------------------------------------------------
  Transparent = false
  #--------------------------------------------------------------------------
  # * Window Background Opacity
  #--------------------------------------------------------------------------
  Opacity = 160
  #--------------------------------------------------------------------------
  # * Horizontal Command Window Alignment
  #   - set to 0 to override with Position Value
  #   - 1 left 2 center 3 right
  #--------------------------------------------------------------------------
  Horizontal_Align = 2
  #--------------------------------------------------------------------------
  # * Vertical Alignment
  #   - set to 0 to override with Position Value 
  #   - 1 left 2 center 3 right
  #--------------------------------------------------------------------------
  Vertical_Align = 0
  #--------------------------------------------------------------------------
  # * Command Window Position
  #   - x, y
  #--------------------------------------------------------------------------
  Position = 0, 288
  #--------------------------------------------------------------------------
  # * New Game Image Sprite
  #   - Located in Graphics/Titles
  #--------------------------------------------------------------------------
  NewGame = 'newgame', 'newgame_active'
  #--------------------------------------------------------------------------
  # * New Game Position
  #--------------------------------------------------------------------------
  NewGame_Position = 210, 260
  #--------------------------------------------------------------------------
  # * Load Image Sprite
  #   - Located in Graphics/Titles
  #--------------------------------------------------------------------------
  Load = 'continue', 'continue_active'
  #--------------------------------------------------------------------------
  # * Load Position
  #--------------------------------------------------------------------------
  Load_Position = 250, 300
  #--------------------------------------------------------------------------
  # * End Game Image Sprite
  #   - Located in Graphics/Titles
  #--------------------------------------------------------------------------
  End  = 'shutdown', 'shutdown_active'
  #--------------------------------------------------------------------------
  # * End Position
  #--------------------------------------------------------------------------
  End_Position = 290, 340
  #--------------------------------------------------------------------------
  # * Blend Type for Sprites
  #   - 0 normal 1 add 2 subtract
  #--------------------------------------------------------------------------
  Blend_Type = 0
end

class Scene_Title
  #--------------------------------------------------------------------------
  # * Main Sprite
  #--------------------------------------------------------------------------
  alias_method :para_custom_title_main_sprite, :main_sprite
  def main_sprite
    # The Usual
    para_custom_title_main_sprite
    # New Game Sprite
    @sprite_newgame = Sprite.new
    @sprite_newgame.blend_type = Para_Title::Blend_Type
    @sprite_newgame.bitmap = RPG::Cache.title(Para_Title::NewGame[0])
    @sprite_newgame.x, @sprite_newgame.y = Para_Title::NewGame_Position
    # Load Sprite
    @sprite_load = Sprite.new
    @sprite_load.blend_type = Para_Title::Blend_Type
    @sprite_load.bitmap = RPG::Cache.title(Para_Title::Load[0])
    @sprite_load.x, @sprite_load.y = Para_Title::Load_Position
    # End Sprite
    @sprite_end = Sprite.new
    @sprite_end.blend_type = Para_Title::Blend_Type
    @sprite_end.bitmap = RPG::Cache.title(Para_Title::End[0])
    @sprite_end.x, @sprite_end.y = Para_Title::End_Position
  end
  #--------------------------------------------------------------------------
  # * Main Window
  #--------------------------------------------------------------------------
  alias_method :para_custom_title_main_window, :main_window
  def main_window
    # The Usual
    para_custom_title_main_window
    # If Transparent Window Option
    if Para_Title::Transparent
      # Window Transparent
      @command_window.opacity = 0
    else
      # Set Back Opacity to Defined Value
      @command_window.back_opacity = Para_Title::Opacity
    end
    # Branch By Window Align
    case Para_Title::Horizontal_Align
    when 0
      @command_window.x = Para_Title::Position[0]
    when 1
      @command_window.x = 0
    when 2
      @command_window.x = (640 - @command_window.width) / 2
    when 3
      @command_window.x = 640 - @command_window.width
    end
    # Branch By Window Vertical Align
    case Para_Title::Vertical_Align
    when 0
      @command_window.y = Para_Title::Position[1]
    when 1
      @command_window.y = 0
    when 2
      @command_window.y = (480 - @command_window.height) / 2
    when 3
      @command_window.y = 480 - @command_window.height
    end
    # Return if not image menu
    return if not Para_Title::Image_Menu
    # Set Command Window Invisible
    @command_window.visible = false
    # If Continue Enabled
    if @continue_enabled
      # Load Bitmap
      @sprite_load.bitmap = RPG::Cache.title(Para_Title::Load[1])
    else
      # Set Load Opacity
      @sprite_load.opacity = 160
      @sprite_newgame.bitmap = RPG::Cache.title(Para_Title::NewGame[1])
    end
  end
  #--------------------------------------------------------------------------
  # ● Update
  #--------------------------------------------------------------------------
  alias_method :para_custom_title_update, :update
  def update
    # The Usual
    para_custom_title_update
    # Return if not image menu
    return if not Para_Title::Image_Menu
    # If Input
    if Input.repeat?(Input::UP) or Input.repeat?(Input::DOWN)
      # Reset All
      @sprite_newgame.bitmap = RPG::Cache.title(Para_Title::NewGame[0])
      @sprite_load.bitmap = RPG::Cache.title(Para_Title::Load[0])
      @sprite_end.bitmap = RPG::Cache.title(Para_Title::End[0])
      # Brach by command window
      case @command_window.index
      when 0 # new game
        @sprite_newgame.bitmap = RPG::Cache.title(Para_Title::NewGame[1])
      when 1 # load
        @sprite_load.bitmap = RPG::Cache.title(Para_Title::Load[1])
      when 2 # exit
        @sprite_end.bitmap = RPG::Cache.title(Para_Title::End[1])
      end
    end
  end
end
#--------------------------------------------------------------------------
# * End SDK Enable Test
#--------------------------------------------------------------------------
end


Luckily, I use the options in the same locations you want...so you don't have to edit them :)

But you have to create 6 images: the 3 options and the 3 option selected.

This is the result.
View attachment 1978
 
how are you supposed to create the images, are you supposed to change each option in the full menu graphic or make seperate graphics with only the lettering and how does the script know which image to turn on(do they have to have a certain name?) please let me know. Thank you.
 

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