mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
TouchMenu: added hook to show help text on long-press (#3980)
When Hold and there is no hold callback attached to a menu item, a help_text attribute, when present, is shown in an InfoMessage.
This commit is contained in:
@@ -95,6 +95,7 @@ function ReaderLink:addToMainMenu(menu_items)
|
||||
not isTapToFollowLinksOn())
|
||||
end,
|
||||
separator = true,
|
||||
help_text = _([[Tap on links to follow them.]]),
|
||||
},
|
||||
|
||||
{
|
||||
@@ -104,6 +105,7 @@ function ReaderLink:addToMainMenu(menu_items)
|
||||
G_reader_settings:saveSetting("swipe_to_go_back",
|
||||
not isSwipeToGoBackEnabled())
|
||||
end,
|
||||
help_text = _([[Swipe to the right to go back to the previous location after you have followed a link. When the location stack is empty, swiping to the right takes you to the previous page.]]),
|
||||
},
|
||||
{
|
||||
text = _("Swipe to follow first link on page"),
|
||||
@@ -115,6 +117,7 @@ function ReaderLink:addToMainMenu(menu_items)
|
||||
G_reader_settings:delSetting("swipe_to_follow_nearest_link") -- can't have both
|
||||
end
|
||||
end,
|
||||
help_text = _([[Swipe to the left to follow the first link in the current page.]]),
|
||||
},
|
||||
{
|
||||
text = _("Swipe to follow nearest link"),
|
||||
@@ -126,6 +129,7 @@ function ReaderLink:addToMainMenu(menu_items)
|
||||
G_reader_settings:delSetting("swipe_to_follow_first_link") -- can't have both
|
||||
end
|
||||
end,
|
||||
help_text = _([[Swipe to the left to follow the link nearest to where you started the swipe. This is useful when a small font is used and tapping on small links is tedious.]]),
|
||||
separator = true,
|
||||
},
|
||||
{
|
||||
@@ -135,6 +139,9 @@ function ReaderLink:addToMainMenu(menu_items)
|
||||
G_reader_settings:saveSetting("swipe_to_jump_to_latest_bookmark",
|
||||
not isSwipeToJumpToLatestBookmarkEnabled())
|
||||
end,
|
||||
help_text = _([[Swipe to the left to go the most recently bookmarked page.
|
||||
This can be useful to quickly swipe back and forth between what you are reading and some reference page (for example notes, a map or a characters list).
|
||||
If any of the other Swipe to follow link options is enabled, this will work only when the current page contains no link.]]),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user