OLD | NEW |
1 function tostr(t) | 1 function tostr(t) |
2 local str = "" | 2 local str = "" |
3 for k, v in next, t do | 3 for k, v in next, t do |
4 if #str > 0 then | 4 if #str > 0 then |
5 str = str .. ", " | 5 str = str .. ", " |
6 end | 6 end |
7 if type(k) == "number" then | 7 if type(k) == "number" then |
8 str = str .. "[" .. k .. "] = " | 8 str = str .. "[" .. k .. "] = " |
9 else | 9 else |
10 str = str .. tostring(k) .. " = " | 10 str = str .. tostring(k) .. " = " |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 | 405 |
406 function onClickHandler(x, y) | 406 function onClickHandler(x, y) |
407 return false | 407 return false |
408 end | 408 end |
409 | 409 |
410 local keyProcs = { | 410 local keyProcs = { |
411 n = next_slide, | 411 n = next_slide, |
412 p = prev_slide, | 412 p = prev_slide, |
413 r = spawn_rotate_animation, | 413 r = spawn_rotate_animation, |
414 s = spawn_scale_animation, | 414 s = spawn_scale_animation, |
415 u = function () scale_text_delta(gTemplate, 1) end, | 415 ["="] = function () scale_text_delta(gTemplate, 1) end, |
416 d = function () scale_text_delta(gTemplate, -1) end, | 416 ["-"] = function () scale_text_delta(gTemplate, -1) end, |
417 } | 417 } |
418 | 418 |
419 function onCharHandler(uni) | 419 function onCharHandler(uni) |
420 local proc = keyProcs[uni] | 420 local proc = keyProcs[uni] |
421 if proc then | 421 if proc then |
422 proc() | 422 proc() |
423 return true | 423 return true |
424 end | 424 end |
425 return false | 425 return false |
426 end | 426 end |
OLD | NEW |