---
title: Controller Bar
description: "Learn how to use ControllerBar, a controller-friendly bar for Ren'Py which doesn't need to be selected to be adjusted."
url: "https://feniksdev.com/tool/controller-bar/"
updated: "2025-02-09"
category: Controller Support Expansion
---

# Controller Bar

Controller Support Expansion for Ren'Py includes several features to improve controller and keyboard support in Ren'Py. Pick up the tool from itch.io if you haven't already:

[https://itch.io/embed/2766391?bg_color=21212d&fg_color=f7f7ed&link_color=f93c3e&border_color=ff8335](https://itch.io/embed/2766391?bg_color=21212d&fg_color=f7f7ed&link_color=f93c3e&border_color=ff8335)

   **Contents**  [hide](#)     [ControllerBar](#ControllerBar)  [Examples](#Examples)  [Design Notes](#Design_Notes)

## ControllerBar

ControllerBar is a controller- and keyboard-friendly bar variant which does not need to be grabbed to be adjusted. `controller_bar` is horizontal and can be controlled immediately with left/right input, and `controller_vbar` is vertical and can be controlled with up/down input. It is intended for bars which will be adjusted by the user; if a bar's value is controlled by the game (e.g. a health bar), then a regular `bar`/`vbar` is sufficient.

ControllerBar takes all the same properties as a regular bar does; see [https://www.renpy.org/doc/html/screens.html#bar](https://www.renpy.org/doc/html/screens.html#bar) for more information. It also functions identically to a regular bar when the mouse is used; the only changes are for when the bar gains focus with the arrow keys or controller directional inputs.

## Examples

`controller_bar` is for horizontal bars. It's useful for most preferences screens.

```renpy
vbox:
    label _("Text Speed")
    controller_bar value Preference("text speed")
```

`controller_vbar` is similar, but creates a vertical bar rather than a horizontal one (like `vbar` vs `bar`). This can be used for preference screens or gameplay options as well. For scroll bars, I recommend using the [Controller Viewport](https://feniksdev.com/tool/controller-viewport/) instead.

```renpy
hbox:
    label _("Music Volume")
    controller_vbar value Preference("music volume") style "my_music_bar"
```

You can also provide your own adjustable values:

```renpy
screen battle():
    controller_bar:
        value FieldValue(player, "health", range=100)
        align (1.0, 0.0) ysize 50 xsize 200
```

## Design Notes

ControllerBar is best used when the bar in question is part of a column (for `controller_bar`) or row (for `controller_vbar`) of other items. Due to how the bar is auto-selected once focused, you will be unable to use left/right input for `controller_bar` to focus anything to the left or right of the bar, since it will adjust the value of the bar rather than focusing an item to the left/right. The same applies to up/down input for `controller_vbar`. In more concrete terms, layouts like this work best with controller and keyboard navigation:

![A preferences screen is shown, with the Audio tab selected. Several volume control bars are arranged in a column.](https://feniksdev.com/wp-content/uploads/2025/01/screenshot0024-1024x576.png)

In this example, the bars are focused using the up/down inputs, and left/right is solely for adjusting the bar value. Other shortcuts are used to navigate to different pages or dismiss the menu.
