@flashist/fconsole 0.0.5
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/Config.d.ts +118 -0
- package/console/Config.js +109 -0
- package/console/Config.js.map +1 -0
- package/console/FC.d.ts +29 -0
- package/console/FC.js +136 -0
- package/console/FC.js.map +1 -0
- package/console/tools/GlobalVarTools.d.ts +4 -0
- package/console/tools/GlobalVarTools.js +19 -0
- package/console/tools/GlobalVarTools.js.map +1 -0
- package/console/view/BaseConsoleButton.d.ts +19 -0
- package/console/view/BaseConsoleButton.js +85 -0
- package/console/view/BaseConsoleButton.js.map +1 -0
- package/console/view/BaseConsoleView.d.ts +41 -0
- package/console/view/BaseConsoleView.js +195 -0
- package/console/view/BaseConsoleView.js.map +1 -0
- package/console/view/ConsoleContentContainer.d.ts +8 -0
- package/console/view/ConsoleContentContainer.js +30 -0
- package/console/view/ConsoleContentContainer.js.map +1 -0
- package/console/view/ConsoleView.d.ts +9 -0
- package/console/view/ConsoleView.js +46 -0
- package/console/view/ConsoleView.js.map +1 -0
- package/console/view/capture/CaptureKeyButton.d.ts +16 -0
- package/console/view/capture/CaptureKeyButton.js +102 -0
- package/console/view/capture/CaptureKeyButton.js.map +1 -0
- package/console/view/capture/CaptureKeyButtonEvent.d.ts +3 -0
- package/console/view/capture/CaptureKeyButtonEvent.js +8 -0
- package/console/view/capture/CaptureKeyButtonEvent.js.map +1 -0
- package/console/view/displaylist/DisplayListItemView.d.ts +17 -0
- package/console/view/displaylist/DisplayListItemView.js +92 -0
- package/console/view/displaylist/DisplayListItemView.js.map +1 -0
- package/console/view/displaylist/DisplayListView.d.ts +56 -0
- package/console/view/displaylist/DisplayListView.js +555 -0
- package/console/view/displaylist/DisplayListView.js.map +1 -0
- package/console/view/fps/FpsMeterView.d.ts +13 -0
- package/console/view/fps/FpsMeterView.js +86 -0
- package/console/view/fps/FpsMeterView.js.map +1 -0
- package/console/view/pause/PauseKeyButton.d.ts +20 -0
- package/console/view/pause/PauseKeyButton.js +132 -0
- package/console/view/pause/PauseKeyButton.js.map +1 -0
- package/console/view/tooltip/ConsoleTooltip.d.ts +11 -0
- package/console/view/tooltip/ConsoleTooltip.js +82 -0
- package/console/view/tooltip/ConsoleTooltip.js.map +1 -0
- package/index.d.ts +15 -0
- package/index.js +16 -0
- package/index.js.map +1 -0
- package/package.json +50 -0
- package/tooltip/BaseTooltip.d.ts +9 -0
- package/tooltip/BaseTooltip.js +34 -0
- package/tooltip/BaseTooltip.js.map +1 -0
- package/tooltip/ITooltipData.d.ts +4 -0
- package/tooltip/ITooltipData.js +2 -0
- package/tooltip/ITooltipData.js.map +1 -0
- package/tooltip/TooltipManager.d.ts +37 -0
- package/tooltip/TooltipManager.js +135 -0
- package/tooltip/TooltipManager.js.map +1 -0
|
@@ -0,0 +1,195 @@
|
|
|
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
|
+
import { BaseObject } from "@flashist/fcore";
|
|
17
|
+
import { InteractiveEvent, Graphics, FLabel, DragHelper, DragHelperEvent, FContainer } from "@flashist/flibs";
|
|
18
|
+
import { FC } from "../FC";
|
|
19
|
+
import { BaseConsoleButton } from "./BaseConsoleButton";
|
|
20
|
+
import { CaptureKeyButton } from "./capture/CaptureKeyButton";
|
|
21
|
+
import { CaptureKeyButtonEvent } from "./capture/CaptureKeyButtonEvent";
|
|
22
|
+
var BaseConsoleView = /** @class */ (function (_super) {
|
|
23
|
+
__extends(BaseConsoleView, _super);
|
|
24
|
+
function BaseConsoleView() {
|
|
25
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
// private captureKey:string;
|
|
27
|
+
_this.lastBgWidth = 0;
|
|
28
|
+
_this.lastBgHeight = 0;
|
|
29
|
+
return _this;
|
|
30
|
+
}
|
|
31
|
+
BaseConsoleView.prototype.construction = function () {
|
|
32
|
+
_super.prototype.construction.call(this);
|
|
33
|
+
// this.captureKey = "";
|
|
34
|
+
this._titleVisible = true;
|
|
35
|
+
this._captureVisible = false;
|
|
36
|
+
this.topLevelElements = [];
|
|
37
|
+
this.view = new FContainer();
|
|
38
|
+
this.bgGraphics = new Graphics();
|
|
39
|
+
this.view.addChild(this.bgGraphics);
|
|
40
|
+
//
|
|
41
|
+
this.bgGraphics.interactive = true;
|
|
42
|
+
this.dragHelper = new DragHelper();
|
|
43
|
+
this.dragHelper.view = this.bgGraphics;
|
|
44
|
+
this.contentCont = new FContainer();
|
|
45
|
+
this.view.addChild(this.contentCont);
|
|
46
|
+
this.titleCont = new FContainer();
|
|
47
|
+
this.contentCont.addChild(this.titleCont);
|
|
48
|
+
this.titleLabel = new FLabel({
|
|
49
|
+
autosize: true,
|
|
50
|
+
color: FC.config.viewSettings.titleLabelColor,
|
|
51
|
+
size: FC.config.viewSettings.titleLabelSize
|
|
52
|
+
});
|
|
53
|
+
this.titleCont.addChild(this.titleLabel);
|
|
54
|
+
this.titleLabel.text = "Test Title";
|
|
55
|
+
this.topLevelCont = new FContainer();
|
|
56
|
+
this.titleCont.addChild(this.topLevelCont);
|
|
57
|
+
this.captureClickBtn = new BaseConsoleButton();
|
|
58
|
+
this.titleCont.addChild(this.captureClickBtn.view);
|
|
59
|
+
this.captureClickBtn.view.y = this.titleLabel.y + this.titleLabel.height + 10;
|
|
60
|
+
//
|
|
61
|
+
this.captureClickBtn.tooltipData = { title: FC.config.localization.captureClickBtnTooltip };
|
|
62
|
+
this.captureClickBtn.text = FC.config.localization.captureClickBtnLabel;
|
|
63
|
+
this.captureKeyBtn = new CaptureKeyButton();
|
|
64
|
+
this.titleCont.addChild(this.captureKeyBtn.view);
|
|
65
|
+
this.captureKeyBtn.view.y = this.captureClickBtn.view.y + this.captureClickBtn.view.height;
|
|
66
|
+
//
|
|
67
|
+
this.captureKeyBtn.tooltipData = { title: FC.config.localization.captureKeyBtnTooltipTitle };
|
|
68
|
+
this.insideContentCont = new FContainer();
|
|
69
|
+
this.contentCont.addChild(this.insideContentCont);
|
|
70
|
+
};
|
|
71
|
+
BaseConsoleView.prototype.addListeners = function () {
|
|
72
|
+
_super.prototype.addListeners.call(this);
|
|
73
|
+
this.eventListenerHelper.addEventListener(this.dragHelper, DragHelperEvent.DRAG_START, this.onDragStart);
|
|
74
|
+
this.eventListenerHelper.addEventListener(this.dragHelper, DragHelperEvent.DRAG_UPDATE, this.onDragUpdate);
|
|
75
|
+
this.eventListenerHelper.addEventListener(this.captureKeyBtn, CaptureKeyButtonEvent.CAPTURE_KEY_PRESS, this.onCapture);
|
|
76
|
+
this.eventListenerHelper.addEventListener(this.captureClickBtn.view, InteractiveEvent.TAP, this.onCapture);
|
|
77
|
+
};
|
|
78
|
+
BaseConsoleView.prototype.onDragStart = function () {
|
|
79
|
+
this.viewDragStartX = this.view.x;
|
|
80
|
+
this.viewDragStartY = this.view.y;
|
|
81
|
+
FC.moveViewToTopLayer(this);
|
|
82
|
+
};
|
|
83
|
+
BaseConsoleView.prototype.onDragUpdate = function () {
|
|
84
|
+
this.view.x = this.viewDragStartX + this.dragHelper.changeDragGlobalX;
|
|
85
|
+
this.view.y = this.viewDragStartY + this.dragHelper.changeDragGlobalY;
|
|
86
|
+
};
|
|
87
|
+
BaseConsoleView.prototype.onClose = function () {
|
|
88
|
+
FC.hideView(this);
|
|
89
|
+
};
|
|
90
|
+
BaseConsoleView.prototype.onCapture = function () {
|
|
91
|
+
// Should be overridden in subclusses
|
|
92
|
+
};
|
|
93
|
+
Object.defineProperty(BaseConsoleView.prototype, "visible", {
|
|
94
|
+
get: function () {
|
|
95
|
+
return this._visible;
|
|
96
|
+
},
|
|
97
|
+
set: function (value) {
|
|
98
|
+
if (value == this.visible) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this._visible = value;
|
|
102
|
+
this.commitData();
|
|
103
|
+
},
|
|
104
|
+
enumerable: false,
|
|
105
|
+
configurable: true
|
|
106
|
+
});
|
|
107
|
+
BaseConsoleView.prototype.commitData = function () {
|
|
108
|
+
_super.prototype.commitData.call(this);
|
|
109
|
+
this.view.visible = this.visible;
|
|
110
|
+
this.titleLabel.visible = this.titleVisible;
|
|
111
|
+
this.captureClickBtn.view.visible = this.captureVisible;
|
|
112
|
+
this.captureKeyBtn.view.visible = this.captureVisible;
|
|
113
|
+
this.arrange();
|
|
114
|
+
};
|
|
115
|
+
BaseConsoleView.prototype.arrange = function () {
|
|
116
|
+
// Reset previously set changes
|
|
117
|
+
var tempBtn;
|
|
118
|
+
var prevBtn;
|
|
119
|
+
var btnsCount = this.topLevelElements.length;
|
|
120
|
+
for (var btnIndex = 0; btnIndex < btnsCount; btnIndex++) {
|
|
121
|
+
tempBtn = this.topLevelElements[btnIndex];
|
|
122
|
+
if (prevBtn) {
|
|
123
|
+
tempBtn.x = prevBtn.x + prevBtn.width + 5;
|
|
124
|
+
}
|
|
125
|
+
prevBtn = tempBtn;
|
|
126
|
+
}
|
|
127
|
+
if (this.titleVisible) {
|
|
128
|
+
this.topLevelCont.x = this.titleLabel.x + this.titleLabel.width + 10;
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
this.topLevelCont.x = this.titleLabel.x;
|
|
132
|
+
}
|
|
133
|
+
if (this.insideContentCont.visible) {
|
|
134
|
+
this.insideContentCont.y = this.titleCont.y + this.titleCont.height;
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
this.insideContentCont.y = 0;
|
|
138
|
+
}
|
|
139
|
+
var tempWidth = this.contentCont.width + FC.config.viewSettings.bgToContentShift.x;
|
|
140
|
+
var tempHeight = this.contentCont.height + FC.config.viewSettings.bgToContentShift.y;
|
|
141
|
+
if (tempWidth != this.lastBgWidth || tempHeight != this.lastBgHeight) {
|
|
142
|
+
this.lastBgWidth = tempWidth;
|
|
143
|
+
this.lastBgHeight = tempHeight;
|
|
144
|
+
this.bgGraphics.clear();
|
|
145
|
+
this.bgGraphics.beginFill(FC.config.viewSettings.bgColor, FC.config.viewSettings.bgAlpha);
|
|
146
|
+
this.bgGraphics.lineStyle(FC.config.viewSettings.borderWidth, FC.config.viewSettings.borderColor, FC.config.viewSettings.borderAlpha);
|
|
147
|
+
this.bgGraphics.drawRect(0, 0, tempWidth, tempHeight);
|
|
148
|
+
this.bgGraphics.endFill();
|
|
149
|
+
}
|
|
150
|
+
this.contentCont.x = this.bgGraphics.x + ((this.bgGraphics.width - this.contentCont.width) >> 1);
|
|
151
|
+
this.contentCont.y = this.bgGraphics.y + ((this.bgGraphics.height - this.contentCont.height) >> 1);
|
|
152
|
+
};
|
|
153
|
+
BaseConsoleView.prototype.createTitleBtn = function (label, tooltipData) {
|
|
154
|
+
var tempBtn = new BaseConsoleButton();
|
|
155
|
+
tempBtn.text = label;
|
|
156
|
+
tempBtn.tooltipData = tooltipData;
|
|
157
|
+
this.addTitleElement(tempBtn.view);
|
|
158
|
+
return tempBtn;
|
|
159
|
+
};
|
|
160
|
+
BaseConsoleView.prototype.addTitleElement = function (element) {
|
|
161
|
+
this.topLevelCont.addChild(element);
|
|
162
|
+
this.topLevelElements.push(element);
|
|
163
|
+
};
|
|
164
|
+
Object.defineProperty(BaseConsoleView.prototype, "titleVisible", {
|
|
165
|
+
get: function () {
|
|
166
|
+
return this._titleVisible;
|
|
167
|
+
},
|
|
168
|
+
set: function (value) {
|
|
169
|
+
if (value == this.titleVisible) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
this._titleVisible = value;
|
|
173
|
+
this.commitData();
|
|
174
|
+
},
|
|
175
|
+
enumerable: false,
|
|
176
|
+
configurable: true
|
|
177
|
+
});
|
|
178
|
+
Object.defineProperty(BaseConsoleView.prototype, "captureVisible", {
|
|
179
|
+
get: function () {
|
|
180
|
+
return this._captureVisible;
|
|
181
|
+
},
|
|
182
|
+
set: function (value) {
|
|
183
|
+
if (value == this.captureVisible) {
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
this._captureVisible = value;
|
|
187
|
+
this.commitData();
|
|
188
|
+
},
|
|
189
|
+
enumerable: false,
|
|
190
|
+
configurable: true
|
|
191
|
+
});
|
|
192
|
+
return BaseConsoleView;
|
|
193
|
+
}(BaseObject));
|
|
194
|
+
export { BaseConsoleView };
|
|
195
|
+
//# sourceMappingURL=BaseConsoleView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseConsoleView.js","sourceRoot":"","sources":["../../../src/console/view/BaseConsoleView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAC,gBAAgB,EAA0B,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAEpI,OAAO,EAAC,EAAE,EAAC,MAAM,OAAO,CAAC;AACzB,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAC,qBAAqB,EAAC,MAAM,iCAAiC,CAAC;AAGtE;IAAqC,mCAAU;IAA/C;QAAA,qEAyPC;QAjOG,6BAA6B;QAEtB,iBAAW,GAAW,CAAC,CAAC;QACxB,kBAAY,GAAW,CAAC,CAAC;;IA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E7B,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;;;OATA;IAUL,sBAAC;AAAD,CAAC,AAzPD,CAAqC,UAAU,GAyP9C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FContainer } from "@flashist/flibs";
|
|
2
|
+
/**
|
|
3
|
+
* The only purpose of the class is to show in the console its name,
|
|
4
|
+
* so it would be obvious, that everything "inside of it" is part
|
|
5
|
+
* of the console itself.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ConsoleContentContainer extends FContainer {
|
|
8
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
import { FContainer } from "@flashist/flibs";
|
|
17
|
+
/**
|
|
18
|
+
* The only purpose of the class is to show in the console its name,
|
|
19
|
+
* so it would be obvious, that everything "inside of it" is part
|
|
20
|
+
* of the console itself.
|
|
21
|
+
*/
|
|
22
|
+
var ConsoleContentContainer = /** @class */ (function (_super) {
|
|
23
|
+
__extends(ConsoleContentContainer, _super);
|
|
24
|
+
function ConsoleContentContainer() {
|
|
25
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
26
|
+
}
|
|
27
|
+
return ConsoleContentContainer;
|
|
28
|
+
}(FContainer));
|
|
29
|
+
export { ConsoleContentContainer };
|
|
30
|
+
//# sourceMappingURL=ConsoleContentContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsoleContentContainer.js","sourceRoot":"","sources":["../../../src/console/view/ConsoleContentContainer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAE3C;;;;GAIG;AACH;IAA6C,2CAAU;IAAvD;;IAEA,CAAC;IAAD,8BAAC;AAAD,CAAC,AAFD,CAA6C,UAAU,GAEtD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseConsoleView } from "./BaseConsoleView";
|
|
2
|
+
export declare class ConsoleView extends BaseConsoleView {
|
|
3
|
+
private displayListBtn;
|
|
4
|
+
private closeBtn;
|
|
5
|
+
private fpsMeter;
|
|
6
|
+
protected construction(): void;
|
|
7
|
+
protected addListeners(): void;
|
|
8
|
+
private onDisplayListClick;
|
|
9
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
import { BaseConsoleView } from "./BaseConsoleView";
|
|
17
|
+
import { FC } from "../FC";
|
|
18
|
+
import { InteractiveEvent } from "@flashist/flibs";
|
|
19
|
+
import { FpsMeterView } from "./fps/FpsMeterView";
|
|
20
|
+
var ConsoleView = /** @class */ (function (_super) {
|
|
21
|
+
__extends(ConsoleView, _super);
|
|
22
|
+
function ConsoleView() {
|
|
23
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
24
|
+
}
|
|
25
|
+
ConsoleView.prototype.construction = function () {
|
|
26
|
+
_super.prototype.construction.call(this);
|
|
27
|
+
this.titleVisible = false;
|
|
28
|
+
this.displayListBtn = this.createTitleBtn(FC.config.localization.displayListBtnLabel, {
|
|
29
|
+
title: FC.config.localization.displayListBtnTooltipTitle,
|
|
30
|
+
text: FC.config.localization.displayListBtnTooltipText
|
|
31
|
+
});
|
|
32
|
+
this.addTitleElement(new FpsMeterView());
|
|
33
|
+
this.closeBtn = this.createTitleBtn(FC.config.localization.closeBtnLabel, { title: FC.config.localization.closeBtnTooltipTitle });
|
|
34
|
+
};
|
|
35
|
+
ConsoleView.prototype.addListeners = function () {
|
|
36
|
+
_super.prototype.addListeners.call(this);
|
|
37
|
+
this.eventListenerHelper.addEventListener(this.displayListBtn.view, InteractiveEvent.TAP, this.onDisplayListClick);
|
|
38
|
+
this.eventListenerHelper.addEventListener(this.closeBtn.view, InteractiveEvent.TAP, this.onClose);
|
|
39
|
+
};
|
|
40
|
+
ConsoleView.prototype.onDisplayListClick = function () {
|
|
41
|
+
FC.toggleView(FC.displayListView);
|
|
42
|
+
};
|
|
43
|
+
return ConsoleView;
|
|
44
|
+
}(BaseConsoleView));
|
|
45
|
+
export { ConsoleView };
|
|
46
|
+
//# sourceMappingURL=ConsoleView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsoleView.js","sourceRoot":"","sources":["../../../src/console/view/ConsoleView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAAC,e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,eAAe,CAAC,CAAC;IACtC,CAAC;IACL,kBAAC;AAAD,CAAC,AA/CD,CAAiC,eAAe,GA+C/C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseConsoleButton } from "../BaseConsoleButton";
|
|
2
|
+
import { InputManagerEventData } from "@flashist/flibs";
|
|
3
|
+
export declare class CaptureKeyButton extends BaseConsoleButton {
|
|
4
|
+
private _captureKeyCode;
|
|
5
|
+
captureKey: string;
|
|
6
|
+
private _isClicked;
|
|
7
|
+
protected addListeners(): void;
|
|
8
|
+
protected onClick(): void;
|
|
9
|
+
protected onKeyUp(data: InputManagerEventData): void;
|
|
10
|
+
protected commitData(): void;
|
|
11
|
+
protected arrange(): void;
|
|
12
|
+
get isClicked(): boolean;
|
|
13
|
+
set isClicked(value: boolean);
|
|
14
|
+
get captureKeyCode(): string;
|
|
15
|
+
set captureKeyCode(value: string);
|
|
16
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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
|
+
import { BaseConsoleButton } from "../BaseConsoleButton";
|
|
17
|
+
import { InputManager, InputManagerEvent } from "@flashist/flibs";
|
|
18
|
+
import { StringTools } from "@flashist/fcore";
|
|
19
|
+
import { CaptureKeyButtonEvent } from "./CaptureKeyButtonEvent";
|
|
20
|
+
import { FC } from "../../FC";
|
|
21
|
+
var CaptureKeyButton = /** @class */ (function (_super) {
|
|
22
|
+
__extends(CaptureKeyButton, _super);
|
|
23
|
+
function CaptureKeyButton() {
|
|
24
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
25
|
+
}
|
|
26
|
+
CaptureKeyButton.prototype.addListeners = function () {
|
|
27
|
+
_super.prototype.addListeners.call(this);
|
|
28
|
+
this.eventListenerHelper.addEventListener(InputManager.instance, InputManagerEvent.KEY_UP, this.onKeyUp);
|
|
29
|
+
};
|
|
30
|
+
CaptureKeyButton.prototype.onClick = function () {
|
|
31
|
+
_super.prototype.onClick.call(this);
|
|
32
|
+
this.isClicked = !this.isClicked;
|
|
33
|
+
if (!this.isClicked) {
|
|
34
|
+
this.captureKeyCode = null;
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
CaptureKeyButton.prototype.onKeyUp = function (data) {
|
|
38
|
+
if (this.view.worldVisible) {
|
|
39
|
+
if (this.isClicked) {
|
|
40
|
+
this.isClicked = false;
|
|
41
|
+
this.captureKey = data.nativeKeyboardEvent.key;
|
|
42
|
+
this.captureKeyCode = data.nativeKeyboardEvent.code;
|
|
43
|
+
this.commitData();
|
|
44
|
+
}
|
|
45
|
+
else if (this.captureKeyCode) {
|
|
46
|
+
if (this.captureKeyCode === data.nativeKeyboardEvent.code) {
|
|
47
|
+
this.dispatchEvent(CaptureKeyButtonEvent.CAPTURE_KEY_PRESS);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
CaptureKeyButton.prototype.commitData = function () {
|
|
53
|
+
_super.prototype.commitData.call(this);
|
|
54
|
+
if (this.isClicked) {
|
|
55
|
+
this.text = FC.config.localization.captureKeyBtnPressedLabel;
|
|
56
|
+
}
|
|
57
|
+
else if (this.captureKeyCode) {
|
|
58
|
+
this.text = StringTools.substitute(FC.config.localization.captureKeyBtnNormalLabel, {
|
|
59
|
+
key: this.captureKey
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
this.text = StringTools.substituteList(FC.config.localization.captureKeyBtnNormalLabel, {
|
|
64
|
+
key: FC.config.localization.captureKeyBtnNoKeyHelpText
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
CaptureKeyButton.prototype.arrange = function () {
|
|
69
|
+
_super.prototype.arrange.call(this);
|
|
70
|
+
};
|
|
71
|
+
Object.defineProperty(CaptureKeyButton.prototype, "isClicked", {
|
|
72
|
+
get: function () {
|
|
73
|
+
return this._isClicked;
|
|
74
|
+
},
|
|
75
|
+
set: function (value) {
|
|
76
|
+
if (value == this.isClicked) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
this._isClicked = value;
|
|
80
|
+
this.commitData();
|
|
81
|
+
},
|
|
82
|
+
enumerable: false,
|
|
83
|
+
configurable: true
|
|
84
|
+
});
|
|
85
|
+
Object.defineProperty(CaptureKeyButton.prototype, "captureKeyCode", {
|
|
86
|
+
get: function () {
|
|
87
|
+
return this._captureKeyCode;
|
|
88
|
+
},
|
|
89
|
+
set: function (value) {
|
|
90
|
+
if (value === this._captureKeyCode) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this._captureKeyCode = value;
|
|
94
|
+
this.commitData();
|
|
95
|
+
},
|
|
96
|
+
enumerable: false,
|
|
97
|
+
configurable: true
|
|
98
|
+
});
|
|
99
|
+
return CaptureKeyButton;
|
|
100
|
+
}(BaseConsoleButton));
|
|
101
|
+
export { CaptureKeyButton };
|
|
102
|
+
//# sourceMappingURL=CaptureKeyButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaptureKeyButton.js","sourceRoot":"","sources":["../../../../src/console/view/capture/CaptureKeyButton.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO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CAAsC,iBAAiB,GAuGtD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
var CaptureKeyButtonEvent = /** @class */ (function () {
|
|
2
|
+
function CaptureKeyButtonEvent() {
|
|
3
|
+
}
|
|
4
|
+
CaptureKeyButtonEvent.CAPTURE_KEY_PRESS = "CAPTURE_KEY_PRESS";
|
|
5
|
+
return CaptureKeyButtonEvent;
|
|
6
|
+
}());
|
|
7
|
+
export { CaptureKeyButtonEvent };
|
|
8
|
+
//# sourceMappingURL=CaptureKeyButtonEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaptureKeyButtonEvent.js","sourceRoot":"","sources":["../../../../src/console/view/capture/CaptureKeyButtonEvent.ts"],"names":[],"mappings":"AAAA;IAAA;IAEA,CAAC;IADiB,uCAAiB,GAAU,mBAAmB,CAAC;IACjE,4BAAC;CAAA,AAFD,IAEC;SAFY,qBAAqB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IFDisplayObjectUnderPointVO, FContainer, DisplayObjectContainer, FLabel } from "@flashist/flibs";
|
|
2
|
+
export declare class DisplayListItemView extends FContainer<IFDisplayObjectUnderPointVO> {
|
|
3
|
+
contentCont: DisplayObjectContainer;
|
|
4
|
+
field: FLabel;
|
|
5
|
+
private _text;
|
|
6
|
+
private tooltipData;
|
|
7
|
+
constructor();
|
|
8
|
+
protected construction(): void;
|
|
9
|
+
protected addListeners(): void;
|
|
10
|
+
private onOver;
|
|
11
|
+
private onOut;
|
|
12
|
+
protected onClick(): void;
|
|
13
|
+
protected commitData(): void;
|
|
14
|
+
protected arrange(): void;
|
|
15
|
+
get text(): string;
|
|
16
|
+
set text(value: string);
|
|
17
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
import { InteractiveEvent, FContainer, FLabel } from "@flashist/flibs";
|
|
17
|
+
import { FC } from "../../..";
|
|
18
|
+
import { GlobalVarTools } from "../../tools/GlobalVarTools";
|
|
19
|
+
var DisplayListItemView = /** @class */ (function (_super) {
|
|
20
|
+
__extends(DisplayListItemView, _super);
|
|
21
|
+
function DisplayListItemView() {
|
|
22
|
+
var _this = _super.call(this) || this;
|
|
23
|
+
_this._text = "";
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
DisplayListItemView.prototype.construction = function () {
|
|
27
|
+
_super.prototype.construction.call(this);
|
|
28
|
+
this.contentCont = new FContainer();
|
|
29
|
+
this.addChild(this.contentCont);
|
|
30
|
+
this.contentCont.interactive = true;
|
|
31
|
+
this.contentCont.buttonMode = true;
|
|
32
|
+
this.field = new FLabel({
|
|
33
|
+
autosize: true,
|
|
34
|
+
color: FC.config.displayListSettings.hierarchyLabelColor,
|
|
35
|
+
size: FC.config.displayListSettings.hierarchyLabelSize
|
|
36
|
+
});
|
|
37
|
+
this.contentCont.addChild(this.field);
|
|
38
|
+
this.tooltipData = {
|
|
39
|
+
title: FC.config.localization.displayListItemTooltipTitle
|
|
40
|
+
};
|
|
41
|
+
this.commitData();
|
|
42
|
+
this.onOut();
|
|
43
|
+
};
|
|
44
|
+
DisplayListItemView.prototype.addListeners = function () {
|
|
45
|
+
_super.prototype.addListeners.call(this);
|
|
46
|
+
this.eventListenerHelper.addEventListener(this.contentCont, InteractiveEvent.OVER, this.onOver);
|
|
47
|
+
this.eventListenerHelper.addEventListener(this.contentCont, InteractiveEvent.OUT, this.onOut);
|
|
48
|
+
this.eventListenerHelper.addEventListener(this.contentCont, InteractiveEvent.TAP, this.onClick);
|
|
49
|
+
this.eventListenerHelper.addEventListener(this.contentCont, InteractiveEvent.UP_OUTSIDE, this.onOut);
|
|
50
|
+
};
|
|
51
|
+
DisplayListItemView.prototype.onOver = function () {
|
|
52
|
+
// this.contentCont.alpha = 1;
|
|
53
|
+
this.field.color = FC.config.displayListSettings.hierarchyLabelColorOver;
|
|
54
|
+
FC.tooltipManager.show(this.tooltipData);
|
|
55
|
+
};
|
|
56
|
+
DisplayListItemView.prototype.onOut = function () {
|
|
57
|
+
// this.contentCont.alpha = 0.75;
|
|
58
|
+
this.field.color = FC.config.displayListSettings.hierarchyLabelColor;
|
|
59
|
+
FC.tooltipManager.hide();
|
|
60
|
+
};
|
|
61
|
+
DisplayListItemView.prototype.onClick = function () {
|
|
62
|
+
this.onOut();
|
|
63
|
+
//
|
|
64
|
+
console.log(this.data.object);
|
|
65
|
+
GlobalVarTools.storeObjectAsGlobalVar(this.data.object);
|
|
66
|
+
};
|
|
67
|
+
DisplayListItemView.prototype.commitData = function () {
|
|
68
|
+
_super.prototype.commitData.call(this);
|
|
69
|
+
this.field.text = this.text;
|
|
70
|
+
this.arrange();
|
|
71
|
+
};
|
|
72
|
+
DisplayListItemView.prototype.arrange = function () {
|
|
73
|
+
_super.prototype.arrange.call(this);
|
|
74
|
+
};
|
|
75
|
+
Object.defineProperty(DisplayListItemView.prototype, "text", {
|
|
76
|
+
get: function () {
|
|
77
|
+
return this._text;
|
|
78
|
+
},
|
|
79
|
+
set: function (value) {
|
|
80
|
+
if (value == this.text) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this._text = value;
|
|
84
|
+
this.commitData();
|
|
85
|
+
},
|
|
86
|
+
enumerable: false,
|
|
87
|
+
configurable: true
|
|
88
|
+
});
|
|
89
|
+
return DisplayListItemView;
|
|
90
|
+
}(FContainer));
|
|
91
|
+
export { DisplayListItemView };
|
|
92
|
+
//# sourceMappingURL=DisplayListItemView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisplayListItemView.js","sourceRoot":"","sources":["../../../../src/console/view/displaylist/DisplayListItemView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,EAA8B,gBAAgB,EAAE,UAAU,EAA0B,MAAM,EAAC,MAAM,iBAAiB,CAAC;AAC1H,OAAO,EAAS,EAAE,EAAe,MAAM,UAAU,CAAC;AAClD,OAAO,EAAC,cAAc,EAAC,MAAM,4BAA4B,CAAC;AAG1D;IAAyC,uCAAuC;IAS5E;QAAA,YACI,iBAAO,SACV;QANO,WAAK,GAAW,EAAE,CAAC;;IAM3B,CAAC;IAES,0CAAY,GAAtB;QACI,iBAAM,YAAY,WAAE,CAAC;QAErB,IAAI,CAAC,WAAW,GAAG,IAAI,UAAU,EAAE,CAAC;QACpC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,IAAI,CAAC,WAAW,CAAC,WAAW,GAAG,IAAI,CAAC;QACpC,IAAI,CAAC,WAAW,CAAC,UAAU,GAAG,IAAI,CAAC;QAEnC,IAAI,CAAC,KAAK,GAAG,IAAI,MAAM,CAAC;YACpB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,mBAAmB;YACxD,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,kBAAkB;SACzD,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEtC,IAAI,CAAC,WAAW,GAAG;YACf,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,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AAc,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC5D,CAAC;IAGS,wCAAU,GAApB;QACI,iBAAM,UAAU,WAAE,CAAC;QAEnB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAE5B,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAES,qCAAO,GAAjB;QACI,iBAAM,OAAO,WAAE,CAAC;IAEpB,CAAC;IAGD,sBAAI,qCAAI;aAAR;YACI,OAAO,IAAI,CAAC,KAAK,CAAC;QACtB,CAAC;aAED,UAAS,KAAa;YAClB,IAAI,KAAK,IAAI,IAAI,CAAC,IAAI,EAAE;gBACpB,OAAO;aACV;YAED,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;YAEnB,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;;;OAVA;IAYL,0BAAC;AAAD,CAAC,AAlHD,CAAyC,UAAU,GAkHlD"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { InputManagerEventData } from "@flashist/flibs";
|
|
2
|
+
import { DisplayListItemView } from "./DisplayListItemView";
|
|
3
|
+
import { BaseConsoleView } from "../BaseConsoleView";
|
|
4
|
+
import { BaseConsoleButton } from "../BaseConsoleButton";
|
|
5
|
+
import { PauseKeyButton } from "../pause/PauseKeyButton";
|
|
6
|
+
export declare class DisplayListView extends BaseConsoleView {
|
|
7
|
+
private static ARROW_KEY_CODES;
|
|
8
|
+
private lastCheckedPos;
|
|
9
|
+
private displayListField;
|
|
10
|
+
private displayListItemsPool;
|
|
11
|
+
private displayListItemsCont;
|
|
12
|
+
private closeBtn;
|
|
13
|
+
private lastUnderPointData;
|
|
14
|
+
private lastAllObjectsUnderPointList;
|
|
15
|
+
private forceUpdateUnderPointView;
|
|
16
|
+
protected ignoreConsoleBtn: BaseConsoleButton;
|
|
17
|
+
private _isIgnoreConsoleEnabled;
|
|
18
|
+
protected additionalInfoBtn: BaseConsoleButton;
|
|
19
|
+
private _isAdditionalInfoEnabled;
|
|
20
|
+
protected moveHelperBtn: BaseConsoleButton;
|
|
21
|
+
private _isMoveHelperEnabled;
|
|
22
|
+
private moveObject;
|
|
23
|
+
private prevMoveObject;
|
|
24
|
+
private moveObjectIndex;
|
|
25
|
+
private paused;
|
|
26
|
+
protected pauseKeyBtn: PauseKeyButton;
|
|
27
|
+
private _pauseVisible;
|
|
28
|
+
constructor();
|
|
29
|
+
protected construction(): void;
|
|
30
|
+
destruction(): void;
|
|
31
|
+
protected addListeners(): void;
|
|
32
|
+
protected removeListeners(): void;
|
|
33
|
+
private onTick;
|
|
34
|
+
protected onCapture(): void;
|
|
35
|
+
protected onIgnoreConsole(): void;
|
|
36
|
+
protected onAdditionalInfo(): void;
|
|
37
|
+
protected onMoveHelper(): void;
|
|
38
|
+
protected onKeyDown(data: InputManagerEventData): void;
|
|
39
|
+
private parseUnderPointDataToText;
|
|
40
|
+
private parseUnderPointDataToVisualItemsList;
|
|
41
|
+
private groupLogUnderPointData;
|
|
42
|
+
private checkUnderPointDataEqual;
|
|
43
|
+
private parseUnderPointDataToSingleList;
|
|
44
|
+
get isAdditionalInfoEnabled(): boolean;
|
|
45
|
+
set isAdditionalInfoEnabled(value: boolean);
|
|
46
|
+
get isMoveHelperEnabled(): boolean;
|
|
47
|
+
set isMoveHelperEnabled(value: boolean);
|
|
48
|
+
get isIgnoreConsoleEnabled(): boolean;
|
|
49
|
+
set isIgnoreConsoleEnabled(value: boolean);
|
|
50
|
+
protected commitData(): void;
|
|
51
|
+
protected commitDisplayListData(): void;
|
|
52
|
+
get pauseVisible(): boolean;
|
|
53
|
+
set pauseVisible(value: boolean);
|
|
54
|
+
protected clearDisplayListItems(): void;
|
|
55
|
+
protected createDisplayListItems(items: DisplayListItemView[]): void;
|
|
56
|
+
}
|