Skip to content
Snippets Groups Projects
Commit 5f0a8509 authored by dg's avatar dg
Browse files

fix

git-svn-id: http://svn.net-core.org/repos/t-engine4@4081 51575b47-30f0-44d4-a5cc-537603b46e54
parent 6a478879
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,7 @@ project "TEngine"
links { "IOKit" }
configuration "windows"
links { "mingw32", "SDLmain", "SDL", "SDL_ttf", "SDL_image", "openal32", "vorbisfile", "OPENGL32", "GLU32", "wsock32" }
links { "mingw32", "SDLmain", "SDL", "SDL_ttf", "SDL_image", "openal32", "vorbisfile", "OPENGL32", "GLU32", "wsock32", "png12" }
defines { [[TENGINE_HOME_PATH='"T-Engine"']], 'SELFEXE_WINDOWS' }
prebuildcommands { "windres ../src/windows/icon.rc -O coff -o ../src/windows/icon.res" }
linkoptions { "../src/windows/icon.res" }
......
......@@ -143,9 +143,11 @@ function _M:display(nb_keyframes)
self.flyers:display(nb_keyframes)
end
for i, d in ipairs(self.dialogs) do
d:display()
d:toScreen(d.display_x, d.display_y, nb_keyframes)
if not self.suppressDialogs then
for i, d in ipairs(self.dialogs) do
d:display()
d:toScreen(d.display_x, d.display_y, nb_keyframes)
end
end
-- Check profile thread events
......@@ -492,7 +494,12 @@ end
-- @param for_savefile The screenshot will be used for savefile display
function _M:takeScreenshot(for_savefile)
if for_savefile then
return core.display.getScreenshot(self.w / 4, self.h / 4, self.w / 2, self.h / 2)
self.suppressDialogs = true
core.display.forceRedraw()
local sc = core.display.getScreenshot(self.w / 4, self.h / 4, self.w / 2, self.h / 2)
self.suppressDialogs = nil
core.display.forceRedraw()
return sc
else
return core.display.getScreenshot(0, 0, self.w, self.h)
end
......
......@@ -1619,13 +1619,21 @@ end
-- @param for_savefile The screenshot will be used for savefile display
function _M:takeScreenshot(for_savefile)
if for_savefile then
self.suppressDialogs = true
core.display.forceRedraw()
local x, y = self.w / 4, self.h / 4
if self.level then
x, y = self.level.map:getTileToScreen(self.player.x, self.player.y)
x, y = x - self.w / 4, y - self.h / 4
x, y = util.bound(x, 0, self.w / 2), util.bound(y, 0, self.h / 2)
end
return core.display.getScreenshot(x, y, self.w / 2, self.h / 2)
local sc = core.display.getScreenshot(x, y, self.w / 2, self.h / 2)
self.suppressDialogs = nil
core.display.forceRedraw()
return sc
else
return core.display.getScreenshot(0, 0, self.w, self.h)
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