From a46fbc80e9a9e40323f162151d2d5b6365dd0c4c Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Wed, 24 Jan 2018 09:12:41 -0800 Subject: [PATCH] Dramatically improve handling of cursors Many thanks to Skinner's Atlas Fixes #406 --- js/skinParser.js | 25 ++++++++--- js/skinSelectors.js | 42 +++++++++++++++---- skins/.gitignore | 1 - skins/base-2.91.wsz | Bin 101121 -> 101769 bytes skins/base-2.91/{MAINMENU.CUR => NORMAL.CUR} | Bin skins/base-2.91/PNORMAL.CUR | Bin 0 -> 766 bytes skins/base-2.91/PVSCROLL.CUR | Bin 0 -> 766 bytes 7 files changed, 55 insertions(+), 13 deletions(-) rename skins/base-2.91/{MAINMENU.CUR => NORMAL.CUR} (100%) create mode 100644 skins/base-2.91/PNORMAL.CUR create mode 100644 skins/base-2.91/PVSCROLL.CUR diff --git a/js/skinParser.js b/js/skinParser.js index 8525855c..3703c91a 100644 --- a/js/skinParser.js +++ b/js/skinParser.js @@ -14,6 +14,7 @@ const CURSORS = [ "EQSLID", "EQTITLE", "MAINMENU", + "MMENU", "MIN", "NORMAL", "PCLOSE", @@ -28,13 +29,27 @@ const CURSORS = [ "SONGNAME", "TITLEBAR", "VOLBAL", - "VOLBAR", "WINBUT", - "WSCLOSE", - "WSMIN", "WSNORMAL", - "WSPOSBAR", - "WSWINBUT" + "WSPOSBAR" + /* + + * > There are usually 4 more cursors in the skins: volbar.cur, wsclose.cur, + * > wswinbut.cur, wsmin.cur, but they are never used, at least in the last + * > versions of winamp, so there's no need of including them. The cursors + * > shown when the mouse is over the app-buttons are the same in normal and + * > winshade mode, except for the main menu button. You can make animated + * > cursors, but you have to name them with the extension .cur (animated + * > cursors are usually .ani files). + * + * -- Skinners Atlas + * + * "VOLBAR", + * "WSCLOSE", + * "WSWINBUT", + * "WSMIN", + * + */ ]; const _genImgFromBlob = async blob => diff --git a/js/skinSelectors.js b/js/skinSelectors.js index 7ff1cd61..a2e4eb96 100644 --- a/js/skinSelectors.js +++ b/js/skinSelectors.js @@ -324,19 +324,47 @@ LETTERS.forEach(character => { }); export const cursorSelectors = { - PSIZE: ["#playlist-window #playlist-resize-target"], CLOSE: ["#title-bar #close"], - MAINMENU: ["#main-window", "#main-window.shade #title-bar"], - TITLEBAR: ["#main-window #title-bar"], - POSBAR: ["#position"], - VOLBAL: ["#volume", "#balance"], EQSLID: ["#equalizer-window .band"], + EQNORMAL: ["#equalizer-window"], + EQCLOSE: ["#equalizer-window #equalizer-close"], EQTITLE: [ "#equalizer-window .title-bar", "#equalizer-window.shade", "#equalizer-window.shade input" ], + MAINMENU: ["#main-window #option"], + MIN: ["#main-window #minimize"], + NORMAL: [ + // Use this as the default cursor. + ".window", + "#main-window", + "#main-window.shade #title-bar" + ], + MMENU: ["#main-window.shade #option"], PNORMAL: ["#playlist-window"], - PVSCROLL: ["#playlist-window .playlist-scrollbar-wrapper"], - SONGNAME: ["#main-window #marquee"] + // TODO: This is should really only apply to the top part of the top. + // The chrome around the playlist window is larger than others. The + // cursor only applies to the same height as the other window's chrome. + PTBAR: ["#playlist-window .playlist-top"], + PCLOSE: [ + "#playlist-window #playlist-close-button", + "#playlist-window-shade #playlist-close-button" + ], + PWINBUT: [ + "#playlist-window #playlist-shade-button", + "#playlist-window-shade #playlist-shade-button" + ], + POSBAR: ["#main-window #position"], + PSIZE: ["#playlist-window #playlist-resize-target"], + PWSSIZE: ["#playlist-window-shade #playlist-resize-target"], + PWSNORM: ["#playlist-window-shade"], + // TODO: The target for this is not quite right. + PVSCROLL: ["#playlist-window .playlist-scrollbar"], + SONGNAME: ["#main-window #marquee"], + TITLEBAR: ["#main-window #title-bar"], + VOLBAL: ["#volume", "#balance"], + WINBUT: ["#main-window #shade"], + WSNORMAL: ["#main-window.shade #title-bar"], + WSPOSBAR: ["#main-window.shade #position"] }; diff --git a/skins/.gitignore b/skins/.gitignore index 7087d3d9..3f7d43d9 100644 --- a/skins/.gitignore +++ b/skins/.gitignore @@ -1,3 +1,2 @@ base-2.91.zip -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%!lX}to#?Q&R5HR5}MMM6m*o72<|RRC195YuN# ze>aGcRGA{4&L+}T^7J8H)*FkM7T!@^WtW$yj9wVC`e!hs9!MVOi;IyI5RAB(b?MOd7=;d{=Zy{EY=Kbjn# z_w#w5CmnjroES4(!vTYF9YRPzWmEe^Whz`MglfCxiN33C$?w8-79)9n-CCA@JzZ}x z8MefIilx0ouy$WTeg*n<-Ag+wRWOqVs(_j@INLbfJJ1jfhQtDO4@T z<;-iDdZsytO|&tFl&o~r% zxjEAlKQ!49TG-Eef6Ct|O1cFk_n3CtS<#>W)siPo|82!|FJHlS`Moe~*CfZp=;SqF z8_p^=Xu4Zm=>6OQ>%aUYVcZ5QWS>(B^6ha4-65~YnlUjMsV4?8J0kV+%h+DD6QaGI zm@G@7l|$iywIJ9)@9*o6eE{hgJA9EbD+C9n=n7X53Bp!e2eFeavU3>Q3l80fcscXw zH|wR$r~k%DA~j+2q3XzCyjraq!qx&`KY>Mq{zi5(00W`ZHmJZ~9mS49{|f{p`{kh4 zEQp?>9?=V)Z=-tvY4YcLU_j+C4qf_0Mk(gs#EanKNRK%|Wb3SHe+G!X}z6n;Hd#j3A%PlArwnVNytn z%HoQCbwiAeV7sk(5oH>S4yMi@hQr#rgitu>ZVS6(_c$!Jy891dd!hLj0g8=&S>H1; z9`*PLb`(f1oI+8ZLsc*%?$)-ALav_(inAcTHzG6jPm=5L4QUj0UqFHM*uj7usbK)+ zdn*8>`4C{hhbV?#ZKemYbHN~zQ;E<tND1yDWKi6=1tVFE-(z8{z&z}t=wt(c$i1fxneT)uBX1ZxY!mGqF13%8H0nqr znHI-OW2OTm&hYpGtdkGH0g9x91Qqp4K`Fvqng?pUeDplvq#)QFZo m`Y9^bl4)!Q`g0LBE&&JhcS$&4G7}GU!QUG2xE~XQo&NzX!jH`W diff --git a/skins/base-2.91/MAINMENU.CUR b/skins/base-2.91/NORMAL.CUR similarity index 100% rename from skins/base-2.91/MAINMENU.CUR rename to skins/base-2.91/NORMAL.CUR diff --git a/skins/base-2.91/PNORMAL.CUR b/skins/base-2.91/PNORMAL.CUR new file mode 100644 index 0000000000000000000000000000000000000000..926f057d6590b464a6e1ca9094d99d8221b9d8cf GIT binary patch literal 766 zcmds#F%E)25Jf*~LaCK4l$PEAk3_lMY{{`Wjz^#{j&IR|+1S`R@P>K&A)8H*c52l3 zTI;@(&P*5R;RcNkbSaa4uS`gi^ZP+(gsgd<34FcfUMAowOQrpPr5w*_(c2})(MQGC zQ{|T9=N47w)3n{M_;x>ALM(h6%VLa&SoPsjj5StXEC0aH^&H$E9~N^@aCP?+G@uR! QFu=>&9$Gj;2Ll+q0Bil6DF6Tf literal 0 HcmV?d00001 diff --git a/skins/base-2.91/PVSCROLL.CUR b/skins/base-2.91/PVSCROLL.CUR new file mode 100644 index 0000000000000000000000000000000000000000..e1c64ef9ff3ec20fbe42bf51375230ff726abe1e GIT binary patch literal 766 zcmds#F%H5o5Ck`X1YM|TNlD2M!jsaG0x9lN`b&8ZKL|y{F*YcPBMNHH-t+D5S+*rh zD`hGQ#kjAe1Jwx>-~uvj$dbeR9u5=7x%Wb*RM&N^!LT@G7An99Qb_+1efo^NuO^|L z)j{