-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: initial support for updating options at runtime #571
feat: initial support for updating options at runtime #571
Conversation
Well, yeah, there would have to be a lot of tinkering to make everything respond to these updates correctly. And how many people actually need it, or even have a use for it? I don't think the demand matches the effort, but if you want to work on it, I won't stop you :) |
I'll work on it whenever the motivation hits me, but since I don't actually need it myself, it might take a while 😃 @xzpyth can use it as is to make their time precision toggle work. If anyone has any specific options they would like to have working, I'll prioritize those over the rest. |
I am absolute noob in this so I will just stick with vanilla osc + thumbfast + playlist manager since i need the clickable precision time. But thanks for the effort |
But your feature request is not really related to this PR. The timecode is one 'button' in vanilla osc while uosc's timecode is not. edit: I read the posts in discussion and think christoph-heinrich might misunderstand OP's thoughts. |
I have no intention of making the time in the timeline clickable. |
thats why this ui is broken you just don't put timecode into clickable area of timeline (see youtube or vanilla mpv) this is just ridiculous |
If your goal is to simply copy the current timecode to the clipboard, you could instead also use a keybinding like the following:
Note that these assume being run on Linux as well as having |
80fcb33
to
396e594
Compare
@tomasklaen We could have each element react to option changes in the same way they react to property changes by having a That could even be more fine grained by passing in which option has changed, but imo it's fine if all of them do everything for any option change. Even the element based filtering I currently have is probably unnecessary. Thoughts? |
Sure. You can just use |
396e594
to
4f771a1
Compare
Options can be changed during runtime by changing `script-opts`. So far such option changes were simply ignored. Now most options work, and the rest can be implemented when the needed.
4f771a1
to
6261454
Compare
I forgot to give an update on this yesterday. The elements themselves should be done now, but the things that get initialized at the beginning of in main.lua aren't updated yet. |
Options can be changed during runtime by changing `script-opts`. So far such option changes were simply ignored. Now most options work, and the rest can be implemented when the needed.
Options can be changed during runtime by changing
script-opts
.So far such option changes were simply ignored, but basic support for some options is very easy to achieve.
This is a very half baked thing, so far only
time_precision
andfont_scale
have been tested. Options that are as trivial to update asfont_scale
should also work without a problem, but other options need some additional work (similar totime_precision
).Also changes to e.g.
proximity_out
don't execute the same sanity checking as it does during initialization. We could move all the initialization stuff into a function that then gets executed in the update callback, which is trivial for the sanity checking, but requires some more work for theconfig
table. Opinions?