@flashist/fconsole 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/console/FC.js +53 -67
- package/console/FC.js.map +1 -1
- package/console/config/DefaultFConsoneConfigVO.js +3 -5
- package/console/config/DefaultFConsoneConfigVO.js.map +1 -1
- package/console/tools/GlobalVarTools.js +9 -13
- package/console/tools/GlobalVarTools.js.map +1 -1
- package/console/view/BaseConsoleButton.js +34 -57
- package/console/view/BaseConsoleButton.js.map +1 -1
- package/console/view/BaseConsoleView.js +66 -97
- package/console/view/BaseConsoleView.js.map +1 -1
- package/console/view/ConsoleContentContainer.js +2 -23
- package/console/view/ConsoleContentContainer.js.map +1 -1
- package/console/view/ConsoleView.js +16 -40
- package/console/view/ConsoleView.js.map +1 -1
- package/console/view/capture/CaptureKeyButton.js +36 -65
- package/console/view/capture/CaptureKeyButton.js.map +1 -1
- package/console/view/capture/CaptureKeyButtonEvent.js +3 -7
- package/console/view/capture/CaptureKeyButtonEvent.js.map +1 -1
- package/console/view/displaylist/DisplayListItemView.js +35 -58
- package/console/view/displaylist/DisplayListItemView.js.map +1 -1
- package/console/view/displaylist/DisplayListView.js +158 -199
- package/console/view/displaylist/DisplayListView.js.map +1 -1
- package/console/view/fps/FpsMeterView.js +21 -45
- package/console/view/fps/FpsMeterView.js.map +1 -1
- package/console/view/pause/PauseKeyButton.js +48 -81
- package/console/view/pause/PauseKeyButton.js.map +1 -1
- package/console/view/tooltip/ConsoleTooltip.js +14 -32
- package/console/view/tooltip/ConsoleTooltip.js.map +1 -1
- package/package.json +2 -2
- package/tooltip/BaseTooltip.js +8 -29
- package/tooltip/BaseTooltip.js.map +1 -1
- package/tooltip/TooltipManager.js +53 -83
- package/tooltip/TooltipManager.js.map +1 -1
package/console/FC.js
CHANGED
|
@@ -6,12 +6,10 @@ import { ConsoleTooltip } from "./view/tooltip/ConsoleTooltip";
|
|
|
6
6
|
import { ConsoleContentContainer } from "./view/ConsoleContentContainer";
|
|
7
7
|
import { DisplayListView } from "./view/displaylist/DisplayListView";
|
|
8
8
|
import { DefaultFConsoneConfigVO } from "./config/DefaultFConsoneConfigVO";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
FC.startInit = function (root, configChanges) {
|
|
9
|
+
export class FC {
|
|
10
|
+
static startInit(root, configChanges) {
|
|
13
11
|
Logger.log("FConsole Class (FC): ", FC);
|
|
14
|
-
|
|
12
|
+
const config = new DefaultFConsoneConfigVO();
|
|
15
13
|
if (configChanges) {
|
|
16
14
|
ObjectTools.copyProps(config, configChanges);
|
|
17
15
|
}
|
|
@@ -25,7 +23,7 @@ var FC = /** @class */ (function () {
|
|
|
25
23
|
// FC.tooltipsCont = new FContainer();
|
|
26
24
|
FC.tooltipsCont = new FContainer();
|
|
27
25
|
FC.contentCont.addChild(FC.tooltipsCont);
|
|
28
|
-
|
|
26
|
+
let tempTooltip = new ConsoleTooltip();
|
|
29
27
|
FC.tooltipManager = new TooltipManager(tempTooltip);
|
|
30
28
|
FC.tooltipManager.tooltipCont = FC.tooltipsCont;
|
|
31
29
|
FC.tooltipManager.mouseShift = new Point(10, 15);
|
|
@@ -35,8 +33,8 @@ var FC = /** @class */ (function () {
|
|
|
35
33
|
//
|
|
36
34
|
FC.displayListView = new DisplayListView();
|
|
37
35
|
// Events
|
|
38
|
-
FC.eventListenerHelper.addEventListener(InputManager.instance, InputManagerEvent.KEY_DOWN,
|
|
39
|
-
|
|
36
|
+
FC.eventListenerHelper.addEventListener(InputManager.instance, InputManagerEvent.KEY_DOWN, (data) => {
|
|
37
|
+
let pressedKey = data.nativeKeyboardEvent.key;
|
|
40
38
|
if (pressedKey.toUpperCase() === FC.config.password.charAt(FC.passwordInputIndex).toUpperCase()) {
|
|
41
39
|
FC.passwordInputIndex++;
|
|
42
40
|
if (FC.passwordInputIndex >= FC.config.password.length) {
|
|
@@ -51,86 +49,74 @@ var FC = /** @class */ (function () {
|
|
|
51
49
|
FApp.instance.ticker.add(FC.onTicker);
|
|
52
50
|
FC.root = root;
|
|
53
51
|
FC.visible = FC.config.console.defaultVisible;
|
|
54
|
-
}
|
|
55
|
-
|
|
52
|
+
}
|
|
53
|
+
static onTicker() {
|
|
56
54
|
if (FC.config.console.aboveAll) {
|
|
57
55
|
DisplayTools.moveObjectToTopLayer(FC.contentCont);
|
|
58
56
|
}
|
|
59
|
-
}
|
|
60
|
-
|
|
57
|
+
}
|
|
58
|
+
static onPasswordInput() {
|
|
61
59
|
FC.visible = !FC.visible;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
FC.showView(FC.displayListView);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
else {
|
|
77
|
-
FC.hideView(FC.view);
|
|
60
|
+
}
|
|
61
|
+
static get visible() {
|
|
62
|
+
return FC.view.visible;
|
|
63
|
+
}
|
|
64
|
+
static set visible(value) {
|
|
65
|
+
if (value) {
|
|
66
|
+
FC.showView(FC.view, false);
|
|
67
|
+
DisplayTools.moveObjectToTopLayer(FC.viewsCont);
|
|
68
|
+
DisplayTools.moveObjectToTopLayer(FC.tooltipsCont);
|
|
69
|
+
if (FC.config.displayListSettings.defaultVisible) {
|
|
70
|
+
FC.showView(FC.displayListView);
|
|
78
71
|
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
FC.hideView(FC.view);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
static showView(view, moveToMouse = true) {
|
|
85
78
|
FC.viewsCont.addChild(view.view);
|
|
86
79
|
view.visible = true;
|
|
87
80
|
FC.moveViewToTopLayer(view);
|
|
88
81
|
if (moveToMouse) {
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
const globalPos = FApp.instance.getGlobalInteractionPosition();
|
|
83
|
+
let localPos = view.view.parent.toLocal(new Point(globalPos.x + 1, globalPos.y + 1));
|
|
91
84
|
view.view.x = localPos.x;
|
|
92
85
|
view.view.y = localPos.y;
|
|
93
86
|
}
|
|
94
|
-
}
|
|
95
|
-
|
|
87
|
+
}
|
|
88
|
+
static hideView(view) {
|
|
96
89
|
if (view.view.parent) {
|
|
97
90
|
view.view.parent.removeChild(view.view);
|
|
98
91
|
}
|
|
99
92
|
view.visible = false;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (moveToMouse === void 0) { moveToMouse = true; }
|
|
93
|
+
}
|
|
94
|
+
static toggleView(view, moveToMouse = true) {
|
|
103
95
|
if (view.visible) {
|
|
104
96
|
FC.hideView(view);
|
|
105
97
|
}
|
|
106
98
|
else {
|
|
107
99
|
FC.showView(view, moveToMouse);
|
|
108
100
|
}
|
|
109
|
-
}
|
|
110
|
-
|
|
101
|
+
}
|
|
102
|
+
static moveViewToTopLayer(view) {
|
|
111
103
|
DisplayTools.moveObjectToTopLayer(view.view);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
});
|
|
131
|
-
// private static password: string = "";
|
|
132
|
-
FC.passwordInputIndex = 0;
|
|
133
|
-
return FC;
|
|
134
|
-
}());
|
|
135
|
-
export { FC };
|
|
104
|
+
}
|
|
105
|
+
static get root() {
|
|
106
|
+
return FC._root;
|
|
107
|
+
}
|
|
108
|
+
static set root(value) {
|
|
109
|
+
// Remove from the previous main container, if there was one
|
|
110
|
+
if (FC.root) {
|
|
111
|
+
FC.root.removeChild(FC.contentCont);
|
|
112
|
+
}
|
|
113
|
+
FC._root = value;
|
|
114
|
+
// Add to the new main container, if there is one
|
|
115
|
+
if (FC.root) {
|
|
116
|
+
FC.root.addChild(FC.contentCont);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// private static password: string = "";
|
|
121
|
+
FC.passwordInputIndex = 0;
|
|
136
122
|
//# sourceMappingURL=FC.js.map
|
package/console/FC.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FC.js","sourceRoot":"","sources":["../../src/console/FC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAiB,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1F,OAAO,EACH,YAAY,EACZ,iBAAiB,EAEjB,IAAI,EACJ,KAAK,EAEL,YAAY,EACZ,UAAU,EACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAG3E;
|
|
1
|
+
{"version":3,"file":"FC.js","sourceRoot":"","sources":["../../src/console/FC.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAiB,MAAM,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC1F,OAAO,EACH,YAAY,EACZ,iBAAiB,EAEjB,IAAI,EACJ,KAAK,EAEL,YAAY,EACZ,UAAU,EACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;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DefaultFConsoneConfigVO {
|
|
3
|
+
constructor() {
|
|
4
4
|
this.password = "`";
|
|
5
5
|
this.localization = {
|
|
6
6
|
closeBtnTooltipTitle: "Close",
|
|
@@ -109,7 +109,5 @@ var DefaultFConsoneConfigVO = /** @class */ (function () {
|
|
|
109
109
|
};
|
|
110
110
|
this.customBtns = [];
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
}());
|
|
114
|
-
export { DefaultFConsoneConfigVO };
|
|
112
|
+
}
|
|
115
113
|
//# sourceMappingURL=DefaultFConsoneConfigVO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultFConsoneConfigVO.js","sourceRoot":"","sources":["../../../src/console/config/DefaultFConsoneConfigVO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C;
|
|
1
|
+
{"version":3,"file":"DefaultFConsoneConfigVO.js","sourceRoot":"","sources":["../../../src/console/config/DefaultFConsoneConfigVO.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,MAAM,OAAO,uBAAuB;IAApC;QAEW,aAAQ,GAAW,GAAG,CAAC;QAEvB,iBAAY,GAAG;YAClB,oBAAoB,EAAE,OAAO;YAE7B,QAAQ,EAAE,IAAI;YACd,SAAS,EAAE,KAAK;YAEhB,aAAa,EAAE,GAAG;YAElB,mBAAmB,EAAE,IAAI;YACzB,0BAA0B,EAAE,wBAAwB;YACpD,yBAAyB,EAAE,wCAAwC;YAEnE,oBAAoB,EAAE,SAAS;YAC/B,sBAAsB,EAAE,wDAAwD;YAEhF,yBAAyB,EAAE,oDAAoD;YAC/E,wBAAwB,EAAE,8EAA8E;YACxG,wBAAwB,EAAE,oBAAoB;YAC9C,yBAAyB,EAAE,aAAa;YACxC,0BAA0B,EAAE,gBAAgB;YAE5C,6BAA6B,EAAE,gDAAgD;YAC/E,4BAA4B,EAAE,6BAA6B;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"}
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import { UniqueTools, StringTools } from "@flashist/fcore";
|
|
2
2
|
import { FC } from "../FC";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var tempUniqueId = UniqueTools.getUniqueIdForPool(FC.config.displayListSettings.globalVarPoolId);
|
|
8
|
-
var result = StringTools.substituteList(FC.config.displayListSettings.globalVarNamePattern, tempUniqueId);
|
|
3
|
+
export class GlobalVarTools {
|
|
4
|
+
static getNextGlobalVarName() {
|
|
5
|
+
const tempUniqueId = UniqueTools.getUniqueIdForPool(FC.config.displayListSettings.globalVarPoolId);
|
|
6
|
+
const result = StringTools.substituteList(FC.config.displayListSettings.globalVarNamePattern, tempUniqueId);
|
|
9
7
|
return result;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
}
|
|
9
|
+
static storeObjectAsGlobalVar(object) {
|
|
10
|
+
const tempId = GlobalVarTools.getNextGlobalVarName();
|
|
13
11
|
console.log(tempId);
|
|
14
12
|
window[tempId] = object;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
}());
|
|
18
|
-
export { GlobalVarTools };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
19
15
|
//# sourceMappingURL=GlobalVarTools.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalVarTools.js","sourceRoot":"","sources":["../../../src/console/tools/GlobalVarTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAEzB;
|
|
1
|
+
{"version":3,"file":"GlobalVarTools.js","sourceRoot":"","sources":["../../../src/console/tools/GlobalVarTools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AAEzB,MAAM,OAAO,cAAc;IACvB,MAAM,CAAC,oBAAoB;QACvB,MAAM,YAAY,GAAW,WAAW,CAAC,kBAAkB,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;QAC3G,MAAM,MAAM,GAAW,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;QACpH,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,sBAAsB,CAAC,MAAW;QACrC,MAAM,MAAM,GAAW,cAAc,CAAC,oBAAoB,EAAE,CAAC;QAE7D,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpB,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAC5B,CAAC;CACJ"}
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { BaseObject } from "@flashist/fcore";
|
|
17
2
|
import { FLabel, InteractiveEvent, FContainer } from "@flashist/flibs";
|
|
18
3
|
import { FC } from "../FC";
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_this._text = "";
|
|
24
|
-
return _this;
|
|
4
|
+
export class BaseConsoleButton extends BaseObject {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
this._text = "";
|
|
25
8
|
}
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
construction() {
|
|
10
|
+
super.construction();
|
|
28
11
|
this.view = new FContainer();
|
|
29
12
|
this.view.interactive = true;
|
|
30
|
-
this.view.
|
|
13
|
+
this.view.cursor = 'pointer';
|
|
31
14
|
this.field = new FLabel({
|
|
32
15
|
autosize: true,
|
|
33
16
|
color: FC.config.btnSettings.labelColor,
|
|
@@ -36,50 +19,44 @@ var BaseConsoleButton = /** @class */ (function (_super) {
|
|
|
36
19
|
this.view.addChild(this.field);
|
|
37
20
|
this.commitData();
|
|
38
21
|
this.onOut();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
22
|
+
}
|
|
23
|
+
addListeners() {
|
|
24
|
+
super.addListeners();
|
|
42
25
|
this.eventListenerHelper.addEventListener(this.view, InteractiveEvent.OVER, this.onOver);
|
|
43
26
|
this.eventListenerHelper.addEventListener(this.view, InteractiveEvent.OUT, this.onOut);
|
|
44
27
|
this.eventListenerHelper.addEventListener(this.view, InteractiveEvent.TAP, this.onClick);
|
|
45
28
|
this.eventListenerHelper.addEventListener(this.view, InteractiveEvent.UP_OUTSIDE, this.onOut);
|
|
46
|
-
}
|
|
47
|
-
|
|
29
|
+
}
|
|
30
|
+
onOver() {
|
|
48
31
|
this.view.alpha = 1;
|
|
49
32
|
if (this.tooltipData) {
|
|
50
33
|
FC.tooltipManager.show(this.tooltipData);
|
|
51
34
|
}
|
|
52
|
-
}
|
|
53
|
-
|
|
35
|
+
}
|
|
36
|
+
onOut() {
|
|
54
37
|
this.view.alpha = 0.75;
|
|
55
38
|
FC.tooltipManager.hide();
|
|
56
|
-
}
|
|
57
|
-
|
|
39
|
+
}
|
|
40
|
+
onClick() {
|
|
58
41
|
this.onOut();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
42
|
+
}
|
|
43
|
+
commitData() {
|
|
44
|
+
super.commitData();
|
|
62
45
|
this.field.text = this.text;
|
|
63
46
|
this.arrange();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
enumerable: false,
|
|
80
|
-
configurable: true
|
|
81
|
-
});
|
|
82
|
-
return BaseConsoleButton;
|
|
83
|
-
}(BaseObject));
|
|
84
|
-
export { BaseConsoleButton };
|
|
47
|
+
}
|
|
48
|
+
arrange() {
|
|
49
|
+
super.arrange();
|
|
50
|
+
}
|
|
51
|
+
get text() {
|
|
52
|
+
return this._text;
|
|
53
|
+
}
|
|
54
|
+
set text(value) {
|
|
55
|
+
if (value == this.text) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this._text = value;
|
|
59
|
+
this.commitData();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
85
62
|
//# sourceMappingURL=BaseConsoleButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseConsoleButton.js","sourceRoot":"","sources":["../../../src/console/view/BaseConsoleButton.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseConsoleButton.js","sourceRoot":"","sources":["../../../src/console/view/BaseConsoleButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAEH,MAAM,EACN,gBAAgB,EAChB,UAAU,EACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAG3B,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAS7C;QACI,KAAK,EAAE,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K,GAAG,CAAC,CAAC;QAEpB,IAAI,IAAI,CAAC,WAAW,EAAE;YAClB,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;SAC5C;IACL,CAAC;IAEO,KAAK;QACT,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAEvB,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC;IAES,OAAO;QACb,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAGS,UAAU;QAChB,KAAK,CAAC,UAAU,EAAE,CAAC;QAEnB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAE5B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAES,OAAO;QACb,KAAK,CAAC,OAAO,EAAE,CAAC;IAEpB,CAAC;IAGD,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,IAAI,IAAI,CAAC,KAAa;QAClB,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE;YACpB,OAAO;SACV;QAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ"}
|
|
@@ -1,35 +1,18 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
1
|
import { BaseObject } from "@flashist/fcore";
|
|
17
2
|
import { InteractiveEvent, Graphics, FLabel, DragHelper, DragHelperEvent, FContainer } from "@flashist/flibs";
|
|
18
3
|
import { FC } from "../FC";
|
|
19
4
|
import { BaseConsoleButton } from "./BaseConsoleButton";
|
|
20
5
|
import { CaptureKeyButton } from "./capture/CaptureKeyButton";
|
|
21
6
|
import { CaptureKeyButtonEvent } from "./capture/CaptureKeyButtonEvent";
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
7
|
+
export class BaseConsoleView extends BaseObject {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
26
10
|
// private captureKey:string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return _this;
|
|
11
|
+
this.lastBgWidth = 0;
|
|
12
|
+
this.lastBgHeight = 0;
|
|
30
13
|
}
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
construction() {
|
|
15
|
+
super.construction();
|
|
33
16
|
// this.captureKey = "";
|
|
34
17
|
this._titleVisible = true;
|
|
35
18
|
this._captureVisible = false;
|
|
@@ -68,57 +51,53 @@ var BaseConsoleView = /** @class */ (function (_super) {
|
|
|
68
51
|
this.captureKeyBtn.tooltipData = { title: FC.config.localization.captureKeyBtnTooltipTitle };
|
|
69
52
|
this.insideContentCont = new FContainer();
|
|
70
53
|
this.contentCont.addChild(this.insideContentCont);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
54
|
+
}
|
|
55
|
+
addListeners() {
|
|
56
|
+
super.addListeners();
|
|
74
57
|
this.eventListenerHelper.addEventListener(this.dragHelper, DragHelperEvent.DRAG_START, this.onDragStart);
|
|
75
58
|
this.eventListenerHelper.addEventListener(this.dragHelper, DragHelperEvent.DRAG_UPDATE, this.onDragUpdate);
|
|
76
59
|
this.eventListenerHelper.addEventListener(this.captureKeyBtn, CaptureKeyButtonEvent.CAPTURE_KEY_PRESS, this.onCapture);
|
|
77
60
|
this.eventListenerHelper.addEventListener(this.captureClickBtn.view, InteractiveEvent.TAP, this.onCapture);
|
|
78
|
-
}
|
|
79
|
-
|
|
61
|
+
}
|
|
62
|
+
onDragStart() {
|
|
80
63
|
this.viewDragStartX = this.view.x;
|
|
81
64
|
this.viewDragStartY = this.view.y;
|
|
82
65
|
FC.moveViewToTopLayer(this);
|
|
83
|
-
}
|
|
84
|
-
|
|
66
|
+
}
|
|
67
|
+
onDragUpdate() {
|
|
85
68
|
this.view.x = this.viewDragStartX + this.dragHelper.changeDragGlobalX;
|
|
86
69
|
this.view.y = this.viewDragStartY + this.dragHelper.changeDragGlobalY;
|
|
87
|
-
}
|
|
88
|
-
|
|
70
|
+
}
|
|
71
|
+
onClose() {
|
|
89
72
|
FC.hideView(this);
|
|
90
|
-
}
|
|
91
|
-
|
|
73
|
+
}
|
|
74
|
+
onCapture() {
|
|
92
75
|
// Should be overridden in subclusses
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
configurable: true
|
|
107
|
-
});
|
|
108
|
-
BaseConsoleView.prototype.commitData = function () {
|
|
109
|
-
_super.prototype.commitData.call(this);
|
|
76
|
+
}
|
|
77
|
+
get visible() {
|
|
78
|
+
return this._visible;
|
|
79
|
+
}
|
|
80
|
+
set visible(value) {
|
|
81
|
+
if (value == this.visible) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
this._visible = value;
|
|
85
|
+
this.commitData();
|
|
86
|
+
}
|
|
87
|
+
commitData() {
|
|
88
|
+
super.commitData();
|
|
110
89
|
this.view.visible = this.visible;
|
|
111
90
|
this.titleLabel.visible = this.titleVisible;
|
|
112
91
|
this.captureClickBtn.view.visible = this.captureVisible;
|
|
113
92
|
this.captureKeyBtn.view.visible = this.captureVisible;
|
|
114
93
|
this.arrange();
|
|
115
|
-
}
|
|
116
|
-
|
|
94
|
+
}
|
|
95
|
+
arrange() {
|
|
117
96
|
// Reset previously set changes
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
for (
|
|
97
|
+
let tempBtn;
|
|
98
|
+
let prevBtn;
|
|
99
|
+
let btnsCount = this.topLevelElements.length;
|
|
100
|
+
for (let btnIndex = 0; btnIndex < btnsCount; btnIndex++) {
|
|
122
101
|
tempBtn = this.topLevelElements[btnIndex];
|
|
123
102
|
if (prevBtn) {
|
|
124
103
|
tempBtn.x = prevBtn.x + prevBtn.width + 5;
|
|
@@ -137,8 +116,8 @@ var BaseConsoleView = /** @class */ (function (_super) {
|
|
|
137
116
|
else {
|
|
138
117
|
this.insideContentCont.y = 0;
|
|
139
118
|
}
|
|
140
|
-
|
|
141
|
-
|
|
119
|
+
let tempWidth = this.contentCont.width + FC.config.viewSettings.bgToContentShift.x;
|
|
120
|
+
let tempHeight = this.contentCont.height + FC.config.viewSettings.bgToContentShift.y;
|
|
142
121
|
if (tempWidth != this.lastBgWidth || tempHeight != this.lastBgHeight) {
|
|
143
122
|
this.lastBgWidth = tempWidth;
|
|
144
123
|
this.lastBgHeight = tempHeight;
|
|
@@ -150,49 +129,39 @@ var BaseConsoleView = /** @class */ (function (_super) {
|
|
|
150
129
|
}
|
|
151
130
|
this.contentCont.x = this.bgGraphics.x + ((this.bgGraphics.width - this.contentCont.width) >> 1);
|
|
152
131
|
this.contentCont.y = this.bgGraphics.y + ((this.bgGraphics.height - this.contentCont.height) >> 1);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
132
|
+
}
|
|
133
|
+
createTitleBtn(label, tooltipData, data) {
|
|
134
|
+
let tempBtn = new BaseConsoleButton();
|
|
156
135
|
tempBtn.text = label;
|
|
157
136
|
tempBtn.tooltipData = tooltipData;
|
|
158
137
|
tempBtn.data = data;
|
|
159
138
|
this.titleBtns.push(tempBtn);
|
|
160
139
|
this.addTitleElement(tempBtn.view);
|
|
161
140
|
return tempBtn;
|
|
162
|
-
}
|
|
163
|
-
|
|
141
|
+
}
|
|
142
|
+
addTitleElement(element) {
|
|
164
143
|
this.topLevelCont.addChild(element);
|
|
165
144
|
this.topLevelElements.push(element);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}
|
|
189
|
-
this._captureVisible = value;
|
|
190
|
-
this.commitData();
|
|
191
|
-
},
|
|
192
|
-
enumerable: false,
|
|
193
|
-
configurable: true
|
|
194
|
-
});
|
|
195
|
-
return BaseConsoleView;
|
|
196
|
-
}(BaseObject));
|
|
197
|
-
export { BaseConsoleView };
|
|
145
|
+
}
|
|
146
|
+
get titleVisible() {
|
|
147
|
+
return this._titleVisible;
|
|
148
|
+
}
|
|
149
|
+
set titleVisible(value) {
|
|
150
|
+
if (value == this.titleVisible) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
this._titleVisible = value;
|
|
154
|
+
this.commitData();
|
|
155
|
+
}
|
|
156
|
+
get captureVisible() {
|
|
157
|
+
return this._captureVisible;
|
|
158
|
+
}
|
|
159
|
+
set captureVisible(value) {
|
|
160
|
+
if (value == this.captureVisible) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
this._captureVisible = value;
|
|
164
|
+
this.commitData();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
198
167
|
//# sourceMappingURL=BaseConsoleView.js.map
|