From e853709da5ae2f8087f5f6c444ac44e31e71cbea Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 9 Dec 2014 22:26:07 -0800 Subject: [PATCH] Add Options context menu Fixes #111 --- css/context-menu.css | 60 ++++++++++++++++++++++++++++++++++++++++++++ css/winamp.css | 47 +++++++++++++++++++++++++++++----- index.html | 29 +++++++++++++++++++-- js/context.js | 27 ++++++++++++++++++++ js/winamp.js | 16 +++++++++--- 5 files changed, 168 insertions(+), 11 deletions(-) create mode 100644 css/context-menu.css create mode 100644 js/context.js diff --git a/css/context-menu.css b/css/context-menu.css new file mode 100644 index 00000000..2d1cb69d --- /dev/null +++ b/css/context-menu.css @@ -0,0 +1,60 @@ +#context-menu, +#context-menu ul +{ + display: none; + z-index: 50; /* Gross */ + background-color: #FFFFFF; + position: absolute; + list-style: none; + padding: 0; + margin: 0; + border: 1px solid #A7A394; + cursor: default; + box-shadow: 2px 2px 4px rgba(0,0,0,.5); +} + +#context-menu li { + position: relative; + font-family: 'Tahoma'; + font-size: 11px; + color: black; + white-space: nowrap; + margin: 2px; + padding: 1px 18px 3px 18px; + display: block; +} +#context-menu li a { + text-decoration: none; + color: black; + cursor: default; +} + +#context-menu li:hover { + background-color: #224EB7; + color: #FFFFFF; +} + +#context-menu li.hr { + padding: 2px 0; +} + +#context-menu li.hr:hover { + background-color: #FFFFFF; +} + +#context-menu li.hr hr { + border: none; + height: 1px; + background-color: #A7A394; + margin: 0; + padding: 0; +} + +#context-menu ul { + left: 100%; + margin-left: -3px; +} + +#context-menu li:hover ul { + display: block; +} diff --git a/css/winamp.css b/css/winamp.css index f38e33a6..b111de41 100755 --- a/css/winamp.css +++ b/css/winamp.css @@ -55,12 +55,25 @@ body { -webkit-transform-origin: top left; } +.doubled #context-menu { + -moz-transform: scale(.5); + -moz-transform-origin: top left; + -webkit-transform: scale(.5); + -webkit-transform-origin: top left; +} + #winamp.loading { + background-image: none; background-color: #FFFFFF; border: 2px solid #dddddd; } -#winamp.loading #loading { - display: block; +/* Hide everything whil we are loading */ +#winamp.loading * { + display: none; +} + +#loading { + display: none; text-align: center; font-size: 20px; height: 30px; @@ -69,9 +82,11 @@ body { top: 0; left: 0; bottom: 0; right: 0; } -#loading { - display: none; +/* Only show loading div while we are loading */ +#winamp.loading #loading { + display: block; } + #winamp.closed { display: none; } #title-bar { @@ -112,9 +127,21 @@ body { left: 6px; /* background-image: TITLEBAR.BMP via Javascript */ } -#title-bar #option:active { +#title-bar #option #context-menu { + display: none; + top: 12px; + left: 0px; +} +#title-bar #option:active, +#title-bar #option.selected +{ background-position: 0 -9px; } +#title-bar #option:active #context-menu, +#title-bar #option.selected #context-menu +{ + display: block; +} #title-bar #minimize { left: 244px; @@ -657,9 +684,17 @@ body { /* Shade View */ #winamp.shade { height: 14px; - overflow: hidden; } +.shade .media-info, +.shade .windows, +.shade #volume, +.shade #balance, +.shade .shuffle-repeat, +.shade .status +{ + display: none; +} .shade #title-bar { background-position: -27px -42px; cursor:url('../cursors/MAINMENU.PNG'), auto; diff --git a/index.html b/index.html index 2d4933dd..d6384bcb 100755 --- a/index.html +++ b/index.html @@ -11,13 +11,35 @@ +
Loading...
-
+
+
    +
  • Winamp2-js...
  • +

  • +
  • Play File...
  • + +

  • +
  • Exit
  • +
+
@@ -99,6 +121,7 @@ +