diff --git a/assets/opensb/interface/windowconfig/songbook.config.patch b/assets/opensb/interface/windowconfig/songbook.config.patch deleted file mode 100644 index 0ef4c54..0000000 --- a/assets/opensb/interface/windowconfig/songbook.config.patch +++ /dev/null @@ -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 - } - } -} \ No newline at end of file diff --git a/assets/opensb/interface/windowconfig/songbook_search_patch.lua b/assets/opensb/interface/windowconfig/songbook_search_patch.lua new file mode 100644 index 0000000..474c2c1 --- /dev/null +++ b/assets/opensb/interface/windowconfig/songbook_search_patch.lua @@ -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 \ No newline at end of file diff --git a/assets/opensb/scripts/opensb/assets/postload.lua b/assets/opensb/scripts/opensb/assets/postload.lua index baf3081..256e199 100644 --- a/assets/opensb/scripts/opensb/assets/postload.lua +++ b/assets/opensb/scripts/opensb/assets/postload.lua @@ -25,3 +25,8 @@ local path = "/objects/opensb/object.patch.lua" for i = 1, #objects do assets.patch(objects[i], path) end + +assets.patch( + "/interface/windowconfig/songbook.config", + "/interface/windowconfig/songbook_search_patch.lua" +) \ No newline at end of file