forked from mia/Aegisub
Add an option to disable keyframes in the audio display only in karaoke mode. Closes #644.
Originally committed to SVN as r5860.
This commit is contained in:
parent
91a62836a5
commit
de03dfd8a8
6 changed files with 11 additions and 8 deletions
|
@ -46,14 +46,14 @@ public:
|
||||||
operator int64_t() const { return position; }
|
operator int64_t() const { return position; }
|
||||||
};
|
};
|
||||||
|
|
||||||
AudioMarkerProviderKeyframes::AudioMarkerProviderKeyframes(agi::Context *c)
|
AudioMarkerProviderKeyframes::AudioMarkerProviderKeyframes(agi::Context *c, const char *opt_name)
|
||||||
: controller(c->audioController)
|
: controller(c->audioController)
|
||||||
, vc(c->videoController)
|
, vc(c->videoController)
|
||||||
, keyframe_slot(vc->AddKeyframesListener(&AudioMarkerProviderKeyframes::Update, this))
|
, keyframe_slot(vc->AddKeyframesListener(&AudioMarkerProviderKeyframes::Update, this))
|
||||||
, audio_open_slot(controller->AddAudioOpenListener(&AudioMarkerProviderKeyframes::Update, this))
|
, audio_open_slot(controller->AddAudioOpenListener(&AudioMarkerProviderKeyframes::Update, this))
|
||||||
, timecode_slot(vc->AddTimecodesListener(&AudioMarkerProviderKeyframes::Update, this))
|
, timecode_slot(vc->AddTimecodesListener(&AudioMarkerProviderKeyframes::Update, this))
|
||||||
, enabled_slot(OPT_SUB("Audio/Display/Draw/Keyframes", &AudioMarkerProviderKeyframes::Update, this))
|
, enabled_slot(OPT_SUB(opt_name, &AudioMarkerProviderKeyframes::Update, this))
|
||||||
, enabled_opt(OPT_GET("Audio/Display/Draw/Keyframes"))
|
, enabled_opt(OPT_GET(opt_name))
|
||||||
, style(new Pen("Colour/Audio Display/Keyframe"))
|
, style(new Pen("Colour/Audio Display/Keyframe"))
|
||||||
{
|
{
|
||||||
Update();
|
Update();
|
||||||
|
|
|
@ -63,7 +63,8 @@ class AudioMarkerProviderKeyframes : public AudioMarkerProvider {
|
||||||
public:
|
public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
/// @param c Project context; must have audio and video controllers initialized
|
/// @param c Project context; must have audio and video controllers initialized
|
||||||
AudioMarkerProviderKeyframes(agi::Context *c);
|
/// @param opt_name Name of the option to use to decide whether or not this provider is enabled
|
||||||
|
AudioMarkerProviderKeyframes(agi::Context *c, const char *opt_name);
|
||||||
/// Explicit destructor needed due to members with incomplete types
|
/// Explicit destructor needed due to members with incomplete types
|
||||||
~AudioMarkerProviderKeyframes();
|
~AudioMarkerProviderKeyframes();
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,7 @@ void AudioMarkerDialogueTiming::InitPair(AudioMarkerDialogueTiming *marker1, Aud
|
||||||
// AudioTimingControllerDialogue
|
// AudioTimingControllerDialogue
|
||||||
|
|
||||||
AudioTimingControllerDialogue::AudioTimingControllerDialogue(agi::Context *c)
|
AudioTimingControllerDialogue::AudioTimingControllerDialogue(agi::Context *c)
|
||||||
: keyframes_provider(c)
|
: keyframes_provider(c, "Audio/Display/Draw/Keyframes in Dialogue Mode")
|
||||||
, timing_modified(false)
|
, timing_modified(false)
|
||||||
, commit_id(-1)
|
, commit_id(-1)
|
||||||
, context(c)
|
, context(c)
|
||||||
|
|
|
@ -151,7 +151,7 @@ AudioTimingControllerKaraoke::AudioTimingControllerKaraoke(agi::Context *c, AssK
|
||||||
, end_pen("Colour/Audio Display/Line boundary End", "Audio/Line Boundaries Thickness")
|
, end_pen("Colour/Audio Display/Line boundary End", "Audio/Line Boundaries Thickness")
|
||||||
, start_marker(ToSamples(active_line->Start.GetMS()), &start_pen, AudioMarker::Feet_Right)
|
, start_marker(ToSamples(active_line->Start.GetMS()), &start_pen, AudioMarker::Feet_Right)
|
||||||
, end_marker(ToSamples(active_line->End.GetMS()), &end_pen, AudioMarker::Feet_Left)
|
, end_marker(ToSamples(active_line->End.GetMS()), &end_pen, AudioMarker::Feet_Left)
|
||||||
, keyframes_provider(c)
|
, keyframes_provider(c, "Audio/Display/Draw/Keyframes in Karaoke Mode")
|
||||||
, auto_commit(OPT_GET("Audio/Auto/Commit")->GetBool())
|
, auto_commit(OPT_GET("Audio/Auto/Commit")->GetBool())
|
||||||
, auto_next(OPT_GET("Audio/Next Line on Commit")->GetBool())
|
, auto_next(OPT_GET("Audio/Next Line on Commit")->GetBool())
|
||||||
, commit_id(-1)
|
, commit_id(-1)
|
||||||
|
|
|
@ -37,7 +37,8 @@
|
||||||
"Dragging Times" : false,
|
"Dragging Times" : false,
|
||||||
"Draw" : {
|
"Draw" : {
|
||||||
"Cursor Time" : true,
|
"Cursor Time" : true,
|
||||||
"Keyframes" : true,
|
"Keyframes in Dialogue Mode" : true,
|
||||||
|
"Keyframes in Karaoke Mode" : true,
|
||||||
"Secondary Lines" : true,
|
"Secondary Lines" : true,
|
||||||
"Selection Background" : true,
|
"Selection Background" : true,
|
||||||
"Timeline" : true,
|
"Timeline" : true,
|
||||||
|
|
|
@ -153,7 +153,8 @@ Audio::Audio(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _(
|
||||||
OptionAdd(display, _("Selection background"), "Audio/Display/Draw/Selection Background");
|
OptionAdd(display, _("Selection background"), "Audio/Display/Draw/Selection Background");
|
||||||
OptionAdd(display, _("Timeline"), "Audio/Display/Draw/Timeline");
|
OptionAdd(display, _("Timeline"), "Audio/Display/Draw/Timeline");
|
||||||
OptionAdd(display, _("Cursor time"), "Audio/Display/Draw/Cursor Time");
|
OptionAdd(display, _("Cursor time"), "Audio/Display/Draw/Cursor Time");
|
||||||
OptionAdd(display, _("Keyframes"), "Audio/Display/Draw/Keyframes");
|
OptionAdd(display, _("Keyframes"), "Audio/Display/Draw/Keyframes in Dialogue Mode");
|
||||||
|
OptionAdd(display, _("Karaoke keyframes"), "Audio/Display/Draw/Keyframes in Karaoke Mode");
|
||||||
OptionAdd(display, _("Video position"), "Audio/Display/Draw/Video Position");
|
OptionAdd(display, _("Video position"), "Audio/Display/Draw/Video Position");
|
||||||
|
|
||||||
SetSizerAndFit(sizer);
|
SetSizerAndFit(sizer);
|
||||||
|
|
Loading…
Reference in a new issue