设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 147|回复: 0

[转载发布] Hammy - Window Headers

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    9071

    主题

    864

    回帖

    6万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    58883
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    68848

    灌水之王

    发表于 2026-8-3 15:15:25 | 显示全部楼层 |阅读模式
    Hammy - Window Headers v1.02
    Add labels to your game's windows with customizable headers




    Introduction

    This script provides a customizable header system for all windows in RPG Maker VX Ace. It automatically adds headers above windows to display titles, labels, or decorative graphics that enhance your game's user interface.

    AI Disclaimer: Generative AI was used to refine the documentation and presentation of this script, as I am not a native English speaker. Additionally, AI was used for naming conventions in some places and for general beautification of the script.



    Features

    Core Header Features

    • Automatic header creation for configured windows
    • Text and image header support with dual content types
    • Per-window-class header configuration with custom settings

    Customization System

    • Configurable text styling (font, size, color, outline, shadow)
    • Configurable header positioning (horizontal and vertical offsets)
    • Support for custom header graphics from Graphics/System/Headers folder

    Technical Features

    • Automatic header property updates (position, visibility, and z-index)
    • Guard mechanism to prevent multiple header creation in inherited classes
    • Viewport compatibility for all scene types and window configurations



    Screenshots









    Configuration

    Edit the constants in the Hammy::WindowHeaders module to configure the header positioning offsets, text header settings, and individual window headers.

    Header Positioning Offsets
    Configure the positioning offset for header sprites relative to their parent window. These values control where headers appear in relation to the window borders.

    HEADER_OFFSETS
    Hash containing offset settings for window types.

    - :default: Default offsets for standard windows.

    The following window types require the FF9 Windowskin System:
    - :frame: Offsets for frame-type windows.
    - :topbar: Offsets for topbar-type windows.
    - :help: Offsets for help windows.

    Each type contains:
    - text_offset_x: Horizontal offset for text headers.
    - text_offset_y: Vertical offset for text headers.
    - image_offset_x: Horizontal offset for image headers.
    - image_offset_y: Vertical offset for image headers.

    - Valid values: Hash with Symbol keys and Hash values
    - Default:{ :default => { ... }, ... }

    Example
                    Ruby:       
    1. HEADER_OFFSETS = {
    2.   :default => {
    3.     :text_offset_x => 10,
    4.     :text_offset_y => -4,
    5.     :image_offset_x => 10,
    6.     :image_offset_y => -2
    7.   },
    8.   :frame => {
    9.     :text_offset_x => 10,
    10.     :text_offset_y => -4,
    11.     :image_offset_x => 10,
    12.     :image_offset_y => -2
    13.   },
    14.   :topbar => {
    15.     :text_offset_x => 10,
    16.     :text_offset_y => -4,
    17.     :image_offset_x => 10,
    18.     :image_offset_y => -2
    19.   },
    20.   :help => {
    21.     :text_offset_x => 10,
    22.     :text_offset_y => -4,
    23.     :image_offset_x => 10,
    24.     :image_offset_y => -2
    25.   }
    26. }
    复制代码


    Text Header Settings
    Configure the appearance of text-based headers including font properties and color settings. Colors are stored as RGB arrays and converted to Color objects at runtime for better memory efficiency.

    TEXT_SETTINGS
    Hash containing text header configuration.

    - font_name: Font family name for header text.
    - font_size: Font size in pixels for header text.
    - font_bold: Boolean flag for bold text styling.
    - font_italic: Boolean flag for italic text styling.
    - font_outline: Boolean flag for text outline effect.
    - font_shadow: Boolean flag for text shadow effect.
    - color: RGB array for main text color [R, G, B] (0-255).
    - outline_color: RGB array for text outline color [R, G, B] (0-255).

    - Valid values: Hash with Symbol keys and specific value types
    - Default:{ :font_name => "Arial", :font_size => 13, ... }

    Example
                    Ruby:       
    1. TEXT_SETTINGS = {
    2.   :font_name => "Arial",
    3.   :font_size => 13,
    4.   :font_bold => false,
    5.   :font_italic => false,
    6.   :font_outline => true,
    7.   :font_shadow => false,
    8.   :color => [255, 255, 255],
    9.   :outline_color => [0, 0, 0]
    10. }
    复制代码


    Window Header Configuration
    Configure header settings for specific window classes. Each window class can be assigned either a text header or an image header with custom display content.

    HEADERS
    Hash mapping window classes to their header configuration.

    - Window class => { :type => :type, :string => "content" }

    :type options:
    - :text: Display text header using TEXT_SETTINGS configuration.
    - :image: Display image-based header from Graphics/System/Headers.

    :string content:
    - For :text type: The text string to display in the header.
    - For :image type: Filename (without extension).

    - Valid values: Hash with Window Class keys and Hash values
    - Default:{ Window_Gold => { ... }, ... }

    Example
                    Ruby:       
    1. HEADERS = {
    2.   Window_Gold => {:type => :text, :string => "Gold"},
    3.   Window_MenuCommand => {:type => :text, :string => "Main Menu"},
    4.   Window_MenuStatus => {:type => :text, :string => "Party"},
    5.   Window_SkillList => {:type => :text, :string => "Skills"},
    6.   Window_ChoiceList => {:type => :image, :string => "ChoiceList"}
    7. }
    复制代码




    Installation


    • Copy the script to an open slot below ▼ Materials but above ▼ Main
    • Create a Graphics/System/Headers folder for your header image files
    • Configure your desired headers in the script's configuration section
    • Recommended: Install Text Cache v1.04 by Mithran for optimal text rendering



    Compatibility

    This script is made strictly for RPG Maker VX Ace. It is highly unlikely that it will run with RPG Maker VX without adjusting.



    License

    MIT License - Free for commercial and non-commercial use.



    Credits

    No credits are required.



    Why VX Ace?

    You might wonder why I'm still making scripts for VX Ace instead of MV/MZ. The answer is simple: Ruby is pure beauty, while JavaScript is a terrible language. Ruby's elegant syntax, intuitive design, and expressive power make scripting a joy. JavaScript, on the other hand, is a chaotic mess of inconsistencies and quirks that I simply despise.

    I work with RPG Maker VX Ace for my own game project, and I share the scripts I create with the community. If you're still using VX Ace, you're in good company!



    Download

    Script:Download from GitHub
    Demo:Download from GitHub





    本贴来自国际rpgmaker官方论坛作者:buddysievers处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/hammy-window-headers.180682/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-17 06:16 , Processed in 0.087106 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表