@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,118 @@
|
|
|
1
|
+
export declare class Config {
|
|
2
|
+
password: string;
|
|
3
|
+
localization: {
|
|
4
|
+
closeBtnTooltipTitle: string;
|
|
5
|
+
onStatus: string;
|
|
6
|
+
offStatus: string;
|
|
7
|
+
closeBtnLabel: string;
|
|
8
|
+
displayListBtnLabel: string;
|
|
9
|
+
displayListBtnTooltipTitle: string;
|
|
10
|
+
displayListBtnTooltipText: string;
|
|
11
|
+
captureClickBtnLabel: string;
|
|
12
|
+
captureClickBtnTooltip: string;
|
|
13
|
+
captureKeyBtnTooltipTitle: string;
|
|
14
|
+
captureKeyBtnTooltipText: string;
|
|
15
|
+
captureKeyBtnNormalLabel: string;
|
|
16
|
+
captureKeyBtnPressedLabel: string;
|
|
17
|
+
captureKeyBtnNoKeyHelpText: string;
|
|
18
|
+
pauseUpdateKeyBtnTooltipTitle: string;
|
|
19
|
+
pauseUpdateKeyBtnNormalLabel: string;
|
|
20
|
+
pauseUpdateKeyBtnPressedLabel: string;
|
|
21
|
+
pauseUpdateKeyBtnNoKeyHelpText: string;
|
|
22
|
+
displayListItemTooltipTitle: string;
|
|
23
|
+
displayListTitle: string;
|
|
24
|
+
displayListStructureLogTitle: string;
|
|
25
|
+
additionalInfoBtnNormalLabel: string;
|
|
26
|
+
additionalInfoBtnPressedLabel: string;
|
|
27
|
+
additionalInfoBtnTooltipTitle: string;
|
|
28
|
+
additionalInfoBtnTooltipText: string;
|
|
29
|
+
ignorelInfoBtnNormalLabel: string;
|
|
30
|
+
ignoreInfoBtnPressedLabel: string;
|
|
31
|
+
ignoreInfoBtnTooltipTitle: string;
|
|
32
|
+
ignoreInfoBtnTooltipText: string;
|
|
33
|
+
moveHelperBtnNormalLabel: string;
|
|
34
|
+
moveHelperBtnPressedLabel: string;
|
|
35
|
+
moveHelperTooltipTitle: string;
|
|
36
|
+
moveHelperTooltipText: string;
|
|
37
|
+
movableObjectText: string;
|
|
38
|
+
fpsText: string;
|
|
39
|
+
};
|
|
40
|
+
console: {
|
|
41
|
+
aboveAll: boolean;
|
|
42
|
+
defaultVisible: boolean;
|
|
43
|
+
};
|
|
44
|
+
btnSettings: {
|
|
45
|
+
labelSize: number;
|
|
46
|
+
labelColor: number;
|
|
47
|
+
smallSize: number;
|
|
48
|
+
};
|
|
49
|
+
viewSettings: {
|
|
50
|
+
bgColor: number;
|
|
51
|
+
bgAlpha: number;
|
|
52
|
+
bgToContentShift: {
|
|
53
|
+
x: number;
|
|
54
|
+
y: number;
|
|
55
|
+
};
|
|
56
|
+
borderWidth: number;
|
|
57
|
+
borderColor: number;
|
|
58
|
+
borderAlpha: number;
|
|
59
|
+
titleLabelColor: number;
|
|
60
|
+
titleLabelSize: number;
|
|
61
|
+
};
|
|
62
|
+
displayListSettings: {
|
|
63
|
+
defaultVisible: boolean;
|
|
64
|
+
defaultCaptureKeyCode: string;
|
|
65
|
+
defaultCaptureKey: string;
|
|
66
|
+
defaultPauseKeyCode: string;
|
|
67
|
+
defaultPauseKey: string;
|
|
68
|
+
defaultIgnoreConsoleEnabled: boolean;
|
|
69
|
+
defaultAdditionalInfoEnabled: boolean;
|
|
70
|
+
defaultMoveHelperEnabled: boolean;
|
|
71
|
+
hierarchyLabelColor: number;
|
|
72
|
+
hierarchyLabelColorOver: number;
|
|
73
|
+
hierarchyLabelSize: number;
|
|
74
|
+
nameParamName: string;
|
|
75
|
+
additionalInfoParams: {
|
|
76
|
+
x: {
|
|
77
|
+
toFixed: number;
|
|
78
|
+
};
|
|
79
|
+
y: {
|
|
80
|
+
toFixed: number;
|
|
81
|
+
};
|
|
82
|
+
width: {
|
|
83
|
+
visualName: string;
|
|
84
|
+
toFixed: number;
|
|
85
|
+
};
|
|
86
|
+
height: {
|
|
87
|
+
visualName: string;
|
|
88
|
+
toFixed: number;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
globalVarPoolId: string;
|
|
92
|
+
globalVarNamePattern: string;
|
|
93
|
+
};
|
|
94
|
+
tooltipSettings: {
|
|
95
|
+
bgColor: number;
|
|
96
|
+
bgAlpha: number;
|
|
97
|
+
bgToContentShift: {
|
|
98
|
+
x: number;
|
|
99
|
+
y: number;
|
|
100
|
+
};
|
|
101
|
+
borderWidth: number;
|
|
102
|
+
borderColor: number;
|
|
103
|
+
borderAlpha: number;
|
|
104
|
+
titleLabelColor: number;
|
|
105
|
+
titleLabelSize: number;
|
|
106
|
+
textLabelColor: number;
|
|
107
|
+
textLabelSize: number;
|
|
108
|
+
};
|
|
109
|
+
fpsSettings: {
|
|
110
|
+
labelSize: number;
|
|
111
|
+
labelColor: number;
|
|
112
|
+
borderColor: number;
|
|
113
|
+
borderWidth: number;
|
|
114
|
+
borderHeight: number;
|
|
115
|
+
fieldToBorderPadding: number;
|
|
116
|
+
cumulativeFpsCount: number;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { KeyCodes } from "@flashist/flibs";
|
|
2
|
+
var Config = /** @class */ (function () {
|
|
3
|
+
function Config() {
|
|
4
|
+
this.password = "`";
|
|
5
|
+
this.localization = {
|
|
6
|
+
closeBtnTooltipTitle: "Close",
|
|
7
|
+
onStatus: "on",
|
|
8
|
+
offStatus: "off",
|
|
9
|
+
closeBtnLabel: "X",
|
|
10
|
+
displayListBtnLabel: "DL",
|
|
11
|
+
displayListBtnTooltipTitle: "Display List Inspector",
|
|
12
|
+
displayListBtnTooltipText: "Map the display list\nunder your mouse",
|
|
13
|
+
captureClickBtnLabel: "Capture",
|
|
14
|
+
captureClickBtnTooltip: "Click to show the display list data in the dev console",
|
|
15
|
+
captureKeyBtnTooltipTitle: "Assign a key to copy display data into dev console",
|
|
16
|
+
captureKeyBtnTooltipText: "Press an assinged key\nto add display list hierarchy\nto the browser console",
|
|
17
|
+
captureKeyBtnNormalLabel: "Capture key: {key}",
|
|
18
|
+
captureKeyBtnPressedLabel: "Press a key",
|
|
19
|
+
captureKeyBtnNoKeyHelpText: "(click to add)",
|
|
20
|
+
pauseUpdateKeyBtnTooltipTitle: "Assign a key to pause display list data update",
|
|
21
|
+
pauseUpdateKeyBtnNormalLabel: "Pause key: {key} ({status})",
|
|
22
|
+
pauseUpdateKeyBtnPressedLabel: "Press a key",
|
|
23
|
+
pauseUpdateKeyBtnNoKeyHelpText: "(click to add)",
|
|
24
|
+
displayListItemTooltipTitle: "Click to show the display item data in the dev console",
|
|
25
|
+
displayListTitle: "Display List Inspector",
|
|
26
|
+
displayListStructureLogTitle: "Display List Structure:",
|
|
27
|
+
additionalInfoBtnNormalLabel: "Additional Info: off",
|
|
28
|
+
additionalInfoBtnPressedLabel: "Additional Info: on",
|
|
29
|
+
additionalInfoBtnTooltipTitle: "Additional visual objects info",
|
|
30
|
+
additionalInfoBtnTooltipText: "Position, width, height, etc. (configurable)",
|
|
31
|
+
ignorelInfoBtnNormalLabel: "Ignore Console: off",
|
|
32
|
+
ignoreInfoBtnPressedLabel: "Ignore Console: on",
|
|
33
|
+
ignoreInfoBtnTooltipTitle: "Ignore console classes",
|
|
34
|
+
ignoreInfoBtnTooltipText: "Console-related classes\nwon't be shown in the inspector",
|
|
35
|
+
moveHelperBtnNormalLabel: "Move Helper: off",
|
|
36
|
+
moveHelperBtnPressedLabel: "Move Helper: on",
|
|
37
|
+
moveHelperTooltipTitle: "Move Helper",
|
|
38
|
+
moveHelperTooltipText: "Enable Move Helper and press CTRL\nfor choosing an object to move\nwith arrow keys (← ↑ → ↓)",
|
|
39
|
+
movableObjectText: "[MOVABLE]",
|
|
40
|
+
fpsText: "FPS: {0}"
|
|
41
|
+
};
|
|
42
|
+
this.console = {
|
|
43
|
+
aboveAll: true,
|
|
44
|
+
defaultVisible: false
|
|
45
|
+
};
|
|
46
|
+
this.btnSettings = {
|
|
47
|
+
labelSize: 14,
|
|
48
|
+
labelColor: 0xFF9900,
|
|
49
|
+
smallSize: 12
|
|
50
|
+
};
|
|
51
|
+
this.viewSettings = {
|
|
52
|
+
bgColor: 0x000000,
|
|
53
|
+
bgAlpha: 0.75,
|
|
54
|
+
bgToContentShift: { x: 10, y: 10 },
|
|
55
|
+
borderWidth: 1,
|
|
56
|
+
borderColor: 0x660000,
|
|
57
|
+
borderAlpha: 0.75,
|
|
58
|
+
titleLabelColor: 0xFFFFFF,
|
|
59
|
+
titleLabelSize: 14
|
|
60
|
+
};
|
|
61
|
+
this.displayListSettings = {
|
|
62
|
+
defaultVisible: false,
|
|
63
|
+
defaultCaptureKeyCode: KeyCodes.C,
|
|
64
|
+
defaultCaptureKey: "c",
|
|
65
|
+
defaultPauseKeyCode: KeyCodes.P,
|
|
66
|
+
defaultPauseKey: "p",
|
|
67
|
+
defaultIgnoreConsoleEnabled: true,
|
|
68
|
+
defaultAdditionalInfoEnabled: false,
|
|
69
|
+
defaultMoveHelperEnabled: false,
|
|
70
|
+
hierarchyLabelColor: 0xCCCCCC,
|
|
71
|
+
hierarchyLabelColorOver: 0xFF9900,
|
|
72
|
+
hierarchyLabelSize: 14,
|
|
73
|
+
nameParamName: "name",
|
|
74
|
+
additionalInfoParams: {
|
|
75
|
+
"x": { toFixed: 2 },
|
|
76
|
+
"y": { toFixed: 2 },
|
|
77
|
+
"width": { visualName: "w", toFixed: 2 },
|
|
78
|
+
"height": { visualName: "h", toFixed: 2 }
|
|
79
|
+
},
|
|
80
|
+
globalVarPoolId: "fconsole_globalVarPool",
|
|
81
|
+
globalVarNamePattern: "fconsoleTemp{0}"
|
|
82
|
+
};
|
|
83
|
+
this.tooltipSettings = {
|
|
84
|
+
bgColor: 0x000000,
|
|
85
|
+
bgAlpha: 0.75,
|
|
86
|
+
bgToContentShift: { x: 10, y: 10 },
|
|
87
|
+
borderWidth: 1,
|
|
88
|
+
borderColor: 0x660000,
|
|
89
|
+
borderAlpha: 0.75,
|
|
90
|
+
titleLabelColor: 0xFF9900,
|
|
91
|
+
titleLabelSize: 14,
|
|
92
|
+
textLabelColor: 0xCCCCCC,
|
|
93
|
+
textLabelSize: 12
|
|
94
|
+
};
|
|
95
|
+
this.fpsSettings = {
|
|
96
|
+
labelSize: 12,
|
|
97
|
+
labelColor: 0xFF9900,
|
|
98
|
+
borderColor: 0xFF9900,
|
|
99
|
+
borderWidth: 50,
|
|
100
|
+
borderHeight: 16,
|
|
101
|
+
fieldToBorderPadding: 2,
|
|
102
|
+
// Amount of separate fps values, which would be saved, to measure an average fps value
|
|
103
|
+
cumulativeFpsCount: 60
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
return Config;
|
|
107
|
+
}());
|
|
108
|
+
export { Config };
|
|
109
|
+
//# sourceMappingURL=Config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Config.js","sourceRoot":"","sources":["../../src/console/Config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAEzC;IAAA;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,E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E,EAAE;YAChB,oBAAoB,EAAE,CAAC;YACvB,uFAAuF;YACvF,kBAAkB,EAAE,EAAE;SACzB,CAAC;IACN,CAAC;IAAD,aAAC;AAAD,CAAC,AApID,IAoIC"}
|
package/console/FC.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DisplayObjectContainer } from "@flashist/flibs";
|
|
2
|
+
import { ConsoleView } from "./view/ConsoleView";
|
|
3
|
+
import { BaseConsoleView } from "./view/BaseConsoleView";
|
|
4
|
+
import { Config } from "./Config";
|
|
5
|
+
import { TooltipManager } from "../tooltip/TooltipManager";
|
|
6
|
+
import { DisplayListView } from "./view/displaylist/DisplayListView";
|
|
7
|
+
export declare class FC {
|
|
8
|
+
private static eventListenerHelper;
|
|
9
|
+
private static _root;
|
|
10
|
+
private static contentCont;
|
|
11
|
+
private static viewsCont;
|
|
12
|
+
private static tooltipsCont;
|
|
13
|
+
private static passwordInputIndex;
|
|
14
|
+
static config: Config;
|
|
15
|
+
static tooltipManager: TooltipManager;
|
|
16
|
+
static view: ConsoleView;
|
|
17
|
+
static displayListView: DisplayListView;
|
|
18
|
+
static startInit(root?: DisplayObjectContainer, configChanges?: any | Partial<Config>): void;
|
|
19
|
+
private static onTicker;
|
|
20
|
+
private static onPasswordInput;
|
|
21
|
+
static get visible(): boolean;
|
|
22
|
+
static set visible(value: boolean);
|
|
23
|
+
static showView(view: BaseConsoleView, moveToMouse?: boolean): void;
|
|
24
|
+
static hideView(view: BaseConsoleView): void;
|
|
25
|
+
static toggleView(view: BaseConsoleView, moveToMouse?: boolean): void;
|
|
26
|
+
static moveViewToTopLayer(view: BaseConsoleView): void;
|
|
27
|
+
static get root(): DisplayObjectContainer;
|
|
28
|
+
static set root(value: DisplayObjectContainer);
|
|
29
|
+
}
|
package/console/FC.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { EventListenerHelper, Logger, ObjectTools } from "@flashist/fcore";
|
|
2
|
+
import { InputManager, InputManagerEvent, FApp, Point, DisplayTools, FContainer } from "@flashist/flibs";
|
|
3
|
+
import { ConsoleView } from "./view/ConsoleView";
|
|
4
|
+
import { Config } from "./Config";
|
|
5
|
+
import { TooltipManager } from "../tooltip/TooltipManager";
|
|
6
|
+
import { ConsoleTooltip } from "./view/tooltip/ConsoleTooltip";
|
|
7
|
+
import { ConsoleContentContainer } from "./view/ConsoleContentContainer";
|
|
8
|
+
import { DisplayListView } from "./view/displaylist/DisplayListView";
|
|
9
|
+
var FC = /** @class */ (function () {
|
|
10
|
+
function FC() {
|
|
11
|
+
}
|
|
12
|
+
FC.startInit = function (root, configChanges) {
|
|
13
|
+
Logger.log("CC: ", FC);
|
|
14
|
+
var config = new Config();
|
|
15
|
+
if (configChanges) {
|
|
16
|
+
ObjectTools.copyProps(config, configChanges);
|
|
17
|
+
}
|
|
18
|
+
FC.config = config;
|
|
19
|
+
FC.eventListenerHelper = new EventListenerHelper(FC);
|
|
20
|
+
// FC.contentCont = new FContainer();
|
|
21
|
+
FC.contentCont = new ConsoleContentContainer();
|
|
22
|
+
// FC.viewsCont = new FContainer();
|
|
23
|
+
FC.viewsCont = new FContainer();
|
|
24
|
+
FC.contentCont.addChild(FC.viewsCont);
|
|
25
|
+
// FC.tooltipsCont = new FContainer();
|
|
26
|
+
FC.tooltipsCont = new FContainer();
|
|
27
|
+
FC.contentCont.addChild(FC.tooltipsCont);
|
|
28
|
+
var tempTooltip = new ConsoleTooltip();
|
|
29
|
+
FC.tooltipManager = new TooltipManager(tempTooltip);
|
|
30
|
+
FC.tooltipManager.tooltipCont = FC.tooltipsCont;
|
|
31
|
+
FC.tooltipManager.mouseShift = new Point(10, 15);
|
|
32
|
+
// View
|
|
33
|
+
FC.view = new ConsoleView();
|
|
34
|
+
FC.hideView(FC.view);
|
|
35
|
+
//
|
|
36
|
+
FC.displayListView = new DisplayListView();
|
|
37
|
+
// Events
|
|
38
|
+
FC.eventListenerHelper.addEventListener(InputManager.instance, InputManagerEvent.KEY_DOWN, function (data) {
|
|
39
|
+
var pressedKey = data.nativeKeyboardEvent.key;
|
|
40
|
+
if (pressedKey.toUpperCase() === FC.config.password.charAt(FC.passwordInputIndex).toUpperCase()) {
|
|
41
|
+
FC.passwordInputIndex++;
|
|
42
|
+
if (FC.passwordInputIndex >= FC.config.password.length) {
|
|
43
|
+
FC.onPasswordInput();
|
|
44
|
+
FC.passwordInputIndex = 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
FC.passwordInputIndex = 0;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
FApp.instance.ticker.add(FC.onTicker);
|
|
52
|
+
FC.root = root;
|
|
53
|
+
FC.visible = FC.config.console.defaultVisible;
|
|
54
|
+
};
|
|
55
|
+
FC.onTicker = function () {
|
|
56
|
+
if (FC.config.console.aboveAll) {
|
|
57
|
+
DisplayTools.moveObjectToTopLayer(FC.contentCont);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
FC.onPasswordInput = function () {
|
|
61
|
+
FC.visible = !FC.visible;
|
|
62
|
+
};
|
|
63
|
+
Object.defineProperty(FC, "visible", {
|
|
64
|
+
get: function () {
|
|
65
|
+
return FC.view.visible;
|
|
66
|
+
},
|
|
67
|
+
set: function (value) {
|
|
68
|
+
if (value) {
|
|
69
|
+
FC.showView(FC.view, false);
|
|
70
|
+
DisplayTools.moveObjectToTopLayer(FC.viewsCont);
|
|
71
|
+
DisplayTools.moveObjectToTopLayer(FC.tooltipsCont);
|
|
72
|
+
if (FC.config.displayListSettings.defaultVisible) {
|
|
73
|
+
FC.showView(FC.displayListView);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
FC.hideView(FC.view);
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
enumerable: false,
|
|
81
|
+
configurable: true
|
|
82
|
+
});
|
|
83
|
+
FC.showView = function (view, moveToMouse) {
|
|
84
|
+
if (moveToMouse === void 0) { moveToMouse = true; }
|
|
85
|
+
FC.viewsCont.addChild(view.view);
|
|
86
|
+
view.visible = true;
|
|
87
|
+
FC.moveViewToTopLayer(view);
|
|
88
|
+
if (moveToMouse) {
|
|
89
|
+
var globalPos = FApp.instance.getGlobalInteractionPosition();
|
|
90
|
+
var localPos = view.view.parent.toLocal(new Point(globalPos.x + 1, globalPos.y + 1));
|
|
91
|
+
view.view.x = localPos.x;
|
|
92
|
+
view.view.y = localPos.y;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
FC.hideView = function (view) {
|
|
96
|
+
if (view.view.parent) {
|
|
97
|
+
view.view.parent.removeChild(view.view);
|
|
98
|
+
}
|
|
99
|
+
view.visible = false;
|
|
100
|
+
};
|
|
101
|
+
FC.toggleView = function (view, moveToMouse) {
|
|
102
|
+
if (moveToMouse === void 0) { moveToMouse = true; }
|
|
103
|
+
if (view.visible) {
|
|
104
|
+
FC.hideView(view);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
FC.showView(view, moveToMouse);
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
FC.moveViewToTopLayer = function (view) {
|
|
111
|
+
DisplayTools.moveObjectToTopLayer(view.view);
|
|
112
|
+
};
|
|
113
|
+
Object.defineProperty(FC, "root", {
|
|
114
|
+
get: function () {
|
|
115
|
+
return FC._root;
|
|
116
|
+
},
|
|
117
|
+
set: function (value) {
|
|
118
|
+
// Remove from the previous main container, if there was one
|
|
119
|
+
if (FC.root) {
|
|
120
|
+
FC.root.removeChild(FC.contentCont);
|
|
121
|
+
}
|
|
122
|
+
FC._root = value;
|
|
123
|
+
// Add to the new main container, if there is one
|
|
124
|
+
if (FC.root) {
|
|
125
|
+
FC.root.addChild(FC.contentCont);
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
enumerable: false,
|
|
129
|
+
configurable: true
|
|
130
|
+
});
|
|
131
|
+
// private static password: string = "";
|
|
132
|
+
FC.passwordInputIndex = 0;
|
|
133
|
+
return FC;
|
|
134
|
+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AC,IAAI,EAAE;gBACT,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;aACvC;YAED,EAAE,CAAC,KAAK,GAAG,KAAK,CAAC;YAEjB,iDAAiD;YACjD,IAAI,EAAE,CAAC,IAAI,EAAE;gBACT,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;aACpC;QACL,CAAC;;;OAdA;IAzID,wCAAwC;IACzB,qBAAkB,GAAW,CAAC,CAAC;IAuJlD,SAAC;CAAA,AAhKD,IAgKC;SAhKY,EAAE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UniqueTools, StringTools } from "@flashist/fcore";
|
|
2
|
+
import { FC } from "../FC";
|
|
3
|
+
var GlobalVarTools = /** @class */ (function () {
|
|
4
|
+
function GlobalVarTools() {
|
|
5
|
+
}
|
|
6
|
+
GlobalVarTools.getNextGlobalVarName = function () {
|
|
7
|
+
var tempUniqueId = UniqueTools.getUniqueIdForPool(FC.config.displayListSettings.globalVarPoolId);
|
|
8
|
+
var result = StringTools.substituteList(FC.config.displayListSettings.globalVarNamePattern, tempUniqueId);
|
|
9
|
+
return result;
|
|
10
|
+
};
|
|
11
|
+
GlobalVarTools.storeObjectAsGlobalVar = function (object) {
|
|
12
|
+
var tempId = GlobalVarTools.getNextGlobalVarName();
|
|
13
|
+
console.log(tempId);
|
|
14
|
+
window[tempId] = object;
|
|
15
|
+
};
|
|
16
|
+
return GlobalVarTools;
|
|
17
|
+
}());
|
|
18
|
+
export { GlobalVarTools };
|
|
19
|
+
//# sourceMappingURL=GlobalVarTools.js.map
|
|
@@ -0,0 +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;IAAA;IAaA,CAAC;IAZU,mCAAoB,GAA3B;QACI,IAAM,YAAY,GAAW,WAAW,CAAC,kBAAkB,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;QAC3G,IAAM,MAAM,GAAW,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,YAAY,CAAC,CAAC;QACpH,OAAO,MAAM,CAAC;IAClB,CAAC;IAEM,qCAAsB,GAA7B,UAA8B,MAAW;QACrC,IAAM,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;IACL,qBAAC;AAAD,CAAC,AAbD,IAaC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseObject } from "@flashist/fcore";
|
|
2
|
+
import { DisplayObjectContainer, FLabel } from "@flashist/flibs";
|
|
3
|
+
import { ITooltipData } from "../../tooltip/ITooltipData";
|
|
4
|
+
export declare class BaseConsoleButton extends BaseObject {
|
|
5
|
+
view: DisplayObjectContainer;
|
|
6
|
+
field: FLabel;
|
|
7
|
+
private _text;
|
|
8
|
+
tooltipData: ITooltipData;
|
|
9
|
+
constructor();
|
|
10
|
+
protected construction(): void;
|
|
11
|
+
protected addListeners(): void;
|
|
12
|
+
private onOver;
|
|
13
|
+
private onOut;
|
|
14
|
+
protected onClick(): void;
|
|
15
|
+
protected commitData(): void;
|
|
16
|
+
protected arrange(): void;
|
|
17
|
+
get text(): string;
|
|
18
|
+
set text(value: string);
|
|
19
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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 { FLabel, InteractiveEvent, FContainer } from "@flashist/flibs";
|
|
18
|
+
import { FC } from "../FC";
|
|
19
|
+
var BaseConsoleButton = /** @class */ (function (_super) {
|
|
20
|
+
__extends(BaseConsoleButton, _super);
|
|
21
|
+
function BaseConsoleButton() {
|
|
22
|
+
var _this = _super.call(this) || this;
|
|
23
|
+
_this._text = "";
|
|
24
|
+
return _this;
|
|
25
|
+
}
|
|
26
|
+
BaseConsoleButton.prototype.construction = function () {
|
|
27
|
+
_super.prototype.construction.call(this);
|
|
28
|
+
this.view = new FContainer();
|
|
29
|
+
this.view.interactive = true;
|
|
30
|
+
this.view.buttonMode = true;
|
|
31
|
+
this.field = new FLabel({
|
|
32
|
+
autosize: true,
|
|
33
|
+
color: FC.config.btnSettings.labelColor,
|
|
34
|
+
size: FC.config.btnSettings.labelSize
|
|
35
|
+
});
|
|
36
|
+
this.view.addChild(this.field);
|
|
37
|
+
this.commitData();
|
|
38
|
+
this.onOut();
|
|
39
|
+
};
|
|
40
|
+
BaseConsoleButton.prototype.addListeners = function () {
|
|
41
|
+
_super.prototype.addListeners.call(this);
|
|
42
|
+
this.eventListenerHelper.addEventListener(this.view, InteractiveEvent.OVER, this.onOver);
|
|
43
|
+
this.eventListenerHelper.addEventListener(this.view, InteractiveEvent.OUT, this.onOut);
|
|
44
|
+
this.eventListenerHelper.addEventListener(this.view, InteractiveEvent.TAP, this.onClick);
|
|
45
|
+
this.eventListenerHelper.addEventListener(this.view, InteractiveEvent.UP_OUTSIDE, this.onOut);
|
|
46
|
+
};
|
|
47
|
+
BaseConsoleButton.prototype.onOver = function () {
|
|
48
|
+
this.view.alpha = 1;
|
|
49
|
+
if (this.tooltipData) {
|
|
50
|
+
FC.tooltipManager.show(this.tooltipData);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
BaseConsoleButton.prototype.onOut = function () {
|
|
54
|
+
this.view.alpha = 0.75;
|
|
55
|
+
FC.tooltipManager.hide();
|
|
56
|
+
};
|
|
57
|
+
BaseConsoleButton.prototype.onClick = function () {
|
|
58
|
+
this.onOut();
|
|
59
|
+
};
|
|
60
|
+
BaseConsoleButton.prototype.commitData = function () {
|
|
61
|
+
_super.prototype.commitData.call(this);
|
|
62
|
+
this.field.text = this.text;
|
|
63
|
+
this.arrange();
|
|
64
|
+
};
|
|
65
|
+
BaseConsoleButton.prototype.arrange = function () {
|
|
66
|
+
_super.prototype.arrange.call(this);
|
|
67
|
+
};
|
|
68
|
+
Object.defineProperty(BaseConsoleButton.prototype, "text", {
|
|
69
|
+
get: function () {
|
|
70
|
+
return this._text;
|
|
71
|
+
},
|
|
72
|
+
set: function (value) {
|
|
73
|
+
if (value == this.text) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
this._text = value;
|
|
77
|
+
this.commitData();
|
|
78
|
+
},
|
|
79
|
+
enumerable: false,
|
|
80
|
+
configurable: true
|
|
81
|
+
});
|
|
82
|
+
return BaseConsoleButton;
|
|
83
|
+
}(BaseObject));
|
|
84
|
+
export { BaseConsoleButton };
|
|
85
|
+
//# sourceMappingURL=BaseConsoleButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseConsoleButton.js","sourceRoot":"","sources":["../../../src/console/view/Base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
2
|
+
import { DisplayObjectContainer, FLabel, FContainer } from "@flashist/flibs";
|
|
3
|
+
import { BaseConsoleButton } from "./BaseConsoleButton";
|
|
4
|
+
import { CaptureKeyButton } from "./capture/CaptureKeyButton";
|
|
5
|
+
import { ITooltipData } from "../../tooltip/ITooltipData";
|
|
6
|
+
export declare class BaseConsoleView extends BaseObject {
|
|
7
|
+
view: DisplayObjectContainer;
|
|
8
|
+
private bgGraphics;
|
|
9
|
+
protected contentCont: FContainer;
|
|
10
|
+
protected titleCont: FContainer;
|
|
11
|
+
protected insideContentCont: FContainer;
|
|
12
|
+
private _visible;
|
|
13
|
+
private dragHelper;
|
|
14
|
+
private viewDragStartX;
|
|
15
|
+
private viewDragStartY;
|
|
16
|
+
private topLevelElements;
|
|
17
|
+
private topLevelCont;
|
|
18
|
+
protected titleLabel: FLabel;
|
|
19
|
+
private _titleVisible;
|
|
20
|
+
protected captureClickBtn: BaseConsoleButton;
|
|
21
|
+
protected captureKeyBtn: CaptureKeyButton;
|
|
22
|
+
private _captureVisible;
|
|
23
|
+
lastBgWidth: number;
|
|
24
|
+
lastBgHeight: number;
|
|
25
|
+
protected construction(): void;
|
|
26
|
+
protected addListeners(): void;
|
|
27
|
+
private onDragStart;
|
|
28
|
+
private onDragUpdate;
|
|
29
|
+
protected onClose(): void;
|
|
30
|
+
protected onCapture(): void;
|
|
31
|
+
get visible(): boolean;
|
|
32
|
+
set visible(value: boolean);
|
|
33
|
+
protected commitData(): void;
|
|
34
|
+
protected arrange(): void;
|
|
35
|
+
protected createTitleBtn(label: string, tooltipData?: ITooltipData): BaseConsoleButton;
|
|
36
|
+
protected addTitleElement(element: DisplayObjectContainer): void;
|
|
37
|
+
get titleVisible(): boolean;
|
|
38
|
+
set titleVisible(value: boolean);
|
|
39
|
+
get captureVisible(): boolean;
|
|
40
|
+
set captureVisible(value: boolean);
|
|
41
|
+
}
|