Change the Songbook search field to be more compatible with UI mods

It's at the top of the list now. Closes #90
This commit is contained in:
Kae 2024-07-29 14:59:52 +10:00
parent e9e87a1c3c
commit 1224213cab
3 changed files with 17 additions and 22 deletions

View File

@ -1,22 +0,0 @@
{
"paneLayout" : {
"group" : {
"position" : [8, 71]
},
"search" : {
"type" : "textbox",
"position" : [86, 71],
"hint" : "Search",
"maxWidth" : 50
},
"lblBandInput" : {
"position" : [3, 68]
},
"lblSearchInput" : {
"type" : "image",
"file" : "/interface/songbook/band.png",
"position" : [81, 68],
"zlevel" : -3
}
}
}

View File

@ -0,0 +1,12 @@
function patch(config)
local scrollBG = config.paneLayout.scrollBG
local scrollSize = assets.image(scrollBG.file):size()
config.paneLayout.search = {
type = "textbox",
position = {scrollBG.position[1] + 3,
scrollBG.position[2] + scrollSize[2] - 10},
hint = "^#999;Type here to search for a song",
maxWidth = scrollSize[1] - 6
}
return config
end

View File

@ -25,3 +25,8 @@ local path = "/objects/opensb/object.patch.lua"
for i = 1, #objects do for i = 1, #objects do
assets.patch(objects[i], path) assets.patch(objects[i], path)
end end
assets.patch(
"/interface/windowconfig/songbook.config",
"/interface/windowconfig/songbook_search_patch.lua"
)