Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: resources/slides.lua

Issue 668023002: use - and = to zoom text in slides (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698