add dark theme

This commit is contained in:
airstruck
2015-12-05 03:53:47 -05:00
parent f03b5c7bd4
commit a2fb4e58c1
38 changed files with 279 additions and 65 deletions
+10
View File
@@ -17,9 +17,19 @@ function Image:constructor (renderer, path)
self.sdlSurface = ffi.gc(
SDL2_image.IMG_Load(path),
sdl.freeSurface)
if self.sdlSurface == nil then
error(ffi.string(sdl.getError()))
end
self.sdlTexture = ffi.gc(
sdl.createTextureFromSurface(renderer, self.sdlSurface),
sdl.destroyTexture)
if self.sdlTexture == nil then
error(ffi.string(sdl.getError()))
end
self.width = self.sdlSurface.w
self.height = self.sdlSurface.h
end