Commit Graph

27 Commits

Author SHA1 Message Date
Kingdaro
a7880c5098 add all callbacks for 0.9.0 2013-12-15 00:02:09 -05:00
Matthias Richter
4372c6404c [Gamestate] Add love.textinput to default callback list 2013-12-14 13:01:45 +01:00
Landon Manning
d697664e27 Update for 0.9.0 2013-11-10 00:16:35 -04:00
Matthias Richter
cea730deac Fix bug in GS.push(). 2013-08-24 22:58:30 +02:00
Matthias Richter
87b82750ff Localize function registry to Gamestate.switch(). 2013-08-19 14:10:00 +02:00
Matthias Richter
5c06f3d3d0 [gamestate] Add .current(). Add gamestate stack.
New methods:

function GS.current()
    retrieves currently active gamestate (i.e. the state on top of the
    stack)

function GS.push(state, ...)
    Pushes a state on the stack. Calls state:enter(...), but *not*
    state:leave() on the previous state.

function GS.pop()
    Pops a state from the stack, provided that there are states to pop.
    Calls state:leave() on the state on top of the stack before popping.
2013-08-05 16:30:30 +02:00
Carlo Cabanilla
11cf27df4d Fix "self" param to the GS.leave callback 2013-04-11 23:44:17 -03:00
Matthias Richter
615dd8f111 Fix gamestate:init() bug, and error on undefined callbacks 2013-02-25 18:46:04 +01:00
Matthias Richter
8d4e5bb65f Update license header 2013-02-20 16:54:57 +01:00
Matthias Richter
5b1b67b23e Deprecate gamestate constructor 2013-02-20 15:51:50 +01:00
Matthias Richter
f080a9c14a [Gamestate] Remove __index metamethod for new gamestates (world of pain) 2013-01-27 11:43:39 +01:00
Matthias Richter
d22749990d Allow arbitraty gamestate callbacks 2013-01-26 12:56:59 +01:00
Matthias Richter
914ee08202 Return GS callback result (for love.quit(), etc) 2012-10-06 09:46:36 +02:00
Matthias Richter
adcceed73b Update license header 2012-04-10 17:00:02 +02:00
Matthias Richter
99ece87eb6 Metatable magic in gamestate 2011-11-19 20:41:43 +01:00
Matthias Richter
c8440e2bc0 Fix issue #2: mousepressed doesn't work in gamestate.lua (thanks, benloran!) 2011-09-08 14:26:02 +02:00
Matthias Richter
28b698fb00 Eliminate use of module(...) function 2011-07-06 14:19:31 +02:00
Matthias Richter
e885ec90d4 Add gamestate:init() 2011-03-15 17:34:28 +01:00
Matthias Richter
ec3cfcab53 Apply nevon's patch: More gamestate callbacks 2011-01-22 11:53:31 +01:00
Matthias Richter
9bcb428555 Make proper tail recursion calls 2011-01-19 16:41:59 +01:00
Matthias Richter
d1d6dbb056 Make proper modules 2011-01-18 17:44:38 +01:00
Matthias Richter
902437d562 Throw error in case of missing argument instead of silently failing 2010-11-16 16:26:33 +01:00
Matthias Richter
6b2f1f4caa Add missing callbacks, make ignorant of passed arguments, bug in Gamestate.keypressed 2010-10-31 13:04:08 +01:00
Matthias Richter
8311ddbad1 Add license header 2010-09-19 15:37:55 +02:00
Matthias Richter
6315155955 Bug: prevent from switching to initial gamestate 2010-08-13 15:36:12 +02:00
Matthias Richter
da90605de9 Add error-producing initial gamestate 2010-08-13 14:48:24 +02:00
Matthias Richter
f491a92eaa Initial commit 2010-08-09 17:52:48 +02:00