comparison Libs/DF/textentry.lua @ 49:7d5934415ad0 r49-release

- framework update.
author Tercio
date Wed, 05 Jul 2017 15:20:21 -0300
parents a960d5372b0c
children 7c0f819a85c6
comparison
equal deleted inserted replaced
48:a671a2cf52ee 49:7d5934415ad0
367 end 367 end
368 368
369 local OnEnterPressed = function (textentry, byScript) 369 local OnEnterPressed = function (textentry, byScript)
370 local capsule = textentry.MyObject 370 local capsule = textentry.MyObject
371 371
372 local kill = capsule:RunHooksForWidget ("OnEnterPressed", textentry, capsule) 372 local kill = capsule:RunHooksForWidget ("OnEnterPressed", textentry, capsule, capsule.text)
373 if (kill) then 373 if (kill) then
374 return 374 return
375 end 375 end
376 376
377 local texto = DF:trim (textentry:GetText()) 377 local texto = DF:trim (textentry:GetText())
396 end 396 end
397 397
398 local OnEscapePressed = function (textentry) 398 local OnEscapePressed = function (textentry)
399 local capsule = textentry.MyObject 399 local capsule = textentry.MyObject
400 400
401 local kill = capsule:RunHooksForWidget ("OnEscapePressed", textentry, capsule) 401 local kill = capsule:RunHooksForWidget ("OnEscapePressed", textentry, capsule, capsule.text)
402 if (kill) then 402 if (kill) then
403 return 403 return
404 end 404 end
405 405
406 textentry.focuslost = true 406 textentry.focuslost = true
420 420
421 local capsule = textentry.MyObject 421 local capsule = textentry.MyObject
422 422
423 if (textentry:IsShown()) then 423 if (textentry:IsShown()) then
424 424
425 local kill = capsule:RunHooksForWidget ("OnEditFocusLost", textentry, capsule) 425 local kill = capsule:RunHooksForWidget ("OnEditFocusLost", textentry, capsule, capsule.text)
426 if (kill) then 426 if (kill) then
427 return 427 return
428 end 428 end
429 429
430 if (not textentry.focuslost) then 430 if (not textentry.focuslost) then