console.lua: add gap script-opt
This commit is contained in:
1 parent
d8123d81bd
commit
eac9ab275d
3 files changed
+12
-1
No files matched your search
@@ -0,0 +1 @@
|
||||
add `console-gap` script-opt
|
||||
@@ -151,6 +151,11 @@ Configurable Options
|
||||
The transparency of the menu's background. Ranges from 0 (opaque) to 255
|
||||
(fully transparent).
|
||||
|
||||
``gap``
|
||||
Default: 0.2
|
||||
|
||||
The gap between menu items, specified as a percentage the font size.
|
||||
|
||||
``padding``
|
||||
Default: 10
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ local opts = {
|
||||
font_size = 24,
|
||||
border_size = 1.65,
|
||||
background_alpha = 80,
|
||||
gap = 0.2,
|
||||
padding = 10,
|
||||
menu_outline_size = 0,
|
||||
menu_outline_color = "#FFFFFF",
|
||||
@@ -297,7 +298,11 @@ local function get_scaled_osd_dimensions()
|
||||
end
|
||||
|
||||
local function get_line_height()
|
||||
return selectable_items and opts.font_size * 1.2 or opts.font_size
|
||||
if selectable_items then
|
||||
return opts.font_size * (1 + opts.gap)
|
||||
end
|
||||
|
||||
return opts.font_size
|
||||
end
|
||||
|
||||
local function calculate_max_lines()
|
||||
|
||||
Reference in new issue
Block a user