new feature: support for merging screens together
This commit is contained in:
13
src/help.cpp
13
src/help.cpp
@@ -40,14 +40,17 @@ void Help::Init()
|
||||
|
||||
void Help::Resize()
|
||||
{
|
||||
w->Resize(COLS, MainHeight);
|
||||
w->MoveTo(0, MainStartY);
|
||||
size_t x_offset, width;
|
||||
GetWindowResizeParams(x_offset, width);
|
||||
w->Resize(width, MainHeight);
|
||||
w->MoveTo(x_offset, MainStartY);
|
||||
hasToBeResized = 0;
|
||||
}
|
||||
|
||||
void Help::SwitchTo()
|
||||
{
|
||||
using Global::myScreen;
|
||||
using Global::myLockedScreen;
|
||||
|
||||
if (myScreen == this)
|
||||
return;
|
||||
@@ -55,7 +58,10 @@ void Help::SwitchTo()
|
||||
if (!isInitialized)
|
||||
Init();
|
||||
|
||||
if (hasToBeResized)
|
||||
if (myLockedScreen)
|
||||
UpdateInactiveScreen(this);
|
||||
|
||||
if (hasToBeResized || myLockedScreen)
|
||||
Resize();
|
||||
|
||||
if (myScreen != this && myScreen->isTabbable())
|
||||
@@ -211,6 +217,7 @@ void Help::GetKeybindings()
|
||||
*w << DisplayKeys(Key.ToggleFindMode) << "Toggle find mode (normal/wrapped)\n";
|
||||
*w << DisplayKeys(Key.GoToContainingDir) << "Locate song in browser\n";
|
||||
*w << DisplayKeys(Key.GoToMediaLibrary) << "Locate current song in media library\n";
|
||||
*w << DisplayKeys(Key.ToggleScreenLock) << "Lock/unlock current screen\n";
|
||||
# ifdef HAVE_TAGLIB_H
|
||||
*w << DisplayKeys(Key.GoToTagEditor) << "Locate current song in tag editor\n";
|
||||
# endif // HAVE_TAGLIB_H
|
||||
|
||||
Reference in New Issue
Block a user