-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwindowSize.lua
More file actions
24 lines (20 loc) · 765 Bytes
/
windowSize.lua
File metadata and controls
24 lines (20 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--#############################################################################
--# Corona HTML5 Window Size Plugin
--# (c)2018 C. Byerley (develephant)
--#############################################################################
local lib
local platform = system.getInfo("platform")
if platform == 'html5' then
lib = require("windowSize_js")
else
-- wrapper for non web platforms
local CoronaLibrary = require "CoronaLibrary"
-- Create stub library for simulator
lib = CoronaLibrary:new{ name='windowSize', publisherId='com.develephant' }
-- Alert for non-HTML5 platforms
local function defaultFunction()
print( "WARNING: The '" .. lib.name .. "' library is not available on this platform." )
end
lib.getSize = defaultFunction
end
return lib