Add timeline_start_hidden option

This commit is contained in:
Tomas Sardyha
2020-04-24 10:19:37 +02:00
parent 2d2fc7747d
commit e9451be252
3 changed files with 15 additions and 6 deletions

View File

@@ -9,7 +9,7 @@
Most notable features: Most notable features:
- UI elements hide and show based on their proximity to cursor instead of the annoying last mouse move time. This gives you 100% control over when you see the UI and when you don't. Click on the preview above to see it in action. - UI elements hide and show based on their proximity to cursor instead of every time mouse moves. This gives you 100% control over when you see the UI and when you don't. Click on the preview above to see it in action.
- Set min timeline size to make an always visible discrete progress bar. - Set min timeline size to make an always visible discrete progress bar.
- Build your own context menu with nesting support by editing your `input.conf` file. - Build your own context menu with nesting support by editing your `input.conf` file.
- UIs for: - UIs for:
@@ -19,6 +19,8 @@ Most notable features:
- Transform chapters into timeline ranges (the red portion of the timeline in the preview). - Transform chapters into timeline ranges (the red portion of the timeline in the preview).
- And a lot of useful options and commands to bind keys to. - And a lot of useful options and commands to bind keys to.
[Changelog](./CHANGELOG.md).
## Installation ## Installation
**uosc** is a replacement for the built in osc, so that has to be disabled first. **uosc** is a replacement for the built in osc, so that has to be disabled first.
@@ -36,7 +38,7 @@ border=no
Download and save [`uosc.lua`](https://raw.githubusercontent.com/darsain/uosc/master/uosc.lua) into `scripts/` folder. Download and save [`uosc.lua`](https://raw.githubusercontent.com/darsain/uosc/master/uosc.lua) into `scripts/` folder.
To configure **uosc**, create a `script-opts/uosc.conf` file, or download [`uosc.conf`](https://raw.githubusercontent.com/darsain/uosc/master/uosc.conf) from this repository. To configure **uosc**, create a `script-opts/uosc.conf` file, or download [`uosc.conf`](https://raw.githubusercontent.com/darsain/uosc/master/uosc.conf) from this repository, and save into `script-opts/` folder.
## Options ## Options
@@ -50,6 +52,8 @@ timeline_size_max=40
# same as ^ but when in fullscreen # same as ^ but when in fullscreen
timeline_size_min_fullscreen=0 timeline_size_min_fullscreen=0
timeline_size_max_fullscreen=60 timeline_size_max_fullscreen=60
# same thing as calling toggle-progress command once on startup
timeline_start_hidden=no
# timeline opacity # timeline opacity
timeline_opacity=0.8 timeline_opacity=0.8
# top (and bottom in no-border mode) border of background color to help visually # top (and bottom in no-border mode) border of background color to help visually
@@ -185,15 +189,15 @@ You can also click on a faded parent menu to go back to it.
To add a keybind to one of this commands, open your `input.conf` file and add one on a new line. The command syntax is `script-binding uosc/{command-name}`. To add a keybind to one of this commands, open your `input.conf` file and add one on a new line. The command syntax is `script-binding uosc/{command-name}`.
Example to bind the `tab` key to flash timeline: Example to bind the `tab` key to peek timeline:
``` ```
tab script-binding uosc/flash-timeline tab script-binding uosc/peek-timeline
``` ```
Available commands: Available commands:
#### `flash-timeline` #### `peek-timeline`
Expands the bottom timeline until pressed again, or next mouse move. Useful to check times during playback. Expands the bottom timeline until pressed again, or next mouse move. Useful to check times during playback.

View File

@@ -5,6 +5,8 @@ timeline_size_max=40
# same as ^ but when in fullscreen # same as ^ but when in fullscreen
timeline_size_min_fullscreen=0 timeline_size_min_fullscreen=0
timeline_size_max_fullscreen=60 timeline_size_max_fullscreen=60
# same thing as calling toggle-progress command once on startup
timeline_start_hidden=no
# timeline opacity # timeline opacity
timeline_opacity=0.8 timeline_opacity=0.8
# top (and bottom in no-border mode) border of background color to help visually # top (and bottom in no-border mode) border of background color to help visually

View File

@@ -26,6 +26,8 @@ timeline_size_max=40
# same as ^ but when in fullscreen # same as ^ but when in fullscreen
timeline_size_min_fullscreen=0 timeline_size_min_fullscreen=0
timeline_size_max_fullscreen=60 timeline_size_max_fullscreen=60
# same thing as calling toggle-progress command once on startup
timeline_start_hidden=no
# timeline opacity # timeline opacity
timeline_opacity=0.8 timeline_opacity=0.8
# top (and bottom in no-border mode) border of background color to help visually # top (and bottom in no-border mode) border of background color to help visually
@@ -182,6 +184,7 @@ local options = {
timeline_size_max = 40, timeline_size_max = 40,
timeline_size_min_fullscreen = 0, timeline_size_min_fullscreen = 0,
timeline_size_max_fullscreen = 60, timeline_size_max_fullscreen = 60,
timeline_start_hidden = false,
timeline_opacity = 0.8, timeline_opacity = 0.8,
timeline_border = 1, timeline_border = 1,
timeline_step = 5, timeline_step = 5,
@@ -2129,7 +2132,7 @@ elements:add('timeline', Element.new({
captures = {mouse_buttons = true, wheel = true}, captures = {mouse_buttons = true, wheel = true},
pressed = false, pressed = false,
size_max = 0, size_min = 0, -- set in `on_display_resize` handler based on `state.fullscreen` size_max = 0, size_min = 0, -- set in `on_display_resize` handler based on `state.fullscreen`
size_min_override = nil, -- used for toggle-progress command size_min_override = options.timeline_start_hidden and 0 or nil, -- used for toggle-progress command
font_size = 0, -- calculated in on_display_resize font_size = 0, -- calculated in on_display_resize
top_border = options.timeline_border, top_border = options.timeline_border,
bottom_border = 0, -- set dynamically in `border` property observer bottom_border = 0, -- set dynamically in `border` property observer