Skip to content

GUI customization ​

This page is part of the GenPy Ren'Py learning path. It focuses on practical Ren'Py 8.x production and links each concept back to the GenPy workflow.

Learning goals ​

  • Identify which GUI variable controls a visible part of the interface.
  • Change theme appearance without breaking screen structure.
  • Know when regenerating GUI files is risky.

Core syntax ​

  • gui.rpy
  • screens.rpy
  • gui.*
  • define gui
  • default gui

Runnable example ​

text
## 强调色 / 交互色
define gui.accent_color = '#000060'          # 强调色(标题、选中)
define gui.idle_color = '#606060'            # 普通态文字
define gui.hover_color = '#3284d6'           # 悬停态文字
define gui.selected_color = '#555555'        # 选中态文字
define gui.insensitive_color = '#8888887f'   # 不可用态

## 正文与对话
define gui.text_color = '#402000'            # 正文/对话文字色
define gui.interface_text_color = '#404040'  # 界面文字色

Study outline ​

  • Start with the smallest example for gui customization.
  • Test the key terms in a clean Ren'Py project: gui.rpy, screens.rpy, gui.*, define gui.
  • Move the pattern back into your real project only after the example runs.
  • Use GenPy docs and validation to keep the feature connected to story, assets, and export readiness.

Common pitfalls ​

  • Test the smallest working script before layering on visual or UI complexity.
  • Run Ren'Py Lint before release builds, even when the script appears to run locally.
  • Keep examples in standard .rpy files so they remain editable outside GenPy.

Official references ​

How this fits in GenPy ​

  • Use GenPy GUI Theme docs for safer visual customization.
  • Keep exported gui.rpy and screens.rpy reviewable in Code mode.

Recommended GenPy docs:

Built for GenPy creators.