Skip to content

Commit

Permalink
Widen filename list (#6841)
Browse files Browse the repository at this point in the history
* Widen filename list

* Remove underscore that was used for testing

---------

Co-authored-by: Hiney <[email protected]>
  • Loading branch information
pHiney and pHiney authored Dec 1, 2023
1 parent 3f3fd49 commit c7292c1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Modules/BuildList.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ function listMode:Init(selBuildName, subPath)
end

self.anchor = new("Control", nil, 0, 4, 0, 0)
self.anchor.x = function()
return main.screenW / 2
self.anchor.x = function()
return main.screenW / 2
end

self.subPath = subPath or ""
Expand Down Expand Up @@ -60,7 +60,7 @@ function listMode:Init(selBuildName, subPath)
self:SortList()
end)
self.controls.sort:SelByValue(main.buildSortMode, "sortMode")
self.controls.buildList = new("BuildListControl", {"TOP",self.anchor,"TOP"}, 0, 75, 640, 0, self)
self.controls.buildList = new("BuildListControl", {"TOP",self.anchor,"TOP"}, 0, 75, 900, 0, self)
self.controls.buildList.height = function()
return main.screenH - 80
end
Expand All @@ -85,7 +85,7 @@ end

function listMode:OnFrame(inputEvents)
for id, event in ipairs(inputEvents) do
if event.type == "KeyDown" then
if event.type == "KeyDown" then
if event.key == "v" and IsKeyDown("CTRL") then
if self.controls.buildList.copyBuild then
local build = self.controls.buildList.copyBuild
Expand Down Expand Up @@ -182,8 +182,8 @@ function listMode:BuildList()
handle = NewFileSearch(main.buildPath..self.subPath.."*", true)
while handle do
local folderName = handle:GetFileName()
t_insert(self.list, {
folderName = folderName,
t_insert(self.list, {
folderName = folderName,
subPath = self.subPath,
fullFileName = main.buildPath..self.subPath..folderName,
})
Expand All @@ -196,7 +196,7 @@ end

function listMode:SortList()
local oldSelFileName = self.controls.buildList.selValue and self.controls.buildList.selValue.fileName
table.sort(self.list, function(a, b)
table.sort(self.list, function(a, b)
if a.folderName and b.folderName then
return naturalSortCompare(a.folderName, b.folderName)
elseif a.folderName and not b.folderName then
Expand Down

0 comments on commit c7292c1

Please sign in to comment.