1 module amperopts
is aliced
;
7 import arsd
.simpledisplay
;
19 // ////////////////////////////////////////////////////////////////////////// //
20 public __gshared SimpleWindow sdampwin
;
21 public __gshared SimpleWindow sdplwin
;
23 public void delegate () dgGreatePListWindow
;
26 // ////////////////////////////////////////////////////////////////////////// //
27 //__gshared string skinfile = "skins/WastedAMP1-0.zip";
28 //__gshared string skinfile = "skins/winamp2.zip";
29 __gshared string skinfile
= "/mnt/bigass/src/xmms/skindev/winamp29x.zip";
30 public __gshared
bool modeShuffle
= false;
31 public __gshared
bool modeRepeat
= false;
32 public __gshared
int softVolume
= 31; // [0..63]; *100/31 will be volume in percents
33 public __gshared
bool eqVisible
= false;
34 public __gshared
bool plVisible
= true;
37 shared static this () {
38 conRegVar
!modeShuffle("mode_shuffle", "shuffle playlist",
39 delegate (ConVarBase self
, bool oldval
, bool newval
) {
40 if (oldval
!= newval
) glconPostScreenRebuild();
43 conRegVar
!modeRepeat("mode_repeat", "repeat playlist",
44 delegate (ConVarBase self
, bool oldval
, bool newval
) {
45 if (oldval
!= newval
) glconPostScreenRebuild();
48 conRegVar
!softVolume(0, 63, "soft_volume", "soft volume; 31 is normal",
49 delegate (ConVarBase self
, int oldval
, int newval
) {
50 //conwriteln("volume changed: old=", oldval, "; new=", newval);
51 if (oldval
!= newval
) glconPostScreenRebuild();
52 aplayPlayGain(newval
*100/31-100);
55 conRegVar
!eqVisible("eq_visible", "toggle equalizer",
56 delegate (ConVarBase self
, bool oldval
, bool newval
) {
57 if (oldval
!= newval
) glconPostScreenRebuild();
60 conRegVar
!plVisible("pl_visible", "toggle playlist",
61 delegate (ConVarBase self
, bool oldval
, bool newval
) {
62 if (oldval
!= newval
) {
63 if (sdplwin
is null || sdplwin
.closed
) {
64 if (sdampwin
is null || sdampwin
.closed
) return;
66 if (dgGreatePListWindow
!is null) dgGreatePListWindow();
68 if (sdplwin
.hidden
!= !newval
) {
69 if (newval
) sdplwin
.show(); else sdplwin
.hide();
72 glconPostScreenRebuild();