Skip to content

Instantly share code, notes, and snippets.

View ggcrunchy's full-sized avatar

Steven Johnson ggcrunchy

View GitHub Profile
@ggcrunchy
ggcrunchy / layout.lua
Created January 10, 2015 03:10
A couple of mostly self-contained layout utility modules for Corona SDK
--- Utilities for layout handling.
--
-- These are designed to allow layout decisions and queries, without worrying about the
-- anchor points of the objects in question. In many cases, positions may be substituted
-- for objects, as well.
--
-- With respect to this module, a **Number** may be any of the following:
--
-- * A number, or a string that @{tonumber} is able to convert. These values are used as is.
-- * A string of the form **"AMOUNT%"**, e.g. `"20%"` or `"-4.2%"`, which resolves to the