This page is out of date

You've reached a page on the Ren'Py wiki. Due to massive spam, the wiki hasn't been updated in over 5 years, and much of the information here is very out of date. We've kept it because some of it is of historic interest, but all the information relevant to modern versions of Ren'Py has been moved elsewhere.

Some places to look are:

Please do not create new links to this page.


Themes

Themes provide a simple way of changing the look of the main and game menus. A single function call applies styles to many of the elements of the main and game menus, giving a consistent look to the interface.

Theme functions should be called after the config.screen_width, config.screen_height, and library.script_version variables have been set, and after any layout functions have been called. They should be called before any style is changed by hand.

Theme Functions

These theme functions are

Theme Modifiers

These are functions that can be called after a theme function, allowing you to change a portion of a theme.

Custom Theme

It's also possible to define your own Ren'Py theme. A custom theme consists of Ren'Py code that does the following.

Often, the base styles come in name/name_text pairs. In these cases, name represents a or with style name, in which a with style name_text lives.

The base styles are:

Used for frames on top of which the rest of the interface can comfortably sit.

Used for buttons, especially buttons whose primary purpose is navigating through the interface. (Like the main menu and the game menu navigation buttons.)

Used for smaller navigation buttons. It might make sense to set a minimum width on buttons, but small_buttons should be allowed to shrink as small as possible.

Used for buttons that are arranged in a group, such that only one of the buttons in the group can be selected at a time.

Used for buttons that toggle their selected state to indicate if an option is set or not. (These aren't used in any of the pre-defined layouts.)

Used for large buttons, such as file picker entries, that can contain a large amount of text and other information.

Used for labels, which are small text messages that never change.

Used for prompts, longer text messages which may change at runtime.

Used for horizontal and vertical bars, respectively. Bars are generally intended to indicate a quantity or an amount of progress, but aren't expected to be adjusted by the user.

Used for horizontal and vertical sliders, respectively. Sliders are bars that are used to adjust a value.

Used for horizontal and vertical scrollbars, respectively.

Used for the backgrounds of the main and game menus, respectively.

Generally, themes should not adjust the margins, positioning properties, or maximum sizes of these styles. An exception is that the bars are expected to set a maximum size in a direction perpendicular to the orientation of the bar (ymaximum for bar and scrollbar; xmaximum for vbar and vscrollbar). No limitations apply to the _text styles.