@wcardinal/wcardinal-ui 0.398.0 → 0.399.0
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/dist/types/wcardinal/ui/d-base-state-set-impl.d.ts +5 -0
- package/dist/types/wcardinal/ui/d-base-state-set.d.ts +4 -0
- package/dist/types/wcardinal/ui/d-base-state.d.ts +1 -0
- package/dist/types/wcardinal/ui/d-base.d.ts +13 -1
- package/dist/types/wcardinal/ui/d-button-color.d.ts +0 -3
- package/dist/types/wcardinal/ui/d-image-base-theme-wrapper-other.d.ts +19 -0
- package/dist/types/wcardinal/ui/d-image-base-theme-wrapper-secondary.d.ts +3 -1
- package/dist/types/wcardinal/ui/d-image-base-theme-wrapper-tertiary.d.ts +3 -1
- package/dist/types/wcardinal/ui/d-image-base.d.ts +11 -26
- package/dist/types/wcardinal/ui/d-image-piece-align-impl.d.ts +23 -0
- package/dist/types/wcardinal/ui/d-image-piece-align.d.ts +14 -0
- package/dist/types/wcardinal/ui/d-image-piece-container-impl.d.ts +24 -0
- package/dist/types/wcardinal/ui/d-image-piece-container.d.ts +12 -0
- package/dist/types/wcardinal/ui/d-image-piece-impl.d.ts +60 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-bottom.d.ts +3 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-center.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-left.d.ts +3 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-middle.d.ts +2 -1
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-right.d.ts +3 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part-top.d.ts +3 -0
- package/dist/types/wcardinal/ui/d-image-piece-layouter-part.d.ts +4 -2
- package/dist/types/wcardinal/ui/d-image-piece-margin-impl.d.ts +17 -0
- package/dist/types/wcardinal/ui/d-image-piece-margin.d.ts +9 -0
- package/dist/types/wcardinal/ui/d-image-piece-tint-impl.d.ts +23 -0
- package/dist/types/wcardinal/ui/d-image-piece-tint.d.ts +13 -0
- package/dist/types/wcardinal/ui/d-image-piece.d.ts +14 -77
- package/dist/types/wcardinal/ui/d-indicator-processing.d.ts +69 -0
- package/dist/types/wcardinal/ui/index.d.ts +11 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-processing.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-en-us-indicator-processing.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-image-base.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-indicator-processing.d.ts +13 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-processing.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-indicator-processing.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/dark/index-en-us.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/index-ja-jp.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/index-zz-zz.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/load/index-en-us.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/load/index-ja-jp.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/load/load-theme-dark-en-us-indicator-processing.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/dark/load/load-theme-dark-ja-jp-indicator-processing.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-processing.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-en-us-indicator-processing.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-image-base.d.ts +3 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-indicator-processing.d.ts +13 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-processing.d.ts +2 -0
- package/dist/types/wcardinal/ui/theme/white/d-theme-white-ja-jp-indicator-processing.d.ts +5 -0
- package/dist/types/wcardinal/ui/theme/white/index-en-us.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/index-ja-jp.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/index-zz-zz.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/load/index-en-us.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/load/index-ja-jp.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/load/load-theme-white-en-us-indicator-processing.d.ts +1 -0
- package/dist/types/wcardinal/ui/theme/white/load/load-theme-white-ja-jp-indicator-processing.d.ts +1 -0
- package/dist/wcardinal/ui/d-base-state-set-impl.js +31 -0
- package/dist/wcardinal/ui/d-base-state-set-impl.js.map +1 -1
- package/dist/wcardinal/ui/d-base-state-set.js.map +1 -1
- package/dist/wcardinal/ui/d-base-state.js +1 -0
- package/dist/wcardinal/ui/d-base-state.js.map +1 -1
- package/dist/wcardinal/ui/d-base.js +63 -7
- package/dist/wcardinal/ui/d-base.js.map +1 -1
- package/dist/wcardinal/ui/d-button-color.js +6 -29
- package/dist/wcardinal/ui/d-button-color.js.map +1 -1
- package/dist/wcardinal/ui/d-dialog-processing.js +3 -2
- package/dist/wcardinal/ui/d-dialog-processing.js.map +1 -1
- package/dist/wcardinal/ui/d-image-base-theme-wrapper-other.js +35 -0
- package/dist/wcardinal/ui/d-image-base-theme-wrapper-other.js.map +1 -0
- package/dist/wcardinal/ui/d-image-base-theme-wrapper-secondary.js +5 -1
- package/dist/wcardinal/ui/d-image-base-theme-wrapper-secondary.js.map +1 -1
- package/dist/wcardinal/ui/d-image-base-theme-wrapper-tertiary.js +5 -1
- package/dist/wcardinal/ui/d-image-base-theme-wrapper-tertiary.js.map +1 -1
- package/dist/wcardinal/ui/d-image-base.js +22 -51
- package/dist/wcardinal/ui/d-image-base.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-align-impl.js +89 -0
- package/dist/wcardinal/ui/d-image-piece-align-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-align.js +2 -0
- package/dist/wcardinal/ui/d-image-piece-align.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-container-impl.js +108 -0
- package/dist/wcardinal/ui/d-image-piece-container-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-container.js +2 -0
- package/dist/wcardinal/ui/d-image-piece-container.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-impl.js +235 -0
- package/dist/wcardinal/ui/d-image-piece-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-layouter-part-bottom.js +15 -4
- package/dist/wcardinal/ui/d-image-piece-layouter-part-bottom.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-center.js +6 -3
- package/dist/wcardinal/ui/d-image-piece-layouter-part-center.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-container.js +13 -17
- package/dist/wcardinal/ui/d-image-piece-layouter-part-container.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-left.js +15 -4
- package/dist/wcardinal/ui/d-image-piece-layouter-part-left.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-middle.js +8 -5
- package/dist/wcardinal/ui/d-image-piece-layouter-part-middle.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-right.js +15 -4
- package/dist/wcardinal/ui/d-image-piece-layouter-part-right.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part-top.js +15 -4
- package/dist/wcardinal/ui/d-image-piece-layouter-part-top.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter-part.js +1 -6
- package/dist/wcardinal/ui/d-image-piece-layouter-part.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-layouter.js +2 -2
- package/dist/wcardinal/ui/d-image-piece-layouter.js.map +1 -1
- package/dist/wcardinal/ui/d-image-piece-margin-impl.js +55 -0
- package/dist/wcardinal/ui/d-image-piece-margin-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-margin.js +2 -0
- package/dist/wcardinal/ui/d-image-piece-margin.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-tint-impl.js +90 -0
- package/dist/wcardinal/ui/d-image-piece-tint-impl.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece-tint.js +2 -0
- package/dist/wcardinal/ui/d-image-piece-tint.js.map +1 -0
- package/dist/wcardinal/ui/d-image-piece.js +1 -287
- package/dist/wcardinal/ui/d-image-piece.js.map +1 -1
- package/dist/wcardinal/ui/d-indicator-processing.js +216 -0
- package/dist/wcardinal/ui/d-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/d-table-header-cell.js +10 -5
- package/dist/wcardinal/ui/d-table-header-cell.js.map +1 -1
- package/dist/wcardinal/ui/d-text-base.js +9 -1
- package/dist/wcardinal/ui/d-text-base.js.map +1 -1
- package/dist/wcardinal/ui/index.js +11 -0
- package/dist/wcardinal/ui/index.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-processing.js +2 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-en-us-dialog-processing.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-en-us-indicator-processing.js +19 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-en-us-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-image-base.js +9 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-image-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-indicator-processing.js +68 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-processing.js +2 -2
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-dialog-processing.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-indicator-processing.js +19 -0
- package/dist/wcardinal/ui/theme/dark/d-theme-dark-ja-jp-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/index-en-us.js +1 -0
- package/dist/wcardinal/ui/theme/dark/index-en-us.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/index-ja-jp.js +1 -0
- package/dist/wcardinal/ui/theme/dark/index-ja-jp.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/index-zz-zz.js +1 -0
- package/dist/wcardinal/ui/theme/dark/index-zz-zz.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/index-en-us.js +1 -0
- package/dist/wcardinal/ui/theme/dark/load/index-en-us.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/index-ja-jp.js +1 -0
- package/dist/wcardinal/ui/theme/dark/load/index-ja-jp.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-en-us-all.js +2 -0
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-en-us-all.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-en-us-indicator-processing.js +10 -0
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-en-us-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-ja-jp-all.js +2 -0
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-ja-jp-all.js.map +1 -1
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-ja-jp-indicator-processing.js +10 -0
- package/dist/wcardinal/ui/theme/dark/load/load-theme-dark-ja-jp-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-processing.js +2 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-en-us-dialog-processing.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-en-us-indicator-processing.js +19 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-en-us-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-image-base.js +9 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-image-base.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-indicator-processing.js +68 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-processing.js +2 -2
- package/dist/wcardinal/ui/theme/white/d-theme-white-ja-jp-dialog-processing.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/d-theme-white-ja-jp-indicator-processing.js +19 -0
- package/dist/wcardinal/ui/theme/white/d-theme-white-ja-jp-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/index-en-us.js +1 -0
- package/dist/wcardinal/ui/theme/white/index-en-us.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/index-ja-jp.js +1 -0
- package/dist/wcardinal/ui/theme/white/index-ja-jp.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/index-zz-zz.js +1 -0
- package/dist/wcardinal/ui/theme/white/index-zz-zz.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/index-en-us.js +1 -0
- package/dist/wcardinal/ui/theme/white/load/index-en-us.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/index-ja-jp.js +1 -0
- package/dist/wcardinal/ui/theme/white/load/index-ja-jp.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-en-us-all.js +2 -0
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-en-us-all.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-en-us-indicator-processing.js +10 -0
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-en-us-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-ja-jp-all.js +2 -0
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-ja-jp-all.js.map +1 -1
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-ja-jp-indicator-processing.js +10 -0
- package/dist/wcardinal/ui/theme/white/load/load-theme-white-ja-jp-indicator-processing.js.map +1 -0
- package/dist/wcardinal/ui/util/util-svg-atlas-builder.js +1 -1
- package/dist/wcardinal/ui/util/util-svg-atlas-builder.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-en-us.js +105 -3
- package/dist/wcardinal-ui-theme-dark-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark-ja-jp.js +105 -3
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-dark-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +105 -3
- package/dist/wcardinal-ui-theme-dark.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.js +105 -3
- package/dist/wcardinal-ui-theme-white-en-us.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-en-us.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white-ja-jp.js +105 -3
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js +2 -2
- package/dist/wcardinal-ui-theme-white-ja-jp.min.js.map +1 -1
- package/dist/wcardinal-ui-theme-white.js +105 -3
- package/dist/wcardinal-ui-theme-white.min.js +2 -2
- package/dist/wcardinal-ui.cjs.js +1391 -502
- package/dist/wcardinal-ui.js +1125 -494
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -134,6 +134,11 @@ export declare class DBaseStateSetImpl implements DBaseStateSet {
|
|
|
134
134
|
get inInvalid(): boolean;
|
|
135
135
|
get onInvalid(): boolean;
|
|
136
136
|
get underInvalid(): boolean;
|
|
137
|
+
get isProcessing(): boolean;
|
|
138
|
+
set isProcessing(processing: boolean);
|
|
139
|
+
get inProcessing(): boolean;
|
|
140
|
+
get onProcessing(): boolean;
|
|
141
|
+
get underProcessing(): boolean;
|
|
137
142
|
get isSucceeded(): boolean;
|
|
138
143
|
set isSucceeded(succeeded: boolean);
|
|
139
144
|
get inSucceeded(): boolean;
|
|
@@ -59,6 +59,10 @@ export interface DBaseStateSet {
|
|
|
59
59
|
readonly inInvalid: boolean;
|
|
60
60
|
readonly onInvalid: boolean;
|
|
61
61
|
readonly underInvalid: boolean;
|
|
62
|
+
isProcessing: boolean;
|
|
63
|
+
readonly inProcessing: boolean;
|
|
64
|
+
readonly onProcessing: boolean;
|
|
65
|
+
readonly underProcessing: boolean;
|
|
62
66
|
isSucceeded: boolean;
|
|
63
67
|
readonly inSucceeded: boolean;
|
|
64
68
|
readonly onSucceeded: boolean;
|
|
@@ -688,8 +688,20 @@ export declare class DBase<THEME extends DThemeBase = DThemeBase, OPTIONS extend
|
|
|
688
688
|
reflow(): void;
|
|
689
689
|
protected onRefit(): void;
|
|
690
690
|
protected isRefitable(target: any): target is DRefitable;
|
|
691
|
+
/**
|
|
692
|
+
* Returns true if the given target has a height that doesn't depend on its parent height.
|
|
693
|
+
*
|
|
694
|
+
* @param target a target
|
|
695
|
+
* @returns true if the given target has a height that doesn't depend on its parent height.
|
|
696
|
+
*/
|
|
691
697
|
protected hasRefitableHeight(target: any): target is DRefitable;
|
|
692
|
-
|
|
698
|
+
/**
|
|
699
|
+
* Returns true if the given target has a width that doesn't depend on its parent width.
|
|
700
|
+
*
|
|
701
|
+
* @param target a target
|
|
702
|
+
* @returns true if the given target has a width that doesn't depend on its parent width.
|
|
703
|
+
*/
|
|
704
|
+
protected hasRefitableWidth(target: any): target is DRefitable;
|
|
693
705
|
protected onReflow(): void;
|
|
694
706
|
get shadow(): DShadow | null;
|
|
695
707
|
set shadow(shadow: DShadow | null);
|
|
@@ -2,7 +2,6 @@ import { InteractionEvent } from "pixi.js";
|
|
|
2
2
|
import { DButton, DButtonEvents, DButtonOptions, DThemeButton } from "./d-button";
|
|
3
3
|
import { DColorAndAlpha } from "./d-color-and-alpha";
|
|
4
4
|
import { DDialogColor, DDialogColorOptions } from "./d-dialog-color";
|
|
5
|
-
import { DImagePieceOptions, DImagePieceTintOptions } from "./d-image-piece";
|
|
6
5
|
import { DOnOptions } from "./d-on-options";
|
|
7
6
|
import { DPickerColorAndAlpha } from "./d-picker-color-and-alpha";
|
|
8
7
|
/**
|
|
@@ -45,8 +44,6 @@ export declare class DButtonColor<THEME extends DThemeButtonColor = DThemeButton
|
|
|
45
44
|
protected onActivate(e?: InteractionEvent | KeyboardEvent | MouseEvent | TouchEvent): void;
|
|
46
45
|
protected toClone(value: DColorAndAlpha): DColorAndAlpha;
|
|
47
46
|
protected onValueChange(newValue: DColorAndAlpha, oldValue: DColorAndAlpha): void;
|
|
48
|
-
protected toImageTintOptions(tint?: DImagePieceTintOptions): DImagePieceTintOptions;
|
|
49
|
-
protected toImageOptions(theme: THEME, options?: DImagePieceOptions): DImagePieceOptions | undefined;
|
|
50
47
|
protected onColorChange(): void;
|
|
51
48
|
protected updateTextForcibly(): void;
|
|
52
49
|
get dialog(): DDialogColor;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DisplayObject, Texture } from "pixi.js";
|
|
2
|
+
import { DAlignHorizontal } from "./d-align-horizontal";
|
|
3
|
+
import { DAlignVertical } from "./d-align-vertical";
|
|
4
|
+
import { DAlignWith } from "./d-align-with";
|
|
5
|
+
import { DBaseStateSet } from "./d-base-state-set";
|
|
6
|
+
import { DThemeImagePiece } from "./d-image-piece";
|
|
7
|
+
export declare class DImageBaseThemeWrapperOther implements DThemeImagePiece {
|
|
8
|
+
protected _theme: DThemeImagePiece;
|
|
9
|
+
constructor(theme: DThemeImagePiece);
|
|
10
|
+
getImageAlignHorizontal(): DAlignHorizontal;
|
|
11
|
+
getImageAlignVertical(): DAlignVertical;
|
|
12
|
+
getImageAlignWith(): DAlignWith;
|
|
13
|
+
getImageMarginHorizontal(): number;
|
|
14
|
+
getImageMarginVertial(): number;
|
|
15
|
+
getImageTintColor(state: DBaseStateSet): number | null;
|
|
16
|
+
getImageTintAlpha(state: DBaseStateSet): number;
|
|
17
|
+
getImageRotation(state: DBaseStateSet): number;
|
|
18
|
+
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
19
|
+
}
|
|
@@ -12,7 +12,8 @@ export interface DThemeImageBaseSecondary {
|
|
|
12
12
|
getSecondaryImageMarginVertial(): number;
|
|
13
13
|
getSecondaryImageTintColor(state: DBaseStateSet): number | null;
|
|
14
14
|
getSecondaryImageTintAlpha(state: DBaseStateSet): number;
|
|
15
|
-
|
|
15
|
+
getSecondaryImageRotation(state: DBaseStateSet): number;
|
|
16
|
+
getSecondaryImageSource?(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
16
17
|
}
|
|
17
18
|
export declare class DImageBaseThemeWrapperSecondary implements DThemeImagePiece {
|
|
18
19
|
protected _theme: DThemeImageBaseSecondary;
|
|
@@ -24,5 +25,6 @@ export declare class DImageBaseThemeWrapperSecondary implements DThemeImagePiece
|
|
|
24
25
|
getImageMarginVertial(): number;
|
|
25
26
|
getImageTintColor(state: DBaseStateSet): number | null;
|
|
26
27
|
getImageTintAlpha(state: DBaseStateSet): number;
|
|
28
|
+
getImageRotation(state: DBaseStateSet): number;
|
|
27
29
|
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
28
30
|
}
|
|
@@ -12,7 +12,8 @@ export interface DThemeImageBaseTertiary {
|
|
|
12
12
|
getTertiaryImageMarginVertial(): number;
|
|
13
13
|
getTertiaryImageTintColor(state: DBaseStateSet): number | null;
|
|
14
14
|
getTertiaryImageTintAlpha(state: DBaseStateSet): number;
|
|
15
|
-
|
|
15
|
+
getTertiaryImageRotation(state: DBaseStateSet): number;
|
|
16
|
+
getTertiaryImageSource?(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
16
17
|
}
|
|
17
18
|
export declare class DImageBaseThemeWrapperTertiary implements DThemeImagePiece {
|
|
18
19
|
protected _theme: DThemeImageBaseTertiary;
|
|
@@ -24,5 +25,6 @@ export declare class DImageBaseThemeWrapperTertiary implements DThemeImagePiece
|
|
|
24
25
|
getImageMarginVertial(): number;
|
|
25
26
|
getImageTintColor(state: DBaseStateSet): number | null;
|
|
26
27
|
getImageTintAlpha(state: DBaseStateSet): number;
|
|
28
|
+
getImageRotation(state: DBaseStateSet): number;
|
|
27
29
|
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
28
30
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { DisplayObject, Texture } from "pixi.js";
|
|
2
|
-
import { DAlignHorizontal } from "./d-align-horizontal";
|
|
3
|
-
import { DAlignVertical } from "./d-align-vertical";
|
|
4
|
-
import { DAlignWith } from "./d-align-with";
|
|
5
2
|
import { DRefitable } from "./d-base";
|
|
6
3
|
import { DBaseStateSet } from "./d-base-state-set";
|
|
7
|
-
import {
|
|
4
|
+
import { DThemeImageBaseSecondary } from "./d-image-base-theme-wrapper-secondary";
|
|
5
|
+
import { DThemeImageBaseTertiary } from "./d-image-base-theme-wrapper-tertiary";
|
|
6
|
+
import { DImagePieceOptions, DThemeImagePiece } from "./d-image-piece";
|
|
8
7
|
import { DImagePieceLayouter } from "./d-image-piece-layouter";
|
|
9
8
|
import { DOnOptions } from "./d-on-options";
|
|
10
9
|
import { DStateAwareOrValueMightBe } from "./d-state-aware";
|
|
11
10
|
import { DTextBase, DTextBaseEvents, DTextBaseOptions, DThemeTextBase } from "./d-text-base";
|
|
11
|
+
import { DImagePieceContainer } from "./d-image-piece-container";
|
|
12
|
+
import { DImagePieceContainerImpl } from "./d-image-piece-container-impl";
|
|
12
13
|
/**
|
|
13
14
|
* {@link DImageBase} events.
|
|
14
15
|
*/
|
|
@@ -24,28 +25,13 @@ export interface DImageBaseOnOptions<VALUE, EMITTER> extends Partial<DImageBaseE
|
|
|
24
25
|
*/
|
|
25
26
|
export interface DImageBaseOptions<VALUE = unknown, THEME extends DThemeImageBase<VALUE> = DThemeImageBase<VALUE>, EMITTER = any> extends DTextBaseOptions<VALUE, THEME, EMITTER> {
|
|
26
27
|
image?: DImagePieceOptions;
|
|
28
|
+
images?: DImagePieceOptions[];
|
|
27
29
|
on?: DImageBaseOnOptions<VALUE, EMITTER>;
|
|
28
30
|
}
|
|
29
31
|
/**
|
|
30
32
|
* {@link DImageBase} theme.
|
|
31
33
|
*/
|
|
32
|
-
export interface DThemeImageBase<VALUE = unknown> extends DThemeTextBase<VALUE>, DThemeImagePiece {
|
|
33
|
-
getSecondaryImageAlignHorizontal(): DAlignHorizontal;
|
|
34
|
-
getSecondaryImageAlignVertical(): DAlignVertical;
|
|
35
|
-
getSecondaryImageAlignWith(): DAlignWith;
|
|
36
|
-
getSecondaryImageMarginHorizontal(): number;
|
|
37
|
-
getSecondaryImageMarginVertial(): number;
|
|
38
|
-
getSecondaryImageTintColor(state: DBaseStateSet): number | null;
|
|
39
|
-
getSecondaryImageTintAlpha(state: DBaseStateSet): number;
|
|
40
|
-
getSecondaryImageSource?(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
41
|
-
getTertiaryImageAlignHorizontal(): DAlignHorizontal;
|
|
42
|
-
getTertiaryImageAlignVertical(): DAlignVertical;
|
|
43
|
-
getTertiaryImageAlignWith(): DAlignWith;
|
|
44
|
-
getTertiaryImageMarginHorizontal(): number;
|
|
45
|
-
getTertiaryImageMarginVertial(): number;
|
|
46
|
-
getTertiaryImageTintColor(state: DBaseStateSet): number | null;
|
|
47
|
-
getTertiaryImageTintAlpha(state: DBaseStateSet): number;
|
|
48
|
-
getTertiaryImageSource?(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
34
|
+
export interface DThemeImageBase<VALUE = unknown> extends DThemeTextBase<VALUE>, DThemeImagePiece, DThemeImageBaseSecondary, DThemeImageBaseTertiary {
|
|
49
35
|
}
|
|
50
36
|
/**
|
|
51
37
|
* A base class for UI classes with an image support.
|
|
@@ -53,12 +39,11 @@ export interface DThemeImageBase<VALUE = unknown> extends DThemeTextBase<VALUE>,
|
|
|
53
39
|
*/
|
|
54
40
|
export declare class DImageBase<VALUE = unknown, THEME extends DThemeImageBase<VALUE> = DThemeImageBase<VALUE>, OPTIONS extends DImageBaseOptions<VALUE, THEME> = DImageBaseOptions<VALUE, THEME>> extends DTextBase<VALUE, THEME, OPTIONS> {
|
|
55
41
|
protected static LAYOUTER?: DImagePieceLayouter;
|
|
56
|
-
protected
|
|
42
|
+
protected _image?: DImagePieceContainerImpl;
|
|
57
43
|
protected init(options?: OPTIONS): void;
|
|
58
|
-
|
|
59
|
-
protected
|
|
60
|
-
protected newImage(
|
|
61
|
-
get image(): DStateAwareOrValueMightBe<Texture | DisplayObject | null>;
|
|
44
|
+
get image(): DImagePieceContainer;
|
|
45
|
+
protected getImage(): DImagePieceContainerImpl;
|
|
46
|
+
protected newImage(): DImagePieceContainerImpl;
|
|
62
47
|
set image(imageSource: DStateAwareOrValueMightBe<Texture | DisplayObject | null>);
|
|
63
48
|
protected onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void;
|
|
64
49
|
protected updateText(): void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DAlignHorizontal } from "./d-align-horizontal";
|
|
2
|
+
import { DAlignVertical } from "./d-align-vertical";
|
|
3
|
+
import { DAlignWith } from "./d-align-with";
|
|
4
|
+
import { DThemeImagePiece } from "./d-image-piece";
|
|
5
|
+
import { DImagePieceAlign, DImagePieceAlignOptions } from "./d-image-piece-align";
|
|
6
|
+
export interface DImagePieceAlignImplParent {
|
|
7
|
+
onUpdate(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class DImagePieceAlignImpl implements DImagePieceAlign {
|
|
10
|
+
protected _parent: DImagePieceAlignImplParent;
|
|
11
|
+
protected _with: DAlignWith;
|
|
12
|
+
protected _vertical: DAlignVertical;
|
|
13
|
+
protected _horizontal: DAlignHorizontal;
|
|
14
|
+
constructor(parent: DImagePieceAlignImplParent, theme: DThemeImagePiece, options?: DImagePieceAlignOptions);
|
|
15
|
+
get with(): DAlignWith;
|
|
16
|
+
set with(w: keyof typeof DAlignWith | DAlignWith);
|
|
17
|
+
get vertical(): DAlignVertical;
|
|
18
|
+
set vertical(vertical: keyof typeof DAlignVertical | DAlignVertical);
|
|
19
|
+
get horizontal(): DAlignHorizontal;
|
|
20
|
+
set horizontal(horizontal: keyof typeof DAlignHorizontal | DAlignHorizontal);
|
|
21
|
+
set(w?: keyof typeof DAlignWith | DAlignWith, vertical?: keyof typeof DAlignVertical | DAlignVertical, horizontal?: keyof typeof DAlignHorizontal | DAlignHorizontal): this;
|
|
22
|
+
protected onChange(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DAlignHorizontal } from "./d-align-horizontal";
|
|
2
|
+
import { DAlignVertical } from "./d-align-vertical";
|
|
3
|
+
import { DAlignWith } from "./d-align-with";
|
|
4
|
+
export interface DImagePieceAlignOptions {
|
|
5
|
+
with?: keyof typeof DAlignWith | DAlignWith;
|
|
6
|
+
vertical?: keyof typeof DAlignVertical | DAlignVertical;
|
|
7
|
+
horizontal?: keyof typeof DAlignHorizontal | DAlignHorizontal;
|
|
8
|
+
}
|
|
9
|
+
export interface DImagePieceAlign {
|
|
10
|
+
with: DAlignWith;
|
|
11
|
+
vertical: DAlignVertical;
|
|
12
|
+
horizontal: DAlignHorizontal;
|
|
13
|
+
set(w?: DAlignWith, vertical?: DAlignVertical, horizontal?: DAlignHorizontal): this;
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DBaseStateSet } from "./d-base-state-set";
|
|
2
|
+
import { DImagePiece, DImagePieceOptions, DThemeImagePiece } from "./d-image-piece";
|
|
3
|
+
import { DImagePieceContainer, DThemeImagePieceContainer } from "./d-image-piece-container";
|
|
4
|
+
import { DImagePieceImpl, DImagePieceImplParent } from "./d-image-piece-impl";
|
|
5
|
+
import { DImagePieceLayouter } from "./d-image-piece-layouter";
|
|
6
|
+
export interface DImagePieceContainerImplOptions {
|
|
7
|
+
image?: DImagePieceOptions;
|
|
8
|
+
images?: DImagePieceOptions[];
|
|
9
|
+
}
|
|
10
|
+
export declare class DImagePieceContainerImpl implements DImagePieceContainer {
|
|
11
|
+
protected _parent: DImagePieceImplParent;
|
|
12
|
+
protected _theme: DThemeImagePieceContainer;
|
|
13
|
+
protected _pieces: DImagePieceImpl[];
|
|
14
|
+
constructor(parent: DImagePieceImplParent, theme: DThemeImagePieceContainer, options?: DImagePieceContainerImplOptions);
|
|
15
|
+
protected newImage(theme: DThemeImagePiece, options?: DImagePieceOptions): DImagePieceImpl;
|
|
16
|
+
onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void;
|
|
17
|
+
isRefitable(target: any): boolean;
|
|
18
|
+
updateTextAndImage(layouter: DImagePieceLayouter): void;
|
|
19
|
+
add(options?: DImagePieceOptions): DImagePiece;
|
|
20
|
+
get(index: number): DImagePiece | null;
|
|
21
|
+
remove(index: number): boolean;
|
|
22
|
+
size(): number;
|
|
23
|
+
destroy(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DThemeImageBaseSecondary } from "./d-image-base-theme-wrapper-secondary";
|
|
2
|
+
import { DThemeImageBaseTertiary } from "./d-image-base-theme-wrapper-tertiary";
|
|
3
|
+
import { DImagePiece, DImagePieceOptions, DThemeImagePiece } from "./d-image-piece";
|
|
4
|
+
export interface DThemeImagePieceContainer extends DThemeImagePiece, DThemeImageBaseSecondary, DThemeImageBaseTertiary {
|
|
5
|
+
}
|
|
6
|
+
export interface DImagePieceContainer {
|
|
7
|
+
add(options?: DImagePieceOptions): DImagePiece;
|
|
8
|
+
get(index: number): DImagePiece | null;
|
|
9
|
+
remove(index: number): boolean;
|
|
10
|
+
size(): number;
|
|
11
|
+
destroy(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DisplayObject, Graphics, Texture } from "pixi.js";
|
|
2
|
+
import { DApplicationTarget } from "./d-application-like";
|
|
3
|
+
import { DBaseStateSet } from "./d-base-state-set";
|
|
4
|
+
import { DStateAwareOrValueMightBe } from "./d-state-aware";
|
|
5
|
+
import { DImagePieceTint } from "./d-image-piece-tint";
|
|
6
|
+
import { DImagePieceMarginImpl } from "./d-image-piece-margin-impl";
|
|
7
|
+
import { DImagePieceMargin } from "./d-image-piece-margin";
|
|
8
|
+
import { DImagePieceAlign } from "./d-image-piece-align";
|
|
9
|
+
import { DImagePieceAlignImpl } from "./d-image-piece-align-impl";
|
|
10
|
+
import { DImagePiece, DImagePieceOptions, DThemeImagePiece } from "./d-image-piece";
|
|
11
|
+
export interface DImagePieceImplParent extends DApplicationTarget {
|
|
12
|
+
readonly state: DBaseStateSet;
|
|
13
|
+
addChild(displayObject: DisplayObject): void;
|
|
14
|
+
removeChild(displayObject: DisplayObject): void;
|
|
15
|
+
toDirty(): void;
|
|
16
|
+
getOverflowMask(): Graphics | null;
|
|
17
|
+
}
|
|
18
|
+
export declare class DImagePieceImpl implements DImagePiece {
|
|
19
|
+
protected _parent: DImagePieceImplParent;
|
|
20
|
+
protected _theme: DThemeImagePiece;
|
|
21
|
+
protected _object: DisplayObject | null;
|
|
22
|
+
protected _computed: Texture | DisplayObject | null;
|
|
23
|
+
protected _source: DStateAwareOrValueMightBe<Texture | DisplayObject | null>;
|
|
24
|
+
protected _align: DImagePieceAlignImpl;
|
|
25
|
+
protected _margin: DImagePieceMarginImpl;
|
|
26
|
+
protected _tint: DImagePieceTint;
|
|
27
|
+
protected _rotation: DStateAwareOrValueMightBe<number> | undefined;
|
|
28
|
+
protected _onUpdateBound: () => void;
|
|
29
|
+
constructor(parent: DImagePieceImplParent, theme: DThemeImagePiece, options?: DImagePieceOptions);
|
|
30
|
+
get object(): DisplayObject | null;
|
|
31
|
+
get align(): DImagePieceAlign;
|
|
32
|
+
get margin(): DImagePieceMargin;
|
|
33
|
+
get tint(): DImagePieceTint;
|
|
34
|
+
get source(): DStateAwareOrValueMightBe<Texture | DisplayObject | null>;
|
|
35
|
+
set source(source: DStateAwareOrValueMightBe<Texture | DisplayObject | null>);
|
|
36
|
+
get rotation(): DStateAwareOrValueMightBe<number>;
|
|
37
|
+
set rotation(rotation: DStateAwareOrValueMightBe<number>);
|
|
38
|
+
protected computeSource(): Texture | DisplayObject | null;
|
|
39
|
+
onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void;
|
|
40
|
+
protected isTintAware(target: DisplayObject | null): target is DisplayObject & {
|
|
41
|
+
tint: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Updates the tint.
|
|
45
|
+
*
|
|
46
|
+
* @returns True if the tint is changed.
|
|
47
|
+
*/
|
|
48
|
+
updateTint(): boolean;
|
|
49
|
+
protected toRotation(theme: DThemeImagePiece, state: DBaseStateSet): number | null;
|
|
50
|
+
updateRotation(): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Updates the computed source.
|
|
53
|
+
*
|
|
54
|
+
* @returns True if the computed source is changed
|
|
55
|
+
*/
|
|
56
|
+
updateSource(): boolean;
|
|
57
|
+
isRefitable(target: any): boolean;
|
|
58
|
+
destroy(): void;
|
|
59
|
+
onUpdate(): void;
|
|
60
|
+
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Rectangle } from "pixi.js";
|
|
1
2
|
import { DImagePieceLayouterPart } from "./d-image-piece-layouter-part";
|
|
3
|
+
import { DImagePiece } from "./d-image-piece";
|
|
2
4
|
export declare class DImagePieceLayouterPartBottom extends DImagePieceLayouterPart {
|
|
5
|
+
add(image: DImagePiece, bound: Rectangle, margin: number): void;
|
|
3
6
|
execute(pbottom: number, height: number): void;
|
|
4
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Rectangle } from "pixi.js";
|
|
1
2
|
import { DImagePiece } from "./d-image-piece";
|
|
2
3
|
import { DImagePieceLayouterPart } from "./d-image-piece-layouter-part";
|
|
3
4
|
export declare class DImagePieceLayouterPartCenter extends DImagePieceLayouterPart {
|
|
4
|
-
add(image: DImagePiece,
|
|
5
|
+
add(image: DImagePiece, bound: Rectangle, margin: number): void;
|
|
5
6
|
execute(pleft: number, pright: number, width: number): void;
|
|
6
7
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Rectangle } from "pixi.js";
|
|
2
|
+
import { DImagePiece } from "./d-image-piece";
|
|
1
3
|
import { DImagePieceLayouterPart } from "./d-image-piece-layouter-part";
|
|
2
4
|
export declare class DImagePieceLayouterPartLeft extends DImagePieceLayouterPart {
|
|
5
|
+
add(image: DImagePiece, bound: Rectangle, margin: number): void;
|
|
3
6
|
execute(pleft: number): void;
|
|
4
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Rectangle } from "pixi.js";
|
|
1
2
|
import { DImagePiece } from "./d-image-piece";
|
|
2
3
|
import { DImagePieceLayouterPart } from "./d-image-piece-layouter-part";
|
|
3
4
|
export declare class DImagePieceLayouterPartMiddle extends DImagePieceLayouterPart {
|
|
4
|
-
add(image: DImagePiece,
|
|
5
|
+
add(image: DImagePiece, bound: Rectangle, margin: number): void;
|
|
5
6
|
execute(ptop: number, pbottom: number, height: number): void;
|
|
6
7
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Rectangle } from "pixi.js";
|
|
2
|
+
import { DImagePiece } from "./d-image-piece";
|
|
1
3
|
import { DImagePieceLayouterPart } from "./d-image-piece-layouter-part";
|
|
2
4
|
export declare class DImagePieceLayouterPartRight extends DImagePieceLayouterPart {
|
|
5
|
+
add(image: DImagePiece, bound: Rectangle, margin: number): void;
|
|
3
6
|
execute(pright: number, width: number): void;
|
|
4
7
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { Rectangle } from "pixi.js";
|
|
2
|
+
import { DImagePiece } from "./d-image-piece";
|
|
1
3
|
import { DImagePieceLayouterPart } from "./d-image-piece-layouter-part";
|
|
2
4
|
export declare class DImagePieceLayouterPartTop extends DImagePieceLayouterPart {
|
|
5
|
+
add(image: DImagePiece, bound: Rectangle, margin: number): void;
|
|
3
6
|
execute(ptop: number): void;
|
|
4
7
|
}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { Rectangle } from "pixi.js";
|
|
1
2
|
import { DDynamicText } from "./d-dynamic-text";
|
|
2
3
|
import { DImagePiece } from "./d-image-piece";
|
|
3
|
-
export declare class DImagePieceLayouterPart {
|
|
4
|
+
export declare abstract class DImagePieceLayouterPart {
|
|
4
5
|
protected _pieces: DImagePiece[];
|
|
6
|
+
protected _bounds: Rectangle[];
|
|
5
7
|
protected _size: number;
|
|
6
8
|
protected _margin: number;
|
|
7
9
|
protected _text?: DDynamicText | null;
|
|
8
10
|
constructor();
|
|
9
11
|
clear(): void;
|
|
10
|
-
add(image: DImagePiece,
|
|
12
|
+
abstract add(image: DImagePiece, bound: Rectangle, margin: number): void;
|
|
11
13
|
set(text: DDynamicText | null): void;
|
|
12
14
|
get size(): number;
|
|
13
15
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DThemeImagePiece } from "./d-image-piece";
|
|
2
|
+
import { DImagePieceMargin, DImagePieceMarginOptions } from "./d-image-piece-margin";
|
|
3
|
+
export interface DImagePieceMarginImplParent {
|
|
4
|
+
onUpdate(): void;
|
|
5
|
+
}
|
|
6
|
+
export declare class DImagePieceMarginImpl implements DImagePieceMargin {
|
|
7
|
+
protected _parent: DImagePieceMarginImplParent;
|
|
8
|
+
protected _vertical: number;
|
|
9
|
+
protected _horizontal: number;
|
|
10
|
+
constructor(parent: DImagePieceMarginImplParent, theme: DThemeImagePiece, options?: DImagePieceMarginOptions);
|
|
11
|
+
get vertical(): number;
|
|
12
|
+
set vertical(vertical: number);
|
|
13
|
+
get horizontal(): number;
|
|
14
|
+
set horizontal(horizontal: number);
|
|
15
|
+
set(vertical?: number, horizontal?: number): this;
|
|
16
|
+
protected onChange(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DApplicationTarget } from "./d-application-like";
|
|
2
|
+
import { DBaseStateSet } from "./d-base-state-set";
|
|
3
|
+
import { DThemeImagePiece } from "./d-image-piece";
|
|
4
|
+
import { DImagePieceTint, DImagePieceTintOptions } from "./d-image-piece-tint";
|
|
5
|
+
import { DStateAwareOrValueMightBe } from "./d-state-aware";
|
|
6
|
+
export interface DImagePieceTintParent extends DApplicationTarget {
|
|
7
|
+
updateTint(): void;
|
|
8
|
+
}
|
|
9
|
+
export declare class DImagePieceTintImpl implements DImagePieceTint {
|
|
10
|
+
protected _parent: DImagePieceTintParent;
|
|
11
|
+
protected _color?: DStateAwareOrValueMightBe<number | null>;
|
|
12
|
+
protected _alpha?: DStateAwareOrValueMightBe<number>;
|
|
13
|
+
protected _theme: DThemeImagePiece;
|
|
14
|
+
constructor(parent: DImagePieceTintParent, theme: DThemeImagePiece, options?: DImagePieceTintOptions);
|
|
15
|
+
get color(): DStateAwareOrValueMightBe<number | null>;
|
|
16
|
+
set color(color: DStateAwareOrValueMightBe<number | null>);
|
|
17
|
+
getColor(state: DBaseStateSet): number | null;
|
|
18
|
+
get alpha(): DStateAwareOrValueMightBe<number>;
|
|
19
|
+
set alpha(alpha: DStateAwareOrValueMightBe<number>);
|
|
20
|
+
getAlpha(state: DBaseStateSet): number;
|
|
21
|
+
set(color?: DStateAwareOrValueMightBe<number | null>, alpha?: DStateAwareOrValueMightBe<number>): this;
|
|
22
|
+
protected onChange(): void;
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DBaseStateSet } from "./d-base-state-set";
|
|
2
|
+
import { DStateAwareOrValueMightBe } from "./d-state-aware";
|
|
3
|
+
export interface DImagePieceTintOptions {
|
|
4
|
+
color?: DStateAwareOrValueMightBe<number | null>;
|
|
5
|
+
alpha?: DStateAwareOrValueMightBe<number>;
|
|
6
|
+
}
|
|
7
|
+
export interface DImagePieceTint {
|
|
8
|
+
color: DStateAwareOrValueMightBe<number | null>;
|
|
9
|
+
alpha: DStateAwareOrValueMightBe<number>;
|
|
10
|
+
set(color?: DStateAwareOrValueMightBe<number | null>, alpha?: DStateAwareOrValueMightBe<number>): this;
|
|
11
|
+
getColor(state: DBaseStateSet): number | null;
|
|
12
|
+
getAlpha(state: DBaseStateSet): number;
|
|
13
|
+
}
|
|
@@ -1,48 +1,18 @@
|
|
|
1
|
-
import { DisplayObject,
|
|
1
|
+
import { DisplayObject, Texture } from "pixi.js";
|
|
2
2
|
import { DAlignHorizontal } from "./d-align-horizontal";
|
|
3
3
|
import { DAlignVertical } from "./d-align-vertical";
|
|
4
4
|
import { DAlignWith } from "./d-align-with";
|
|
5
|
-
import { DApplicationTarget } from "./d-application-like";
|
|
6
5
|
import { DBaseStateSet } from "./d-base-state-set";
|
|
7
6
|
import { DStateAwareOrValueMightBe } from "./d-state-aware";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
export interface DImagePieceAlignOptions {
|
|
13
|
-
with?: keyof typeof DAlignWith | DAlignWith;
|
|
14
|
-
vertical?: keyof typeof DAlignVertical | DAlignVertical;
|
|
15
|
-
horizontal?: keyof typeof DAlignHorizontal | DAlignHorizontal;
|
|
16
|
-
}
|
|
17
|
-
export interface DImagePieceMarginOptions {
|
|
18
|
-
vertical?: number;
|
|
19
|
-
horizontal?: number;
|
|
20
|
-
}
|
|
7
|
+
import { DImagePieceTint, DImagePieceTintOptions } from "./d-image-piece-tint";
|
|
8
|
+
import { DImagePieceMargin, DImagePieceMarginOptions } from "./d-image-piece-margin";
|
|
9
|
+
import { DImagePieceAlign, DImagePieceAlignOptions } from "./d-image-piece-align";
|
|
21
10
|
export interface DImagePieceOptions {
|
|
22
11
|
source?: DStateAwareOrValueMightBe<Texture | DisplayObject | null>;
|
|
23
12
|
tint?: DImagePieceTintOptions;
|
|
24
13
|
align?: DImagePieceAlignOptions;
|
|
25
14
|
margin?: DImagePieceMarginOptions;
|
|
26
|
-
|
|
27
|
-
export interface DImagePieceAlign {
|
|
28
|
-
with: DAlignWith;
|
|
29
|
-
vertical: DAlignVertical;
|
|
30
|
-
horizontal: DAlignHorizontal;
|
|
31
|
-
}
|
|
32
|
-
export interface DImagePieceMargin {
|
|
33
|
-
vertical: number;
|
|
34
|
-
horizontal: number;
|
|
35
|
-
}
|
|
36
|
-
export interface DImagePieceTextAlign {
|
|
37
|
-
vertical: DAlignVertical;
|
|
38
|
-
horizontal: DAlignHorizontal;
|
|
39
|
-
}
|
|
40
|
-
export interface DImagePieceParent extends DApplicationTarget {
|
|
41
|
-
readonly state: DBaseStateSet;
|
|
42
|
-
addChild(displayObject: DisplayObject): void;
|
|
43
|
-
removeChild(displayObject: DisplayObject): void;
|
|
44
|
-
toDirty(): void;
|
|
45
|
-
getOverflowMask(): Graphics | null;
|
|
15
|
+
rotation?: DStateAwareOrValueMightBe<number>;
|
|
46
16
|
}
|
|
47
17
|
export interface DThemeImagePiece {
|
|
48
18
|
getImageAlignHorizontal(): DAlignHorizontal;
|
|
@@ -53,47 +23,14 @@ export interface DThemeImagePiece {
|
|
|
53
23
|
getImageTintColor(state: DBaseStateSet): number | null;
|
|
54
24
|
getImageTintAlpha(state: DBaseStateSet): number;
|
|
55
25
|
getImageSource(state: DBaseStateSet): Texture | DisplayObject | null;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
protected _margin: DImagePieceMargin;
|
|
66
|
-
protected _tint: DImagePieceTintOptions | undefined;
|
|
67
|
-
protected _bound: Rectangle;
|
|
68
|
-
protected _onUpdateBound: () => void;
|
|
69
|
-
constructor(parent: DImagePieceParent, theme: DThemeImagePiece, textAlign: DImagePieceTextAlign, options?: DImagePieceOptions);
|
|
70
|
-
get image(): DisplayObject | null;
|
|
71
|
-
get align(): DImagePieceAlign;
|
|
72
|
-
get margin(): DImagePieceMargin;
|
|
73
|
-
get bound(): Rectangle;
|
|
74
|
-
get source(): DStateAwareOrValueMightBe<Texture | DisplayObject | null>;
|
|
75
|
-
set source(source: DStateAwareOrValueMightBe<Texture | DisplayObject | null>);
|
|
76
|
-
protected computeSource(): Texture | DisplayObject | null;
|
|
77
|
-
onStateChange(newState: DBaseStateSet, oldState: DBaseStateSet): void;
|
|
78
|
-
updateBound(): void;
|
|
79
|
-
protected isTintAware(target: DisplayObject | null): target is DisplayObject & {
|
|
80
|
-
tint: number;
|
|
81
|
-
};
|
|
82
|
-
protected toTintColor(theme: DThemeImagePiece, state: DBaseStateSet): number | null;
|
|
83
|
-
protected toTintAlpha(theme: DThemeImagePiece, state: DBaseStateSet): number;
|
|
84
|
-
/**
|
|
85
|
-
* Updates the tint.
|
|
86
|
-
*
|
|
87
|
-
* @returns True if the tint is changed.
|
|
88
|
-
*/
|
|
89
|
-
updateTint(): boolean;
|
|
90
|
-
/**
|
|
91
|
-
* Updates the computed source.
|
|
92
|
-
*
|
|
93
|
-
* @returns True if the computed source is changed
|
|
94
|
-
*/
|
|
95
|
-
updateSource(): boolean;
|
|
96
|
-
isRefitable(target: any): boolean;
|
|
26
|
+
getImageRotation(state: DBaseStateSet): number;
|
|
27
|
+
}
|
|
28
|
+
export interface DImagePiece {
|
|
29
|
+
readonly object: DisplayObject | null;
|
|
30
|
+
readonly align: DImagePieceAlign;
|
|
31
|
+
readonly margin: DImagePieceMargin;
|
|
32
|
+
readonly tint: DImagePieceTint;
|
|
33
|
+
source: DStateAwareOrValueMightBe<Texture | DisplayObject | null>;
|
|
34
|
+
rotation: DStateAwareOrValueMightBe<number>;
|
|
97
35
|
destroy(): void;
|
|
98
|
-
protected onUpdate(): void;
|
|
99
36
|
}
|