britzl / monarch

Monarch is a Defold screen manager with transition support and a straight forward API
MIT License
163 stars 23 forks source link

An error in docs (using transitions) #102

Closed ProgrammingLife closed 10 months ago

ProgrammingLife commented 10 months ago

Here: https://github.com/britzl/monarch/blob/master/README_TRANSITIONS.md there is a line:

self.transition.window_resized(message.width, message.height)

but window_resized() is not exist in the current transition instance. It's in the transitions instance:

Looks it should be:

transitions.window_resized(message.width, message.height)

Explanation: If we look at the source: https://github.com/britzl/monarch/blob/master/monarch/transitions/gui.lua then we see that window_resized() method returns directly to a root reference of the module which is imported as:

local transitions = require "..." 

And vice versa:

local transition = transitions.create()
pprint( transition ) 

There is no window_resized() method there.