じ☆ve冰风 发表于 2026-8-2 10:56:57

Title Screen Subtitle Text

Title Screen Subtitle Text - 1.0 // A purely visual script. Allows a couple of customization features.

Customization:

[*]Adjust font settings for the subtitles (shadow, outline, bold, italics, name, size)
[*]Adjust alignment and vertical offset of the subtitle text.
Screenshots:




Setup:

[*]Paste under the Materials slot, above main.
[*]No demo necessary.
Usage notes & Planned features:

[*]Don't remove the usage and author part of the header. Reposting isn't allowed.
[*]Possible animation feature + subtitle graphic feature to be added in the future.
                Code:       
#==============================================================================
#
# ** Title: Title Screen Subtitle Text 1.0
#    Created: July 2019
#    Creator: ZirconStorms
#
#------------------------------------------------------------------------------
#
# Script is allowed for commercial and non-commercial games.
# In the game's credits or read.me, credit "ZirconStorms".
#
#==============================================================================
# Customizable Section Begins Here.
#==============================================================================

module GHOSTSUBTITLE
SUBTITLE_FONT_NAME = Font.default_name
#put name in quotes. example: SUBTITLE_FONT_NAME = "Calibri"
#for default font file = Font.default_name
SUBTITLE_ITALICS = false
#true if you want italics, false if you don't want italics.
SUBTITLE_BOLD = false
#true if you want bold, false if you don't want bold.
SUBTITLE_OUTLINE = true
#true if you want outline, false if you don't want outline.
SUBTITLE_SHADOW = false
#true if you want shadow, false if you don't want shadow.
SUBTITLE_SIZE = 32
#size of the subtitle font.
SUBTITLE_ALIGNMENT = 1
#0 = Left; 1 = Center; 2 = Right
SUBTITLE_TEXT = "Subtitle Text"
#Example: SUBTITLE_TEXT = "text goes here"
SUBTITLE_VERTICAL_OFFSET = 40
#Offsets the subtitle pixels downwards.
#You can use - values if you want.
end

#==============================================================================
# Customizable Section Ends Here
#==============================================================================

class Scene_Title < Scene_Base

alias ghostsubtitlestart start
def start
    super
    SceneManager.clear
    Graphics.freeze
    create_subtitle
    ghostsubtitlestart
end

alias ghostsubtitle_terminate terminate
def terminate
    super
    dispose_subtitle
    ghostsubtitle_terminate
end

def create_subtitle
    @subtitle_sprite = Sprite.new
    @subtitle_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
    @subtitle_sprite.z = 300
    @subtitle_sprite.y += GHOSTSUBTITLE::SUBTITLE_VERTICAL_OFFSET
    @subtitle_sprite.bitmap.font.name = GHOSTSUBTITLE::SUBTITLE_FONT_NAME
    @subtitle_sprite.bitmap.font.size = GHOSTSUBTITLE::SUBTITLE_SIZE
    @subtitle_sprite.bitmap.font.outline = GHOSTSUBTITLE::SUBTITLE_OUTLINE
    @subtitle_sprite.bitmap.font.italic = GHOSTSUBTITLE::SUBTITLE_ITALICS
    @subtitle_sprite.bitmap.font.shadow = GHOSTSUBTITLE::SUBTITLE_SHADOW
    @subtitle_sprite.bitmap.font.bold = GHOSTSUBTITLE::SUBTITLE_BOLD
    rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2)
    @subtitle_sprite.bitmap.draw_text(rect, GHOSTSUBTITLE::SUBTITLE_TEXT, GHOSTSUBTITLE::SUBTITLE_ALIGNMENT)
end

def dispose_subtitle
    @subtitle_sprite.bitmap.dispose
    @subtitle_sprite.dispose
end

end




本贴来自国际rpgmaker官方论坛作者:tvghost处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/title-screen-subtitle-text.111255/
页: [1]
查看完整版本: Title Screen Subtitle Text