@flashist/fconsole 0.0.39 → 0.0.41
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/view/displaylist/DisplayListItemView.js +1 -1
- package/console/view/displaylist/DisplayListItemView.js.map +1 -1
- package/index.d.ts +20 -2
- package/index.js +20 -2
- package/index.js.map +1 -1
- package/package.json +3 -2
- package/src/console/FC.d.ts +29 -0
- package/src/console/FC.js +125 -0
- package/src/console/FC.js.map +1 -0
- package/src/console/config/DefaultFConsoneConfigVO.d.ts +128 -0
- package/src/console/config/DefaultFConsoneConfigVO.js +113 -0
- package/src/console/config/DefaultFConsoneConfigVO.js.map +1 -0
- package/src/console/config/IFConsoleConfigVO.d.ts +87 -0
- package/src/console/config/IFConsoleConfigVO.js +2 -0
- package/src/console/config/IFConsoleConfigVO.js.map +1 -0
- package/src/console/config/IFConsoleCustomBtnConfigVO.d.ts +4 -0
- package/src/console/config/IFConsoleCustomBtnConfigVO.js +2 -0
- package/src/console/config/IFConsoleCustomBtnConfigVO.js.map +1 -0
- package/src/console/tools/GlobalVarTools.d.ts +4 -0
- package/src/console/tools/GlobalVarTools.js +15 -0
- package/src/console/tools/GlobalVarTools.js.map +1 -0
- package/src/console/view/BaseConsoleButton.d.ts +18 -0
- package/src/console/view/BaseConsoleButton.js +63 -0
- package/src/console/view/BaseConsoleButton.js.map +1 -0
- package/src/console/view/BaseConsoleView.d.ts +42 -0
- package/src/console/view/BaseConsoleView.js +170 -0
- package/src/console/view/BaseConsoleView.js.map +1 -0
- package/src/console/view/ConsoleContentContainer.d.ts +8 -0
- package/src/console/view/ConsoleContentContainer.js +9 -0
- package/src/console/view/ConsoleContentContainer.js.map +1 -0
- package/src/console/view/ConsoleView.d.ts +9 -0
- package/src/console/view/ConsoleView.js +43 -0
- package/src/console/view/ConsoleView.js.map +1 -0
- package/src/console/view/ConsoleViewEvent.d.ts +3 -0
- package/src/console/view/ConsoleViewEvent.js +6 -0
- package/src/console/view/ConsoleViewEvent.js.map +1 -0
- package/src/console/view/capture/CaptureKeyButton.d.ts +16 -0
- package/src/console/view/capture/CaptureKeyButton.js +73 -0
- package/src/console/view/capture/CaptureKeyButton.js.map +1 -0
- package/src/console/view/capture/CaptureKeyButtonEvent.d.ts +3 -0
- package/src/console/view/capture/CaptureKeyButtonEvent.js +4 -0
- package/src/console/view/capture/CaptureKeyButtonEvent.js.map +1 -0
- package/src/console/view/displaylist/DisplayListItemView.d.ts +18 -0
- package/src/console/view/displaylist/DisplayListItemView.js +75 -0
- package/src/console/view/displaylist/DisplayListItemView.js.map +1 -0
- package/src/console/view/displaylist/DisplayListView.d.ts +61 -0
- package/src/console/view/displaylist/DisplayListView.js +554 -0
- package/src/console/view/displaylist/DisplayListView.js.map +1 -0
- package/src/console/view/fps/FpsMeterView.d.ts +13 -0
- package/src/console/view/fps/FpsMeterView.js +65 -0
- package/src/console/view/fps/FpsMeterView.js.map +1 -0
- package/src/console/view/pause/PauseKeyButton.d.ts +20 -0
- package/src/console/view/pause/PauseKeyButton.js +99 -0
- package/src/console/view/pause/PauseKeyButton.js.map +1 -0
- package/src/console/view/tooltip/ConsoleTooltip.d.ts +11 -0
- package/src/console/view/tooltip/ConsoleTooltip.js +73 -0
- package/src/console/view/tooltip/ConsoleTooltip.js.map +1 -0
- package/src/tooltip/BaseTooltip.d.ts +9 -0
- package/src/tooltip/BaseTooltip.js +13 -0
- package/src/tooltip/BaseTooltip.js.map +1 -0
- package/src/tooltip/ITooltipData.d.ts +4 -0
- package/src/tooltip/ITooltipData.js +2 -0
- package/src/tooltip/ITooltipData.js.map +1 -0
- package/src/tooltip/TooltipManager.d.ts +37 -0
- package/src/tooltip/TooltipManager.js +105 -0
- package/src/tooltip/TooltipManager.js.map +1 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { StringTools, NumberTools } from "@flashist/fcore";
|
|
2
|
+
import { FContainer, FLabel, Graphics } from "@flashist/flibs";
|
|
3
|
+
import { FC } from "../../FC";
|
|
4
|
+
export class FpsMeterView extends FContainer {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.prevTime = 0;
|
|
8
|
+
this.time = 0;
|
|
9
|
+
this.stepFps = 0;
|
|
10
|
+
//
|
|
11
|
+
this.fpsValues = [];
|
|
12
|
+
this.cumulativeFpsValue = 0;
|
|
13
|
+
}
|
|
14
|
+
construction(...args) {
|
|
15
|
+
super.construction(args);
|
|
16
|
+
this.border = new Graphics();
|
|
17
|
+
this.addChild(this.border);
|
|
18
|
+
//
|
|
19
|
+
this.border.rect(0, 0, FC.config.fpsSettings.borderWidth, FC.config.fpsSettings.borderHeight);
|
|
20
|
+
this.border.fill({ color: 0x000000, alpha: 0.5 });
|
|
21
|
+
this.border.alpha = 0;
|
|
22
|
+
this.field = new FLabel({
|
|
23
|
+
nativeTextStyle: {
|
|
24
|
+
fill: FC.config.fpsSettings.labelColor,
|
|
25
|
+
fontSize: FC.config.fpsSettings.labelSize
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
this.addChild(this.field);
|
|
29
|
+
this.field.text = StringTools.substituteList(FC.config.localization.fpsText, "00");
|
|
30
|
+
//
|
|
31
|
+
this.field.x = FC.config.fpsSettings.fieldToBorderPadding;
|
|
32
|
+
this.field.y = FC.config.fpsSettings.fieldToBorderPadding;
|
|
33
|
+
this.field.width = this.border.width - FC.config.fpsSettings.fieldToBorderPadding * 2;
|
|
34
|
+
this.field.height = this.border.height - FC.config.fpsSettings.fieldToBorderPadding * 2;
|
|
35
|
+
}
|
|
36
|
+
onAddedToStage() {
|
|
37
|
+
super.onAddedToStage();
|
|
38
|
+
this.checkFps();
|
|
39
|
+
}
|
|
40
|
+
checkFps() {
|
|
41
|
+
if (!this.stage) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this.time = Date.now();
|
|
45
|
+
let delta = this.time - this.prevTime;
|
|
46
|
+
this.stepFps = NumberTools.roundTo(1000 / delta, 0.1);
|
|
47
|
+
if (this.fpsValues.length >= FC.config.fpsSettings.cumulativeFpsCount) {
|
|
48
|
+
let lastFps = this.fpsValues.shift();
|
|
49
|
+
this.cumulativeFpsValue -= lastFps;
|
|
50
|
+
}
|
|
51
|
+
this.fpsValues.push(this.stepFps);
|
|
52
|
+
this.cumulativeFpsValue += this.stepFps;
|
|
53
|
+
if (!this.cumulativeFpsValue || this.cumulativeFpsValue < 0) {
|
|
54
|
+
this.cumulativeFpsValue = 0;
|
|
55
|
+
}
|
|
56
|
+
if (this.visible) {
|
|
57
|
+
this.field.text = StringTools.substituteList(FC.config.localization.fpsText, Math.floor(this.cumulativeFpsValue / this.fpsValues.length));
|
|
58
|
+
}
|
|
59
|
+
this.prevTime = this.time;
|
|
60
|
+
requestAnimationFrame(() => {
|
|
61
|
+
this.checkFps();
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=FpsMeterView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FpsMeterView.js","sourceRoot":"","sources":["../../../../../src/console/view/fps/FpsMeterView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAO,YAAa,SAAQ,UAAU;IAA5C;;QAKc,aAAQ,GAAW,CAAC,CAAC;QACrB,SAAI,GAAW,CAAC,CAAC;QACjB,YAAO,GAAW,CAAC,CAAC;QAC9B,EAAE;QACQ,cAAS,GAAa,EAAE,CAAC;QACzB,uBAAkB,GAAW,CAAC,CAAC;IAyE7C,CAAC;IAvEa,YAAY,CAAC,GAAG,IAAI;QAC1B,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAEzB,IAAI,CAAC,MAAM,GA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SAAS,CAAC,MAAM,CAAC,CAC9D,CAAC;QACN,CAAC;QAED,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAE1B,qBAAqB,CACjB,GAAG,EAAE;YACD,IAAI,CAAC,QAAQ,EAAE,CAAA;QACnB,CAAC,CACJ,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BaseConsoleButton } from "../BaseConsoleButton";
|
|
2
|
+
import { InputManagerEventData } from "@flashist/flibs";
|
|
3
|
+
export declare class PauseKeyButton extends BaseConsoleButton {
|
|
4
|
+
private _pauseKeyCode;
|
|
5
|
+
pauseKey: string;
|
|
6
|
+
private _isClicked;
|
|
7
|
+
private _isActivated;
|
|
8
|
+
protected addListeners(): void;
|
|
9
|
+
protected onTick(): void;
|
|
10
|
+
protected onClick(): void;
|
|
11
|
+
protected onKeyUp(data: InputManagerEventData): void;
|
|
12
|
+
protected commitData(): void;
|
|
13
|
+
protected arrange(): void;
|
|
14
|
+
get isClicked(): boolean;
|
|
15
|
+
set isClicked(value: boolean);
|
|
16
|
+
get pauseKeyCode(): string;
|
|
17
|
+
set pauseKeyCode(value: string);
|
|
18
|
+
get isActivated(): boolean;
|
|
19
|
+
set isActivated(value: boolean);
|
|
20
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { BaseConsoleButton } from "../BaseConsoleButton";
|
|
2
|
+
import { InputManager, InputManagerEvent, FApp } from "@flashist/flibs";
|
|
3
|
+
import { StringTools } from "@flashist/fcore";
|
|
4
|
+
import { FC } from "../../FC";
|
|
5
|
+
export class PauseKeyButton extends BaseConsoleButton {
|
|
6
|
+
addListeners() {
|
|
7
|
+
super.addListeners();
|
|
8
|
+
this.eventListenerHelper.addEventListener(InputManager.instance, InputManagerEvent.KEY_UP, this.onKeyUp);
|
|
9
|
+
FApp.instance.ticker.add(this.onTick, this);
|
|
10
|
+
}
|
|
11
|
+
onTick() {
|
|
12
|
+
if (!this.isClicked) {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
onClick() {
|
|
16
|
+
super.onClick();
|
|
17
|
+
this.isClicked = !this.isClicked;
|
|
18
|
+
if (this.isClicked) {
|
|
19
|
+
this.pauseKeyCode = null;
|
|
20
|
+
this.isActivated = false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
onKeyUp(data) {
|
|
24
|
+
if (this.view.visible) {
|
|
25
|
+
if (this.isClicked) {
|
|
26
|
+
this.isClicked = false;
|
|
27
|
+
this.pauseKey = data.nativeKeyboardEvent.key;
|
|
28
|
+
this.pauseKeyCode = data.nativeKeyboardEvent.code;
|
|
29
|
+
this.commitData();
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
if (this.pauseKeyCode) {
|
|
33
|
+
if (this.pauseKeyCode === data.nativeKeyboardEvent.code) {
|
|
34
|
+
this.isActivated = !this.isActivated;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
commitData() {
|
|
41
|
+
super.commitData();
|
|
42
|
+
if (this.isClicked) {
|
|
43
|
+
this.text = FC.config.localization.pauseUpdateKeyBtnPressedLabel;
|
|
44
|
+
}
|
|
45
|
+
else if (this.pauseKeyCode) {
|
|
46
|
+
if (this.isActivated) {
|
|
47
|
+
this.text = StringTools.substitute(FC.config.localization.pauseUpdateKeyBtnNormalLabel, {
|
|
48
|
+
key: this.pauseKey,
|
|
49
|
+
status: FC.config.localization.onStatus
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
this.text = StringTools.substitute(FC.config.localization.pauseUpdateKeyBtnNormalLabel, {
|
|
54
|
+
key: this.pauseKey,
|
|
55
|
+
status: FC.config.localization.offStatus
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
this.text = StringTools.substitute(FC.config.localization.pauseUpdateKeyBtnNormalLabel, {
|
|
61
|
+
key: FC.config.localization.pauseUpdateKeyBtnNoKeyHelpText
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
arrange() {
|
|
66
|
+
super.arrange();
|
|
67
|
+
}
|
|
68
|
+
get isClicked() {
|
|
69
|
+
return this._isClicked;
|
|
70
|
+
}
|
|
71
|
+
set isClicked(value) {
|
|
72
|
+
if (value == this.isClicked) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this._isClicked = value;
|
|
76
|
+
this.commitData();
|
|
77
|
+
}
|
|
78
|
+
get pauseKeyCode() {
|
|
79
|
+
return this._pauseKeyCode;
|
|
80
|
+
}
|
|
81
|
+
set pauseKeyCode(value) {
|
|
82
|
+
if (value === this._pauseKeyCode) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
this._pauseKeyCode = value;
|
|
86
|
+
this.commitData();
|
|
87
|
+
}
|
|
88
|
+
get isActivated() {
|
|
89
|
+
return this._isActivated;
|
|
90
|
+
}
|
|
91
|
+
set isActivated(value) {
|
|
92
|
+
if (value === this.isActivated) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
this._isActivated = value;
|
|
96
|
+
this.commitData();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=PauseKeyButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PauseKeyButton.js","sourceRoot":"","sources":["../../../../../src/console/view/pause/PauseKeyButton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAyB,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAO,cAAe,SAAQ,iBAAiB;IAQvC,YAAY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AAC,UAAU,GAAG,KAAK,CAAC;QAExB,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAED,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IACD,IAAW,YAAY,CAAC,KAAa;QACjC,IAAI,KAAK,KAAK,IAAI,CAAC,aAAa,EAAE,CAAC;YAC/B,OAAO;QACX,CAAC;QAED,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAE3B,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAED,IAAI,WAAW;QACX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IACD,IAAI,WAAW,CAAC,KAAc;QAC1B,IAAI,KAAK,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC;YAC7B,OAAO;QACX,CAAC;QAED,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAE1B,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;CACJ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseTooltip } from "../../../tooltip/BaseTooltip";
|
|
2
|
+
export declare class ConsoleTooltip extends BaseTooltip {
|
|
3
|
+
private contentCont;
|
|
4
|
+
private titleLabel;
|
|
5
|
+
private textLabel;
|
|
6
|
+
private bg;
|
|
7
|
+
constructor();
|
|
8
|
+
protected construction(): void;
|
|
9
|
+
protected commitData(): void;
|
|
10
|
+
protected arrange(): void;
|
|
11
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Graphics, FLabel, Align, FContainer } from "@flashist/flibs";
|
|
2
|
+
import { BaseTooltip } from "../../../tooltip/BaseTooltip";
|
|
3
|
+
import { FC } from "../../FC";
|
|
4
|
+
export class ConsoleTooltip extends BaseTooltip {
|
|
5
|
+
constructor() {
|
|
6
|
+
super();
|
|
7
|
+
}
|
|
8
|
+
construction() {
|
|
9
|
+
super.construction();
|
|
10
|
+
this.bg = new Graphics();
|
|
11
|
+
this.view.addChild(this.bg);
|
|
12
|
+
this.contentCont = new FContainer();
|
|
13
|
+
this.view.addChild(this.contentCont);
|
|
14
|
+
this.titleLabel = new FLabel({
|
|
15
|
+
autosize: true,
|
|
16
|
+
nativeTextStyle: {
|
|
17
|
+
fill: FC.config.tooltipSettings.titleLabelColor,
|
|
18
|
+
fontSize: FC.config.tooltipSettings.titleLabelSize,
|
|
19
|
+
align: Align.CENTER
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
this.contentCont.addChild(this.titleLabel);
|
|
23
|
+
this.textLabel = new FLabel({
|
|
24
|
+
autosize: true,
|
|
25
|
+
nativeTextStyle: {
|
|
26
|
+
fill: FC.config.tooltipSettings.textLabelColor,
|
|
27
|
+
fontSize: FC.config.tooltipSettings.textLabelSize,
|
|
28
|
+
align: Align.CENTER
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
this.contentCont.addChild(this.textLabel);
|
|
32
|
+
}
|
|
33
|
+
commitData() {
|
|
34
|
+
super.commitData();
|
|
35
|
+
if (!this.tooltipData) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.titleLabel.text = this.tooltipData.title;
|
|
39
|
+
this.textLabel.text = this.tooltipData.text;
|
|
40
|
+
if (this.tooltipData.text) {
|
|
41
|
+
this.textLabel.visible = true;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
this.textLabel.visible = false;
|
|
45
|
+
}
|
|
46
|
+
this.arrange();
|
|
47
|
+
}
|
|
48
|
+
arrange() {
|
|
49
|
+
super.arrange();
|
|
50
|
+
if (this.textLabel.visible) {
|
|
51
|
+
let labelMaxWidth = Math.max(this.titleLabel.width, this.textLabel.width);
|
|
52
|
+
this.titleLabel.x = ((labelMaxWidth - this.titleLabel.width) >> 1);
|
|
53
|
+
this.textLabel.x = ((labelMaxWidth - this.textLabel.width) >> 1);
|
|
54
|
+
this.textLabel.y = this.titleLabel.y + this.titleLabel.height;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
this.titleLabel.x = 0;
|
|
58
|
+
}
|
|
59
|
+
this.bg.clear();
|
|
60
|
+
//
|
|
61
|
+
this.bg.rect(0, 0, this.contentCont.width + FC.config.tooltipSettings.bgToContentShift.x, this.contentCont.height + FC.config.tooltipSettings.bgToContentShift.y);
|
|
62
|
+
this.bg.setStrokeStyle({
|
|
63
|
+
width: FC.config.tooltipSettings.borderWidth,
|
|
64
|
+
color: FC.config.tooltipSettings.borderColor,
|
|
65
|
+
alpha: FC.config.tooltipSettings.borderAlpha
|
|
66
|
+
});
|
|
67
|
+
this.bg.fill({ color: FC.config.tooltipSettings.bgColor, alpha: FC.config.tooltipSettings.bgAlpha });
|
|
68
|
+
// this.bg.endFill();
|
|
69
|
+
this.contentCont.x = this.bg.x + ((this.bg.width - this.contentCont.width) >> 1);
|
|
70
|
+
this.contentCont.y = this.bg.y + ((this.bg.height - this.contentCont.height) >> 1);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=ConsoleTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsoleTooltip.js","sourceRoot":"","sources":["../../../../../src/console/view/tooltip/ConsoleTooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,QAAQ,EACR,MAAM,EACN,KAAK,EACL,UAAU,EACb,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAO,cAAe,SAAQ,WAAW;IAQ3C;QACI,KAAK,EAAE,CAAC;IACZ,CAAC;IAES,YAAY;QAClB,KAAK,CAAC,YAAY,EAAE,CAAC;QAErB,IAAI,CAAC,EAAE,GAAG,IAAI,QAAQ,EAAE,CAAC;QACzB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAE5B,IAAI,CAAC,WAAW,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E,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,WAAW;YAC5C,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,WAAW;SAC/C,CACJ,CAAC;QACF,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QACrG,qBAAqB;QAErB,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QACjF,IAAI,CAAC,WAAW,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvF,CAAC;CACJ"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DisplayObjectContainer } from "@flashist/flibs";
|
|
2
|
+
import { BaseObject } from "@flashist/fcore";
|
|
3
|
+
import { ITooltipData } from "./ITooltipData";
|
|
4
|
+
export declare abstract class BaseTooltip extends BaseObject {
|
|
5
|
+
view: DisplayObjectContainer;
|
|
6
|
+
protected tooltipData: ITooltipData;
|
|
7
|
+
protected construction(): void;
|
|
8
|
+
protected commitData(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FContainer } from "@flashist/flibs";
|
|
2
|
+
import { BaseObject } from "@flashist/fcore";
|
|
3
|
+
export class BaseTooltip extends BaseObject {
|
|
4
|
+
construction() {
|
|
5
|
+
super.construction();
|
|
6
|
+
this.view = new FContainer();
|
|
7
|
+
}
|
|
8
|
+
commitData() {
|
|
9
|
+
super.commitData();
|
|
10
|
+
this.tooltipData = this.data;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=BaseTooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseTooltip.js","sourceRoot":"","sources":["../../../src/tooltip/BaseTooltip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,UAAU,EAAC,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAC,UAAU,EAAC,MAAM,iBAAiB,CAAC;AAI3C,MAAM,OAAgB,WAAY,SAAQ,UAAU;IAOtC,YAAY;QAClB,KAAK,CAAC,YAAY,EAAE,CAAC;QAErB,IAAI,CAAC,IAAI,GAAG,IAAI,UAAU,EAAE,CAAC;IACjC,CAAC;IAGS,UAAU;QAChB,KAAK,CAAC,UAAU,EAAE,CAAC;QAEnB,IAAI,CAAC,WAAW,GAAI,IAAI,CAAC,IAAqB,CAAC;IACnD,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITooltipData.js","sourceRoot":"","sources":["../../../src/tooltip/ITooltipData.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { BaseObject } from "@flashist/fcore";
|
|
2
|
+
import { DisplayObjectContainer, Point } from "@flashist/flibs";
|
|
3
|
+
import { BaseTooltip } from "./BaseTooltip";
|
|
4
|
+
import { ITooltipData } from "./ITooltipData";
|
|
5
|
+
export declare class TooltipManager extends BaseObject {
|
|
6
|
+
private static SHOW_DELAY;
|
|
7
|
+
private _tooltipCont;
|
|
8
|
+
private tooltipInsideCont;
|
|
9
|
+
private tooltip;
|
|
10
|
+
private _mouseShift;
|
|
11
|
+
private _visible;
|
|
12
|
+
constructor(tooltip: BaseTooltip);
|
|
13
|
+
protected construction(tooltip: BaseTooltip): void;
|
|
14
|
+
protected addListeners(): void;
|
|
15
|
+
protected removeListeners(): void;
|
|
16
|
+
private onTick;
|
|
17
|
+
show(data: ITooltipData): void;
|
|
18
|
+
hide(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Обновление подсказки.
|
|
21
|
+
*/
|
|
22
|
+
update(): void;
|
|
23
|
+
/**
|
|
24
|
+
* Move a tooltip to a new position.
|
|
25
|
+
* Might be overridden in subclasses to implement different behavior (e.g. tween movement).
|
|
26
|
+
*
|
|
27
|
+
* @param x
|
|
28
|
+
* @param y
|
|
29
|
+
*/
|
|
30
|
+
protected moveTooltipTo(x: number, y: number): void;
|
|
31
|
+
get tooltipCont(): DisplayObjectContainer;
|
|
32
|
+
set tooltipCont(value: DisplayObjectContainer);
|
|
33
|
+
get mouseShift(): Point;
|
|
34
|
+
set mouseShift(value: Point);
|
|
35
|
+
private get visible();
|
|
36
|
+
private set visible(value);
|
|
37
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { BaseObject } from "@flashist/fcore";
|
|
2
|
+
import { Point, FApp, FContainer } from "@flashist/flibs";
|
|
3
|
+
export class TooltipManager extends BaseObject {
|
|
4
|
+
constructor(tooltip) {
|
|
5
|
+
super(tooltip);
|
|
6
|
+
}
|
|
7
|
+
construction(tooltip) {
|
|
8
|
+
super.construction();
|
|
9
|
+
this.tooltip = tooltip;
|
|
10
|
+
this.mouseShift = new Point();
|
|
11
|
+
this.tooltipInsideCont = new FContainer();
|
|
12
|
+
this.tooltipInsideCont.addChild(this.tooltip.view);
|
|
13
|
+
this.hide();
|
|
14
|
+
}
|
|
15
|
+
addListeners() {
|
|
16
|
+
super.addListeners();
|
|
17
|
+
FApp.instance.ticker.add(this.onTick, this);
|
|
18
|
+
}
|
|
19
|
+
removeListeners() {
|
|
20
|
+
super.removeListeners();
|
|
21
|
+
FApp.instance.ticker.remove(this.onTick, this);
|
|
22
|
+
}
|
|
23
|
+
onTick() {
|
|
24
|
+
this.update();
|
|
25
|
+
}
|
|
26
|
+
show(data) {
|
|
27
|
+
this.visible = true;
|
|
28
|
+
this.tooltip.data = data;
|
|
29
|
+
this.update();
|
|
30
|
+
}
|
|
31
|
+
hide() {
|
|
32
|
+
this.visible = false;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Обновление подсказки.
|
|
36
|
+
*/
|
|
37
|
+
update() {
|
|
38
|
+
if (!this.visible) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
if (!this.tooltipCont) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
if (!this.tooltip) {
|
|
45
|
+
}
|
|
46
|
+
const globalPos = FApp.instance.getGlobalInteractionPosition();
|
|
47
|
+
let tempPos = globalPos.clone();
|
|
48
|
+
tempPos.x += this.mouseShift.x;
|
|
49
|
+
tempPos.y += this.mouseShift.y;
|
|
50
|
+
if (tempPos.x < 0) {
|
|
51
|
+
tempPos.x = 0;
|
|
52
|
+
}
|
|
53
|
+
else if (tempPos.x + this.tooltip.view.width > FApp.instance.renderer.width) {
|
|
54
|
+
tempPos.x = FApp.instance.renderer.width - this.tooltip.view.width;
|
|
55
|
+
}
|
|
56
|
+
if (tempPos.y < 0) {
|
|
57
|
+
tempPos.y = 0;
|
|
58
|
+
}
|
|
59
|
+
else if (tempPos.y + this.tooltip.view.height > FApp.instance.renderer.height) {
|
|
60
|
+
tempPos.y = FApp.instance.renderer.height - this.tooltip.view.height;
|
|
61
|
+
}
|
|
62
|
+
tempPos = this.tooltip.view.parent.toLocal(tempPos);
|
|
63
|
+
this.moveTooltipTo(tempPos.x, tempPos.y);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Move a tooltip to a new position.
|
|
67
|
+
* Might be overridden in subclasses to implement different behavior (e.g. tween movement).
|
|
68
|
+
*
|
|
69
|
+
* @param x
|
|
70
|
+
* @param y
|
|
71
|
+
*/
|
|
72
|
+
moveTooltipTo(x, y) {
|
|
73
|
+
this.tooltip.view.x = x;
|
|
74
|
+
this.tooltip.view.y = y;
|
|
75
|
+
}
|
|
76
|
+
get tooltipCont() {
|
|
77
|
+
return this._tooltipCont;
|
|
78
|
+
}
|
|
79
|
+
set tooltipCont(value) {
|
|
80
|
+
if (this.tooltipCont == value) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this._tooltipCont = value;
|
|
84
|
+
if (this.tooltipCont) {
|
|
85
|
+
this.tooltipCont.addChild(this.tooltipInsideCont);
|
|
86
|
+
}
|
|
87
|
+
this.update();
|
|
88
|
+
}
|
|
89
|
+
get mouseShift() {
|
|
90
|
+
return this._mouseShift;
|
|
91
|
+
}
|
|
92
|
+
set mouseShift(value) {
|
|
93
|
+
this._mouseShift = value.clone();
|
|
94
|
+
this.update();
|
|
95
|
+
}
|
|
96
|
+
get visible() {
|
|
97
|
+
return this._visible;
|
|
98
|
+
}
|
|
99
|
+
set visible(value) {
|
|
100
|
+
this._visible = value;
|
|
101
|
+
this.tooltipInsideCont.visible = this.visible;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
TooltipManager.SHOW_DELAY = 0.5;
|
|
105
|
+
//# sourceMappingURL=TooltipManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TooltipManager.js","sourceRoot":"","sources":["../../../src/tooltip/TooltipManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAA0B,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAKlF,MAAM,OAAO,cAAe,SAAQ,UAAU;IAY1C,YAAY,OAAoB;QAC5B,KAAK,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;IAGS,YAAY,CAAC,OAAoB;QACvC,KAAK,CAAC,YAAY,EAAE,CAAC;QAErB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,UAAU,GAAG,IAAI,KAAK,EAAE,CAAC;QAE9B,IAAI,CAAC,iBAAiB,GAAG,IAAI,UAAU,EAAE,CAAC;QAC1C,IA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