Skip to content
Snippets Groups Projects
Commit 1c72ae7d authored by dg's avatar dg
Browse files

Fix the lost wife dream when using no shaders

git-svn-id: http://svn.net-core.org/repos/t-engine4@5543 51575b47-30f0-44d4-a5cc-537603b46e54
parent 224b74a2
No related branches found
No related tags found
No related merge requests found
......@@ -181,7 +181,7 @@ return {
level.back_shader = require("engine.Shader").new("funky_bubbles", {})
end,
background = function(level, x, y, nb_keyframes)
if not level.back_shader then return end
if not level.back_shader or not level.back_shader.shad then return end
local sx, sy = level.map._map:getScroll()
local mapcoords = {(-sx + level.map.mx * level.map.tile_w) / level.map.viewport.width , (-sy + level.map.my * level.map.tile_h) / level.map.viewport.height}
level.back_shader:setUniform("xy", mapcoords)
......
......@@ -73,10 +73,12 @@ function _M:init(actor, on_finish, on_birth)
self.key:addCommands{
__TEXTINPUT = function(c)
if c == "+" and self.focus_ui and self.focus_ui.ui.onUse then
self.focus_ui.ui:onUse(self.focus_ui.ui.last_mz.item, true)
elseif c == "-" then
self.focus_ui.ui:onUse(self.focus_ui.ui.last_mz.item, false)
if self.focus_ui.ui.last_mz then
if c == "+" and self.focus_ui and self.focus_ui.ui.onUse then
self.focus_ui.ui:onUse(self.focus_ui.ui.last_mz.item, true)
elseif c == "-" then
self.focus_ui.ui:onUse(self.focus_ui.ui.last_mz.item, false)
end
end
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