forked from mia/Aegisub
Add an option to only display visual typesetting tools when the mouse is over the video.
Originally committed to SVN as r4257.
This commit is contained in:
parent
61c141a714
commit
5cbabf2d35
5 changed files with 8 additions and 2 deletions
|
@ -397,6 +397,9 @@ DialogOptions::DialogOptions(wxWindow *parent)
|
|||
control = new wxCheckBox(videoPage,-1,_("Show keyframes in slider"));
|
||||
Bind(control,_T("Show keyframes on video slider"));
|
||||
videoSizer3->Add(control,0,wxEXPAND);
|
||||
control = new wxCheckBox(videoPage,-1,_("Always show visual tools"));
|
||||
Bind(control,_T("Always show visual tools"));
|
||||
videoSizer3->Add(control,0,wxEXPAND);
|
||||
videoSizer3->AddGrowableCol(1,1);
|
||||
|
||||
// Second sizer
|
||||
|
|
|
@ -377,6 +377,7 @@ void OptionsManager::LoadDefaults(bool onlyDefaults,bool doOverride) {
|
|||
SetInt(_T("Audio Sample Rate"),0);
|
||||
|
||||
SetBool(_T("Video Visual Realtime"),true);
|
||||
SetBool(_T("Always show visual tools"),true);
|
||||
SetBool(_T("Detached video"),false);
|
||||
SetInt(_T("Detached video last x"),-1);
|
||||
SetInt(_T("Detached video last y"),-1);
|
||||
|
|
|
@ -291,7 +291,9 @@ void VideoDisplay::Render() try {
|
|||
DrawTVEffects();
|
||||
|
||||
if (visualMode == -1) SetVisualMode(0, false);
|
||||
if (visual) visual->Draw();
|
||||
if (visual && (visual->mouseX > INT_MIN || visual->mouseY > INT_MIN || Options.AsBool(L"Always show visual tools"))) {
|
||||
visual->Draw();
|
||||
}
|
||||
|
||||
glFinish();
|
||||
SwapBuffers();
|
||||
|
|
|
@ -80,6 +80,7 @@ void VisualToolClip::Update() {
|
|||
/// @return
|
||||
///
|
||||
void VisualToolClip::Draw() {
|
||||
if (mouseX == -1 || mouseY == -1) return;
|
||||
// Get current line
|
||||
AssDialogue *line = GetActiveDialogueLine();
|
||||
if (!line) return;
|
||||
|
|
|
@ -90,7 +90,6 @@ void VisualToolCross::Update() {
|
|||
/// @brief Draw
|
||||
///
|
||||
void VisualToolCross::Draw() {
|
||||
// Is it outside?
|
||||
if (mouseX == -1 || mouseY == -1) return;
|
||||
|
||||
// Draw cross
|
||||
|
|
Loading…
Reference in a new issue