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

@@ -51,14 +51,14 @@ function BBoxWidget:init()
}
else
self._confirm_stage = 1 -- 1 for left-top, 2 for right-bottom
self.key_events.MoveIndicatorUp = { { "Up" }, doc="Move indicator up", event="MoveIndicator", args = { 0, -1 } }
self.key_events.MoveIndicatorDown = { { "Down" }, doc="Move indicator down", event="MoveIndicator", args = { 0, 1 } }
self.key_events.MoveIndicatorLeft = { { "Left" }, doc="Move indicator left", event="MoveIndicator", args = { -1, 0 } }
self.key_events.MoveIndicatorRight = { { "Right" }, doc="Move indicator right", event="MoveIndicator", args = { 1, 0 } }
self.key_events.MoveIndicatorUp = { { "Up" }, event="MoveIndicator", args = { 0, -1 } }
self.key_events.MoveIndicatorDown = { { "Down" }, event="MoveIndicator", args = { 0, 1 } }
self.key_events.MoveIndicatorLeft = { { "Left" }, event="MoveIndicator", args = { -1, 0 } }
self.key_events.MoveIndicatorRight = { { "Right" }, event="MoveIndicator", args = { 1, 0 } }
end
if Device:hasKeys() then
self.key_events.Close = { {Device.input.group.Back}, doc = "close windows" }
self.key_events.Select = { {"Press"}, doc = "confirm adjust" }
self.key_events.Close = { { Device.input.group.Back } }
self.key_events.Select = { { "Press" } }
end
end