Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/assets/opensb/interface
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-07-29 14:59:52 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-07-29 14:59:52 +1000
commit1224213cab2594eb9b18f97c238af148d662063d (patch)
tree310e36f4754e62fec630cc7c3adf307bdc15371a /assets/opensb/interface
parente9e87a1c3c74e503d00e5166f91f0b4c81c66e07 (diff)
Change the Songbook search field to be more compatible with UI mods
It's at the top of the list now. Closes #90
Diffstat (limited to 'assets/opensb/interface')
-rw-r--r--assets/opensb/interface/windowconfig/songbook.config.patch22
-rw-r--r--assets/opensb/interface/windowconfig/songbook_search_patch.lua12
2 files changed, 12 insertions, 22 deletions
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