tweak dropdown colors
This commit is contained in:
parent
572ff2fe9b
commit
0cf2ec445a
1 changed files with 4 additions and 4 deletions
|
@ -167,7 +167,7 @@ function self.render()
|
|||
for i,v in ipairs(dropdowns) do
|
||||
local x, y, w, h = v.x, v.y, v.width, fontHeight + margin
|
||||
|
||||
love.graphics.setColor(0.06, 0.06, 0.12, 0.3)
|
||||
love.graphics.setColor(0.06, 0.06, 0.12, 0.6)
|
||||
if love.mouse.getX() > x and love.mouse.getX() < x + w and love.mouse.getY() > y and love.mouse.getY() < y + h then
|
||||
love.graphics.setColor(0.8, 0.8, 1, love.mouse.isDown(1) and 0.4 or 0.3)
|
||||
end
|
||||
|
@ -193,9 +193,9 @@ function self.render()
|
|||
-- help
|
||||
local a = (1 - math.min(math.max((1 - (maxDropdown - gi)) * (1 - (math.abs(dropdownScrollE) / (#v.options - maxDropdown + 1))), 0), 1)) * math.max(math.min(gi - 1, 1), 0) * v.open
|
||||
|
||||
love.graphics.setColor(0.06, 0.06, 0.12, 0.3 * a)
|
||||
love.graphics.setColor(0.06, 0.06, 0.12, 0.6 * a)
|
||||
if mx > x and mx < x + w and my > y and my < y + h then
|
||||
love.graphics.setColor(0.8, 0.8, 1, (love.mouse.isDown(1) and 0.4 or 0.3) * a)
|
||||
love.graphics.setColor(0.4, 0.4, 1, (love.mouse.isDown(1) and 0.8 or 0.7) * a)
|
||||
end
|
||||
love.graphics.rectangle('fill', x, y, w, h)
|
||||
|
||||
|
@ -204,7 +204,7 @@ function self.render()
|
|||
|
||||
love.graphics.setColor(1, 1, 1, 1 * a)
|
||||
if i == v.selected then
|
||||
love.graphics.setColor(0.8, 0.8, 1, 1 * a)
|
||||
love.graphics.setColor(0.5, 0.5, 1, 1 * a)
|
||||
end
|
||||
|
||||
if v.icons and v.icons[i] then
|
||||
|
|
Loading…
Reference in a new issue