Tweaked Main control size/position

This commit is contained in:
Openarl
2017-05-19 14:58:20 +10:00
parent 8c01c85f1f
commit 39804427a9
2 changed files with 10 additions and 10 deletions

View File

@@ -118,23 +118,23 @@ function main:Init()
self.sharedItems = { }
self.anchorUpdate = common.New("Control", nil, 2, 0, 0, 0)
self.anchorUpdate.y = function()
self.anchorMain = common.New("Control", nil, 4, 0, 0, 0)
self.anchorMain.y = function()
return self.screenH - 4
end
self.controls.options = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorUpdate,"BOTTOMLEFT"}, 0, 0, 70, 20, "Options", function()
self.controls.options = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorMain,"BOTTOMLEFT"}, 0, 0, 70, 20, "Options", function()
self:OpenOptionsPopup()
end)
self.controls.about = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorUpdate,"BOTTOMLEFT"}, 230, 0, 70, 20, "About", function()
self.controls.about = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorMain,"BOTTOMLEFT"}, 228, 0, 70, 20, "About", function()
self:OpenAboutPopup()
end)
self.controls.applyUpdate = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorUpdate,"BOTTOMLEFT"}, 0, -28, 110, 20, "^x50E050Update Ready", function()
self.controls.applyUpdate = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorMain,"BOTTOMLEFT"}, 0, -24, 130, 20, "^x50E050Update Ready", function()
self:OpenUpdatePopup()
end)
self.controls.applyUpdate.shown = function()
return launch.updateAvailable and launch.updateAvailable ~= "none"
end
self.controls.checkUpdate = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorUpdate,"BOTTOMLEFT"}, 0, -28, 120, 18, "", function()
self.controls.checkUpdate = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorMain,"BOTTOMLEFT"}, 0, -24, 130, 20, "", function()
launch:CheckForUpdate()
end)
self.controls.checkUpdate.shown = function()
@@ -146,15 +146,15 @@ function main:Init()
self.controls.checkUpdate.enabled = function()
return not launch.updateCheckRunning
end
self.controls.versionLabel = common.New("LabelControl", {"BOTTOMLEFT",self.anchorUpdate,"BOTTOMLEFT"}, 124, -28, 0, 14, "")
self.controls.versionLabel = common.New("LabelControl", {"BOTTOMLEFT",self.anchorMain,"BOTTOMLEFT"}, 134, -27, 0, 14, "")
self.controls.versionLabel.label = function()
return "^8Version: "..launch.versionNumber..(launch.versionBranch == "dev" and " (Dev)" or "")
end
self.controls.devMode = common.New("LabelControl", {"BOTTOMLEFT",self.anchorUpdate,"BOTTOMLEFT"}, 0, -28, 0, 18, "^1Dev Mode")
self.controls.devMode = common.New("LabelControl", {"BOTTOMLEFT",self.anchorMain,"BOTTOMLEFT"}, 0, -26, 0, 20, "^1Dev Mode")
self.controls.devMode.shown = function()
return launch.devMode
end
self.controls.dismissToast = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorUpdate,"BOTTOMLEFT"}, 0, function() return -self.mainBarHeight + self.toastHeight end, 80, 20, "Dismiss", function()
self.controls.dismissToast = common.New("ButtonControl", {"BOTTOMLEFT",self.anchorMain,"BOTTOMLEFT"}, 0, function() return -self.mainBarHeight + self.toastHeight end, 80, 20, "Dismiss", function()
self.toastMode = "HIDING"
self.toastStart = GetTime()
end)