Difference between revisions of "Talk:Tutorial:Using Input"

(Why local text?: new section)
(Why local text?)
 
Line 26: Line 26:
 
And why do we have <code>local text</code> right there at the first line?
 
And why do we have <code>local text</code> right there at the first line?
 
It does nothing special (i.e. the code works without it), might confuse new people to no end and in this case doesn't offer any noticable advantages/speedups. Seriously. --[[User:Robin|Robin]]-<sub>[[User_talk:Robin|gvx]]</sub> 21:19, 14 July 2010 (UTC)
 
It does nothing special (i.e. the code works without it), might confuse new people to no end and in this case doesn't offer any noticable advantages/speedups. Seriously. --[[User:Robin|Robin]]-<sub>[[User_talk:Robin|gvx]]</sub> 21:19, 14 July 2010 (UTC)
 +
 +
(EDIT: not to mention it is left out further in the tutorial, without any explanation, neither about its placement nor about its removal. --[[User:Robin|Robin]]-<sub>[[User_talk:Robin|gvx]]</sub> 21:22, 14 July 2010 (UTC))

Latest revision as of 21:22, 14 July 2010

Why

if key == 'h' then
   if love.mouse.isVisible() then
      love.mouse.setVisible(false)
   else
      love.mouse.setVisible(true)
   end
end

and not

if key == 'h' then
   love.mouse.setVisible(not love.mouse.isVisible())
end

? --Athaudia 13:56, 14 July 2010 (UTC)

On a second thought, this is the tutorial section, so probably better to have it more verbose. --Athaudia 14:42, 14 July 2010 (UTC)

I'm not sure of that. The shorter version may be clearer. It is to me, anyway. Perhaps new lovers/Lua users feel differently? --Robin-gvx 21:16, 14 July 2010 (UTC)

Why local text?

And why do we have local text right there at the first line? It does nothing special (i.e. the code works without it), might confuse new people to no end and in this case doesn't offer any noticable advantages/speedups. Seriously. --Robin-gvx 21:19, 14 July 2010 (UTC)

(EDIT: not to mention it is left out further in the tutorial, without any explanation, neither about its placement nor about its removal. --Robin-gvx 21:22, 14 July 2010 (UTC))