Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Unreleased
- Add Rows and RowSpacing settings to display multiple rows of entries on a single page
- Add :up and :down special commands, and Up/Down arrow key navigation when Rows is greater than 1

v2.2 (2024-11-24)
- Make application timeout configurable
- Add WrapEntries feature
Expand Down
10 changes: 6 additions & 4 deletions config/config.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@

[Layout]
@SETTING_MAX_BUTTONS@=@DEFAULT_MAX_BUTTONS@
@SETTING_ROWS@=@DEFAULT_ROWS@
@SETTING_ICON_SIZE@=@DEFAULT_ICON_SIZE@
@SETTING_ICON_SPACING@=@DEFAULT_ICON_SPACING@
@SETTING_ROW_SPACING@=@DEFAULT_ROW_SPACING@
@SETTING_VCENTER@=@DEFAULT_VCENTER@

[Titles]
Expand Down Expand Up @@ -91,8 +93,8 @@ Hotkey1=#1B;:quit
#@SETTING_GAMEPAD_MAPPINGS_FILE@=
@SETTING_GAMEPAD_LSTICK_XM@=:left
@SETTING_GAMEPAD_LSTICK_XP@=:right
#@SETTING_GAMEPAD_LSTICK_YM@=
#@SETTING_GAMEPAD_LSTICK_YP@=
@SETTING_GAMEPAD_LSTICK_YM@=:up
@SETTING_GAMEPAD_LSTICK_YP@=:down
#@SETTING_GAMEPAD_RSTICK_XM@=
#@SETTING_GAMEPAD_RSTICK_XP@=
#@SETTING_GAMEPAD_RSTICK_YM@=
Expand All @@ -110,8 +112,8 @@ Hotkey1=#1B;:quit
#@SETTING_GAMEPAD_BUTTON_RIGHT_STICK@=
#@SETTING_GAMEPAD_BUTTON_LEFT_SHOULDER@=
#@SETTING_GAMEPAD_BUTTON_RIGHT_SHOULDER@=
#@SETTING_GAMEPAD_BUTTON_DPAD_UP@=
#@SETTING_GAMEPAD_BUTTON_DPAD_DOWN@=
@SETTING_GAMEPAD_BUTTON_DPAD_UP@=:up
@SETTING_GAMEPAD_BUTTON_DPAD_DOWN@=:down
@SETTING_GAMEPAD_BUTTON_DPAD_LEFT@=:left
@SETTING_GAMEPAD_BUTTON_DPAD_RIGHT@=:right

Expand Down
4 changes: 4 additions & 0 deletions config/config_settings.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Config setting keys
set(SETTING_DEFAULT_MENU "DefaultMenu")
set(SETTING_MAX_BUTTONS "MaxButtons")
set(SETTING_ROWS "Rows")
set(SETTING_VSYNC "VSync")
set(SETTING_FPS_LIMIT "FPSLimit")
set(SETTING_APPLICATION_TIMEOUT "ApplicationTimeout")
Expand All @@ -17,6 +18,7 @@ set(SETTING_BACKGROUND_OVERLAY_COLOR "OverlayColor")
set(SETTING_BACKGROUND_OVERLAY_OPACITY "OverlayOpacity")
set(SETTING_ICON_SIZE "IconSize")
set(SETTING_ICON_SPACING "IconSpacing")
set(SETTING_ROW_SPACING "RowSpacing")
set(SETTING_TITLES_ENABLED "Enabled")
set(SETTING_TITLE_FONT "Font")
set(SETTING_TITLE_FONT_SIZE "FontSize")
Expand Down Expand Up @@ -96,6 +98,7 @@ set(SETTING_GAMEPAD_BUTTON_DPAD_RIGHT "ButtonDPadRight")
# Default settings
set(DEFAULT_MENU "Main")
set(DEFAULT_MAX_BUTTONS 4)
set(DEFAULT_ROWS 1)
set(DEFAULT_VSYNC "true")
set(DEFAULT_APPLICATION_TIMEOUT "15")
set(DEFAULT_WRAP_ENTRIES "false")
Expand All @@ -119,6 +122,7 @@ set(DEFAULT_BACKGROUND_OVERLAY_COLOR_A "7F")
set(DEFAULT_BACKGROUND_OVERLAY_OPACITY "50%")
set(DEFAULT_ICON_SIZE 256)
set(DEFAULT_ICON_SPACING "5%")
set(DEFAULT_ROW_SPACING "6%")
set(DEFAULT_FONT "OpenSans-Regular.ttf")
set(DEFAULT_FONT_SIZE 36)
set(DEFAULT_TITLES_ENABLED "true")
Expand Down
4 changes: 4 additions & 0 deletions config/launcher_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// Config file setting names
#define SETTING_DEFAULT_MENU "@SETTING_DEFAULT_MENU@"
#define SETTING_MAX_BUTTONS "@SETTING_MAX_BUTTONS@"
#define SETTING_ROWS "@SETTING_ROWS@"
#define SETTING_VSYNC "@SETTING_VSYNC@"
#define SETTING_FPS_LIMIT "@SETTING_FPS_LIMIT@"
#define SETTING_APPLICATION_TIMEOUT "@SETTING_APPLICATION_TIMEOUT@"
Expand All @@ -50,6 +51,7 @@
#define SETTING_BACKGROUND_OVERLAY_OPACITY "@SETTING_BACKGROUND_OVERLAY_OPACITY@"
#define SETTING_ICON_SIZE "@SETTING_ICON_SIZE@"
#define SETTING_ICON_SPACING "@SETTING_ICON_SPACING@"
#define SETTING_ROW_SPACING "@SETTING_ROW_SPACING@"
#define SETTING_TITLES_ENABLED "@SETTING_TITLES_ENABLED@"
#define SETTING_TITLE_FONT "@SETTING_TITLE_FONT@"
#define SETTING_TITLE_FONT_SIZE "@SETTING_TITLE_FONT_SIZE@"
Expand Down Expand Up @@ -127,6 +129,7 @@

// Config file default settings
#define DEFAULT_MAX_BUTTONS @DEFAULT_MAX_BUTTONS@
#define DEFAULT_ROWS @DEFAULT_ROWS@
#define DEFAULT_VSYNC @DEFAULT_VSYNC@
#define DEFAULT_APPLICATION_TIMEOUT @DEFAULT_APPLICATION_TIMEOUT@
#define DEFAULT_WRAP_ENTRIES @DEFAULT_WRAP_ENTRIES@
Expand All @@ -147,6 +150,7 @@
#define DEFAULT_BACKGROUND_OVERLAY_OPACITY "@DEFAULT_BACKGROUND_OVERLAY_OPACITY@"
#define DEFAULT_ICON_SIZE @DEFAULT_ICON_SIZE@
#define DEFAULT_ICON_SPACING "@DEFAULT_ICON_SPACING@"
#define DEFAULT_ROW_SPACING "@DEFAULT_ROW_SPACING@"
#define DEFAULT_FONT_SIZE @DEFAULT_FONT_SIZE@
#define DEFAULT_TITLES_ENABLED @DEFAULT_TITLES_ENABLED@
#define DEFAULT_TITLE_FONT_COLOR_R 0x@DEFAULT_TITLE_FONT_COLOR_R@
Expand Down
24 changes: 21 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,15 +179,22 @@ Default: 50%
The settings in this section define the geometric layout of the launcher.

- [MaxButtons](#maxbuttons)
- [Rows](#rows)
- [IconSize](#iconsize)
- [IconSpacing](#iconspacing)
- [RowSpacing](#rowspacing)
- [VCenter](#vcenter)

##### MaxButtons
The maximum number of buttons that can be displayed on the screen. If a menu has more entries than this value, it will be split into multiple pages. A value of 3-5 is sensible for a typical TV size and viewing distance.
The maximum number of buttons that can be displayed in a single row. If a menu has more entries than fit on a page (`MaxButtons` x `Rows`), it will be split into multiple pages. A value of 3-5 is sensible for a typical TV size and viewing distance.

Default: 4

##### Rows
The number of rows of buttons that are displayed on a page, from 1 to 3. Entries fill the page row by row. A page holds up to `MaxButtons` x `Rows` entries. A menu with fewer entries than fit in one row is still displayed as a single row. The Up and Down keys (and the [:up and :down](#up) special commands) move between rows, but only when `Rows` is greater than 1, so they remain available as [hotkeys](#hotkeys) with the default value. If the rows do not fit on the screen, `RowSpacing` and the highlight vertical padding are reduced, and then the number of rows, until they do.

Default: 1

##### IconSize
The width and height of icons on the screen in pixels. If an icon is not the same resolution, it will be stretched accordingly.

Expand All @@ -198,8 +205,13 @@ Distance between the menu entry icons, in pixels or percent of the screen width.

Default: 5%

##### RowSpacing
When `Rows` is greater than 1, this defines the distance between the rows (from the bottom of one row's title to the top of the next row's icons), in pixels or percent of the screen height.

Default: 6%

##### VCenter
Defines the vertical centering of the menu entries in percent of the screen height. A value of 50% will cause the buttons to be centered halfway in the screen. Increasing the value will lower the buttons, and lowering it will raise them.
Defines the vertical centering of the menu entries in percent of the screen height. With multiple rows, the whole grid of rows is centered on this line. A value of 50% will cause the buttons to be centered halfway in the screen. Increasing the value will lower the buttons, and lowering it will raise them.

Default: 50%

Expand Down Expand Up @@ -416,7 +428,13 @@ Quit Flex Launcher.
Move the highlight cursor left.

#### :right
Move the highlight cursor right.
Move the highlight cursor right. With multiple rows, moving right from the last entry of a row moves to the first entry of the next row, and moving right from the last entry of a page loads the next page.

#### :up
Move the highlight cursor up one row. From the top row, the previous page is loaded and the cursor moves to the bottom row of that page in the same column. Does nothing if `Rows` is 1.

#### :down
Move the highlight cursor down one row. From the bottom row, the next page is loaded and the cursor moves to the top row of that page in the same column. If the row below is a partial row that has no entry in the current column, the last entry of the page is selected. Does nothing if `Rows` is 1.

#### :select
Press enter on the current selection. This special command is only available as a gamepad or hotkey command, it is forbidden for menu entries.
Expand Down
2 changes: 2 additions & 0 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ void debug_settings()

log_debug("======================= Layout =========================\n");
DEBUG_INT(SETTING_MAX_BUTTONS, config.max_buttons);
DEBUG_INT(SETTING_ROWS, config.rows);
DEBUG_INT(SETTING_ICON_SIZE, config.icon_size);
DEBUG_INT(SETTING_ICON_SPACING, config.icon_spacing);
DEBUG_INT(SETTING_ROW_SPACING, config.row_spacing);
DEBUG_STR(SETTING_VCENTER, config.vcenter[0] != '\0' ? config.vcenter : "50%");
log_debug("");

Expand Down
Loading