diff options
Diffstat (limited to 'settings.lua')
| -rw-r--r-- | settings.lua | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/settings.lua b/settings.lua index 84727f3..e4060ce 100644 --- a/settings.lua +++ b/settings.lua @@ -20,6 +20,19 @@ function drawSettings() elseif st[6].hl == true then desktop.bg.current = desktop.bg.coast end + if std[1].hl == true then + di = 0.4 + elseif std[2].hl == true then + di = 0.7 + elseif std[3].hl == true then + di = 1 + elseif std[4].hl == true then + di = 1.3 + elseif std[5].hl == true then + di = 1.6 + elseif std[6].hl == true then + di = 3 + end love.graphics.stencil(stencilBg, "replace", 1) love.graphics.setStencilTest("greater", 0) if desktop.bg.current ~= 0 then @@ -33,6 +46,21 @@ function drawSettings() for i=1,6 do drawBgSel(i) end + drawDownBox(8, 305, 384/2-4, 25, 2) + love.graphics.setColor(colors.font.dark) + love.graphics.print("Difficulty", 14, 313) + drawDownBox(8, 340, 384/2-4, 198, 2) + love.graphics.setColor(255,255,255) + love.graphics.rectangle("fill", 9, 341, 384/2-6, 196) + for i=1,6 do + drawDiSel(i) + end + drawDownBox(8+384/2+4, 305, 384/2-4, 25, 2) + love.graphics.setColor(colors.font.dark) + love.graphics.print("Resolution", 14+384/2+4, 313) + drawDownBox(8+384/2+4, 340, 384/2-4, 198, 2) + love.graphics.setColor(255,255,255) + love.graphics.rectangle("fill", 9+384/2+4, 341, 384/2-2-4, 196) end function stencilBg() love.graphics.rectangle("fill", 88-64, 44+32, 152, 120) @@ -48,6 +76,17 @@ function drawBgSel(i) love.graphics.print(st[i].title, 268, 78+(20*(i-1))) end end +function drawDiSel(i) + if std[i].hl == false then + love.graphics.setColor(colors.font.dark) + love.graphics.print(std[i].title, 13, 348+(20*(i-1))) + elseif std[i].hl == true then + love.graphics.setColor(0,0,120) + love.graphics.rectangle("fill", 9, 341+(20*(i-1)), 384/2-6, 20) + love.graphics.setColor(colors.font.light) + love.graphics.print(std[i].title, 13, 348+(20*(i-1))) + end +end function updateSettings() for i=1,6 do if (layer[1] == 6 and win[6].hover == true and sys.mouse.p.p == true and sys.mouse.drag == false and @@ -60,4 +99,15 @@ function updateSettings() win[6].update = true end end + for i=1,6 do + if (layer[1] == 6 and win[6].hover == true and sys.mouse.p.p == true and sys.mouse.drag == false and + sys.mouse.p.x >= win[6].x+13 and sys.mouse.p.x <= win[6].x+13+120 and + sys.mouse.p.y >= win[6].y+342+(20*(i-1)) and sys.mouse.y <= win[6].y+342+(20*(i-1))+20) then + for i=1,6 do + std[i].hl = false + end + std[i].hl = true + win[6].update = true + end + end end |
