just some reformatting

This commit is contained in:
Tim Anema 2014-11-07 09:21:41 -05:00
parent 1c5eb2c804
commit c370e9ecc2
3 changed files with 175 additions and 176 deletions

View File

@ -1,5 +1,4 @@
extern Image glowImage;
extern float glowTime;
vec4 effect(vec4 color, Image texture, vec2 texture_coords, vec2 pixel_coords) {

View File

@ -49,7 +49,6 @@ function love.keypressed(k) end
function love.keyreleased(k) end
function love.mousepressed(x, y, b) end
function love.mousereleased(x, y, b) end
function exf.empty() end
function exf.update(dt)
@ -163,8 +162,6 @@ function exf.clear()
love.graphics.setColor(255, 255, 255)
love.graphics.setLineWidth(1)
love.graphics.setLineStyle("smooth")
--love.graphics.setLine(1, "smooth")
--love.graphics.setColorMode("replace")
love.graphics.setBlendMode("alpha")
love.mouse.setVisible(true)
end
@ -278,7 +275,6 @@ function List:update(dt)
end
self.bar_lock.y = love.mouse.getY()
end
end
@ -296,10 +292,14 @@ function List:mousepressed(mx, my, b)
if b == "wd" then
self.bar_pos = self.bar_pos + bar_pixel_dt
if self.bar_pos > self.bar_max_pos then self.bar_pos = self.bar_max_pos end
if self.bar_pos > self.bar_max_pos then
self.bar_pos = self.bar_max_pos
end
elseif b == "wu" then
self.bar_pos = self.bar_pos - bar_pixel_dt
if self.bar_pos < 0 then self.bar_pos = 0 end
if self.bar_pos < 0 then
self.bar_pos = 0
end
end
end
@ -323,14 +323,12 @@ function List:mousereleased(x, y, b)
end
function List:getBarRect()
return
self.x+self.width+2, self.y+1+self.bar_pos,
return self.x+self.width+2, self.y+1+self.bar_pos,
self.bar_width-3, self.bar_size
end
function List:getItemRect(i)
return
self.x+2, self.y+((self.item_height+1)*(i-1)+1)-self:getOffset(),
return self.x+2, self.y+((self.item_height+1)*(i-1)+1)-self:getOffset(),
self.width-3, self.item_height
end
@ -346,8 +344,10 @@ function List:draw()
-- Get interval to display.
local start_i = math.floor( self:getOffset()/(self.item_height+1) ) + 1
local end_i = start_i+math.floor( self.height/(self.item_height+1) ) + 1
if end_i > self.items.n then end_i = self.items.n end
if end_i > self.items.n then
end_i = self.items.n
end
love.graphics.setScissor(self.x, self.y, self.width, self.height)