InputContainer: Fall cleanup ;).

Get rid of the doc & seqtext fields, as they are not actually used (nor
are they particularly useful, the event handler's name should be pretty
self-explanatory).

Also, tweak the key_events documentation to highlight the quirks of the
API, especially as far as array nesting is involved...

Random drive-by cleanup of the declarations of key_events & ges_events
to re-use the existing instance object (now that we know they're sane
;p) for tables with a single member (less GC pressure).
This commit is contained in:
NiLuJe
2022-10-27 02:01:51 +02:00
parent 9b2201a438
commit b523c2e8b9
73 changed files with 464 additions and 484 deletions

View File

@@ -34,15 +34,17 @@ function ReaderFont:init()
if Device:hasKeyboard() then
-- add shortcut for keyboard
self.key_events = {
ShowFontMenu = { {"F"}, doc = "show font menu" },
ShowFontMenu = { { "F" } },
IncreaseSize = {
{ "Shift", Input.group.PgFwd },
doc = "increase font size",
event = "ChangeSize", args = 0.5 },
event = "ChangeSize",
args = 0.5
},
DecreaseSize = {
{ "Shift", Input.group.PgBack },
doc = "decrease font size",
event = "ChangeSize", args = -0.5 },
event = "ChangeSize",
args = -0.5
},
}
end
-- Build face_table for menu