Skip to content
Snippets Groups Projects
Commit 4771ddf9 authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@3802 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2b944b6b
No related branches found
No related tags found
No related merge requests found
......@@ -125,15 +125,13 @@ function _M:drawFrame(x, y, r, g, b, a)
end
function _M:toScreen(x, y, nb_keyframes)
local zoom = 1
-- We translate and scale opengl matrix to make the popup effect easily
local ox, oy = x, y
local ox, oy = math.floor(x), math.floor(y)
x, y = ox, oy
local hw, hh = math.floor(self.w / 2), math.floor(self.h / 2)
local tx, ty = x + hw, y + hh
x, y = -hw, -hh
core.display.glTranslate(tx, ty, 0)
if zoom < 1 then core.display.glScale(zoom, zoom, zoom) end
-- Draw the frame and shadow
self:drawFrame(x, y, 1, 1, 1, self.frame.a)
......@@ -147,7 +145,6 @@ function _M:toScreen(x, y, nb_keyframes)
end
-- Restiore normal opengl matrix
if zoom < 1 then core.display.glScale() end
core.display.glTranslate(-tx, -ty, 0)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment