volume control, schedule button, VBR decoder fix, reduced debug in decoder, added decoder source

This commit is contained in:
Blue 2019-02-02 01:24:09 +03:00 committed by Gitea
parent 2f8226d406
commit 7713110129
18 changed files with 1486 additions and 12 deletions

View file

@ -27,6 +27,7 @@
W.extend(base, options);
Layout.fn.constructor.call(this, controller, options);
this._aCount = 0;
this._initProxy();
this.addClass("hoverable");
this._e.addEventListener("click", this._proxy.onClick, false);
@ -65,8 +66,29 @@
Layout.fn.destructor.call(this);
},
"_onAddAction": function(model) {
var view = new Button(model);
this.append(view, Layout.Aligment.LeftTop)
var alignment;
switch (this._aCount) {
case 0:
alignment = Layout.Aligment.LeftTop;
break;
case 1:
alignment = Layout.Aligment.RightTop;
break;
case 2:
alignment = Layout.Aligment.RightBottom;
break;
case 3:
alignment = Layout.Aligment.LeftBottom;
break;
default:
console.warn("Pane can't place more then 4 action, ignoring");
break
}
if (alignment !== undefined) {
var view = new Button(model);
this.append(view, alignment);
this._aCount++;
}
},
"_applyProperties": function() {
this._onAddProperty("secondaryColor", "background");

View file

@ -40,6 +40,8 @@
if (this._seeking) {
window.removeEventListener("mouseup", this._proxy.onMouseUp);
window.removeEventListener("mousemove", this._proxy.onMouseMove);
lorgar._body.removeClass("dragging");
lorgar._body.removeClass("non-selectable");
}
if (this._f.enabled) {
this._e.removeEventListener("mousedown", this._proxy.onMouseDown);
@ -94,6 +96,8 @@
if (e.which === 1) {
window.addEventListener("mouseup", this._proxy.onMouseUp);
window.addEventListener("mousemove", this._proxy.onMouseMove);
lorgar._body.addClass("dragging");
lorgar._body.addClass("non-selectable");
this._seeking = true;
this._ap = this.getAbsolutePosition();
@ -120,6 +124,7 @@
this._seeking = false;
window.removeEventListener("mouseup", this._proxy.onMouseUp);
window.removeEventListener("mousemove", this._proxy.onMouseMove);
lorgar._body.removeClass("dragging");
},
_onValue: function(pb) {
this._value.style.width = pb * 100 + "%";