aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author1029chris <1029chris@gmail.com>2016-05-31 13:18:05 -0700
committer1029chris <1029chris@gmail.com>2016-05-31 13:18:05 -0700
commit0f93500dcd5f72b34225834bf534cd9efed1deea (patch)
tree4587fc44b6dcaf66af9eb77308d1e96289a48eab
parentd307bbb256f35a5c127eaba06e484febf9fce50f (diff)
Work in progress screen resolution settings
-rw-r--r--main.lua2
-rw-r--r--settings.lua43
-rw-r--r--var.lua19
3 files changed, 63 insertions, 1 deletions
diff --git a/main.lua b/main.lua
index 616874f..e49d6a3 100644
--- a/main.lua
+++ b/main.lua
@@ -36,7 +36,7 @@ function love.update(dt)
win[i].update = true
end
elseif love.keyboard.isDown("f5") == true then
- love.window.setMode(1280, 720, {fullscreen=false})
+ love.window.setMode(1280,720,{fullscreen=true, fullscreentype="exclusive"})
for i=1,#win do
win[i].update = true
end
diff --git a/settings.lua b/settings.lua
index e4060ce..1745cfd 100644
--- a/settings.lua
+++ b/settings.lua
@@ -61,6 +61,9 @@ function drawSettings()
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)
+ for i=1,#stre do
+ drawReSel(i)
+ end
end
function stencilBg()
love.graphics.rectangle("fill", 88-64, 44+32, 152, 120)
@@ -87,6 +90,17 @@ function drawDiSel(i)
love.graphics.print(std[i].title, 13, 348+(20*(i-1)))
end
end
+function drawReSel(i)
+ if stre[i].hl == false then
+ love.graphics.setColor(colors.font.dark)
+ love.graphics.print(stre[i].title, 13+384/2+4, 348+(20*(i-1)))
+ elseif stre[i].hl == true then
+ love.graphics.setColor(0,0,120)
+ love.graphics.rectangle("fill", 9+384/2+4, 341+(20*(i-1)), 384/2-6, 20)
+ love.graphics.setColor(colors.font.light)
+ love.graphics.print(stre[i].title, 13+384/2+4, 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
@@ -110,4 +124,33 @@ function updateSettings()
win[6].update = true
end
end
+ for i=1,#stre 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+384/2+4 and sys.mouse.p.x <= win[6].x+13+384/2+4+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
+ stre[i].hl = false
+ end
+ win[6].update = true
+ --[[if stre[i].hl ~= true then
+ if i == 1 then
+ love.window.setMode(1,1,{fullscreen=true, fullscreentype="desktop"})
+ elseif i == 2 then
+ love.window.setMode(1280,720,{fullscreen=true, fullscreentype="exclusive"})
+ elseif i == 3 then
+ love.window.setMode(1920,1080,{fullscreen=true, fullscreentype="exclusive"})
+ elseif i == 4 then
+ love.window.setMode(1280,1024,{fullscreen=true, fullscreentype="exclusive"})
+ elseif i == 5 then
+ love.window.setMode(1440,900,{fullscreen=true, fullscreentype="exclusive"})
+ elseif i == 6 then
+ love.window.setMode(1366,768,{fullscreen=true, fullscreentype="exclusive"})
+ end
+ for i=1,#win do
+ win[i].update = true
+ end
+ stre[i].hl = true
+ end]]--
+ end
+ end
end
diff --git a/var.lua b/var.lua
index 6b3d522..c8436d5 100644
--- a/var.lua
+++ b/var.lua
@@ -202,6 +202,25 @@ function loadVar()
std[6] = {}
std[6].title = "Impossible"
std[6].hl = false
+ stre = {}
+ stre[1] = {}
+ stre[1].title = "Native"
+ stre[1].hl = true
+ stre[2] = {}
+ stre[2].title = "1280x720"
+ stre[2].hl = false
+ stre[3] = {}
+ stre[3].title = "1920x1080"
+ stre[3].hl = false
+ stre[4] = {}
+ stre[4].title = "1280x1024"
+ stre[4].hl = false
+ stre[5] = {}
+ stre[5].title = "1440x900"
+ stre[5].hl = false
+ stre[6] = {}
+ stre[6].title = "1366x768"
+ stre[6].hl = false
f = {}
f.home = {}
f.home[1] = {name="Documents",type=0,x=0,y=0,hl=false}