Skip to content
Snippets Groups Projects
Commit 66cd0d04 authored by dg's avatar dg
Browse files

UI elements are now locked by default, with a small padlock on the toolbar to unlock them

git-svn-id: http://svn.net-core.org/repos/t-engine4@4872 51575b47-30f0-44d4-a5cc-537603b46e54
parent 492c18a3
No related branches found
No related tags found
No related merge requests found
......@@ -183,8 +183,8 @@ function _M:toScreen()
else fade = 0 end
end
if self.shadow then item._tex:toScreenFull(self.display_x+2, h+2, self.fw, self.fh, item._tex_w, item._tex_h, 0,0,0, self.shadow * fade) end
item._tex:toScreenFull(self.display_x, h, self.fw, self.fh, item._tex_w, item._tex_h, 1, 1, 1, fade)
if self.shadow then item._tex:toScreenFull(self.display_x+2, h+2, item.w, item.h, item._tex_w, item._tex_h, 0,0,0, self.shadow * fade) end
item._tex:toScreenFull(self.display_x, h, item.w, item.h, item._tex_w, item._tex_h, 1, 1, 1, fade)
h = h - self.fh
end
......@@ -202,4 +202,15 @@ function _M:scrollUp(i)
if self.scroll > #self.log - 1 then self.scroll = #self.log - 1 end
if self.scroll < 0 then self.scroll = 0 end
self.changed = true
self:resetFade()
end
function _M:resetFade()
local log = self.log
-- Reset fade
local time = core.game.getTime()
for i = 1, #self.dlist do
self.dlist[i].date = time
end
end
......@@ -535,6 +535,13 @@ function _M:scrollUp(i)
if self.scroll < 0 then self.scroll = 0 end
self.changed = true
self:resetFade()
end
function _M:resetFade()
local log = {}
if self.channels[self.cur_channel] then log = self.channels[self.cur_channel].log end
-- Reset fade
local time = core.game.getTime()
for _, item in ipairs(log) do
......
This diff is collapsed.
game/modules/tome/data/gfx/ui/padlock_closed.png

2.59 KiB

game/modules/tome/data/gfx/ui/padlock_open.png

2.5 KiB

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