@flashist/appframework 0.0.3 → 0.0.4
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/app/AppModule.d.ts +5 -0
- package/app/AppModule.js +41 -0
- package/app/AppModule.js.map +1 -0
- package/app/AppSettings.d.ts +7 -0
- package/{src/app/AppSettings.ts → app/AppSettings.js} +3 -4
- package/app/AppSettings.js.map +1 -0
- package/app/commands/LoadAppConfigCommand.d.ts +5 -0
- package/app/commands/LoadAppConfigCommand.js +61 -0
- package/app/commands/LoadAppConfigCommand.js.map +1 -0
- package/app/commands/ParseStaticItemsConfigCommand.d.ts +4 -0
- package/app/commands/ParseStaticItemsConfigCommand.js +45 -0
- package/app/commands/ParseStaticItemsConfigCommand.js.map +1 -0
- package/app/data/AppConfigType.d.ts +1 -0
- package/app/data/AppConfigType.js +2 -0
- package/app/data/AppConfigType.js.map +1 -0
- package/app/data/AppConfigVO.d.ts +9 -0
- package/app/data/AppConfigVO.js +27 -0
- package/app/data/AppConfigVO.js.map +1 -0
- package/{src/app/data/IAppModelStorageVO.ts → app/data/IAppModelStorageVO.d.ts} +1 -1
- package/app/data/IAppModelStorageVO.js +2 -0
- package/app/data/IAppModelStorageVO.js.map +1 -0
- package/{src/app/data/IItemsConfigVO.ts → app/data/IItemsConfigVO.d.ts} +2 -3
- package/app/data/IItemsConfigVO.js +2 -0
- package/app/data/IItemsConfigVO.js.map +1 -0
- package/app/managers/AppManager.d.ts +14 -0
- package/app/managers/AppManager.js +73 -0
- package/app/managers/AppManager.js.map +1 -0
- package/app/models/AppConfigModel.d.ts +6 -0
- package/app/models/AppConfigModel.js +37 -0
- package/app/models/AppConfigModel.js.map +1 -0
- package/app/models/AppModel.d.ts +8 -0
- package/app/models/AppModel.js +34 -0
- package/app/models/AppModel.js.map +1 -0
- package/app/views/AppMainContainer.d.ts +7 -0
- package/app/views/AppMainContainer.js +39 -0
- package/app/views/AppMainContainer.js.map +1 -0
- package/assets/AssetsModule.d.ts +4 -0
- package/assets/AssetsModule.js +31 -0
- package/assets/AssetsModule.js.map +1 -0
- package/assets/commands/ParseAssetsConfigCommand.d.ts +4 -0
- package/assets/commands/ParseAssetsConfigCommand.js +42 -0
- package/assets/commands/ParseAssetsConfigCommand.js.map +1 -0
- package/{src/assets/data/IAssetsConfigVO.ts → assets/data/IAssetsConfigVO.d.ts} +2 -3
- package/assets/data/IAssetsConfigVO.js +2 -0
- package/assets/data/IAssetsConfigVO.js.map +1 -0
- package/assets/models/AssetsModel.d.ts +3 -0
- package/assets/models/AssetsModel.js +25 -0
- package/assets/models/AssetsModel.js.map +1 -0
- package/base/BaseObjectWithGlobalDispatcher.d.ts +7 -0
- package/base/BaseObjectWithGlobalDispatcher.js +54 -0
- package/base/BaseObjectWithGlobalDispatcher.js.map +1 -0
- package/base/commands/BaseAppCommand.d.ts +7 -0
- package/base/commands/BaseAppCommand.js +54 -0
- package/base/commands/BaseAppCommand.js.map +1 -0
- package/base/data/BaseAppObjectWithStaticVO.d.ts +6 -0
- package/base/data/BaseAppObjectWithStaticVO.js +25 -0
- package/base/data/BaseAppObjectWithStaticVO.js.map +1 -0
- package/base/managers/BaseAppManager.d.ts +3 -0
- package/base/managers/BaseAppManager.js +25 -0
- package/base/managers/BaseAppManager.js.map +1 -0
- package/base/mediators/BaseAppMediator.d.ts +9 -0
- package/base/mediators/BaseAppMediator.js +34 -0
- package/base/mediators/BaseAppMediator.js.map +1 -0
- package/base/models/BaseAppGenericObjectsModel.d.ts +7 -0
- package/base/models/BaseAppGenericObjectsModel.js +54 -0
- package/base/models/BaseAppGenericObjectsModel.js.map +1 -0
- package/base/models/BaseAppModel.d.ts +3 -0
- package/base/models/BaseAppModel.js +25 -0
- package/base/models/BaseAppModel.js.map +1 -0
- package/base/modules/AppModulesManager.d.ts +9 -0
- package/base/modules/AppModulesManager.js +39 -0
- package/base/modules/AppModulesManager.js.map +1 -0
- package/base/modules/BaseAppModule.d.ts +6 -0
- package/base/modules/BaseAppModule.js +34 -0
- package/base/modules/BaseAppModule.js.map +1 -0
- package/base/views/BaseAppView.d.ts +8 -0
- package/base/views/BaseAppView.js +38 -0
- package/base/views/BaseAppView.js.map +1 -0
- package/containers/ContainersModule.d.ts +4 -0
- package/containers/ContainersModule.js +31 -0
- package/containers/ContainersModule.js.map +1 -0
- package/containers/managers/ContainersManager.d.ts +8 -0
- package/containers/managers/ContainersManager.js +40 -0
- package/containers/managers/ContainersManager.js.map +1 -0
- package/{src/data/IAppGenericObjectVO.ts → data/IAppGenericObjectVO.d.ts} +1 -2
- package/data/IAppGenericObjectVO.js +2 -0
- package/data/IAppGenericObjectVO.js.map +1 -0
- package/date/DateSettings.d.ts +6 -0
- package/{src/date/DateSettings.ts → date/DateSettings.js} +3 -2
- package/date/DateSettings.js.map +1 -0
- package/debug/DebugModule.d.ts +4 -0
- package/debug/DebugModule.js +37 -0
- package/debug/DebugModule.js.map +1 -0
- package/dependencies/DependenciesModule.d.ts +4 -0
- package/dependencies/DependenciesModule.js +31 -0
- package/dependencies/DependenciesModule.js.map +1 -0
- package/display/data/IGetSizable.d.ts +4 -0
- package/display/data/IGetSizable.js +2 -0
- package/display/data/IGetSizable.js.map +1 -0
- package/display/tools/GetSizeTools.d.ts +4 -0
- package/display/tools/GetSizeTools.js +24 -0
- package/display/tools/GetSizeTools.js.map +1 -0
- package/display/views/AppContainer.d.ts +7 -0
- package/display/views/AppContainer.js +38 -0
- package/display/views/AppContainer.js.map +1 -0
- package/display/views/button/BaseBtn.d.ts +32 -0
- package/display/views/button/BaseBtn.js +259 -0
- package/display/views/button/BaseBtn.js.map +1 -0
- package/display/views/button/BaseBtnEvent.d.ts +4 -0
- package/{src/display/views/button/BaseBtnEvent.ts → display/views/button/BaseBtnEvent.js} +3 -2
- package/display/views/button/BaseBtnEvent.js.map +1 -0
- package/display/views/button/BaseBtnState.d.ts +12 -0
- package/display/views/button/BaseBtnState.js +31 -0
- package/display/views/button/BaseBtnState.js.map +1 -0
- package/display/views/button/BaseBtnView.d.ts +30 -0
- package/{src/display/views/button/BaseBtnView.ts → display/views/button/BaseBtnView.js} +84 -133
- package/display/views/button/BaseBtnView.js.map +1 -0
- package/display/views/button/DefaultButtonViewConfig.d.ts +8 -0
- package/display/views/button/DefaultButtonViewConfig.js +12 -0
- package/display/views/button/DefaultButtonViewConfig.js.map +1 -0
- package/{src/display/views/button/IButtonViewConfig.ts → display/views/button/IButtonViewConfig.d.ts} +4 -7
- package/display/views/button/IButtonViewConfig.js +2 -0
- package/display/views/button/IButtonViewConfig.js.map +1 -0
- package/{src/display/views/button/ISimpleButtonConfig.ts → display/views/button/ISimpleButtonConfig.d.ts} +3 -7
- package/display/views/button/ISimpleButtonConfig.js +2 -0
- package/display/views/button/ISimpleButtonConfig.js.map +1 -0
- package/display/views/button/SimpleButtonState.d.ts +12 -0
- package/display/views/button/SimpleButtonState.js +31 -0
- package/display/views/button/SimpleButtonState.js.map +1 -0
- package/display/views/button/SimpleButtonView.d.ts +33 -0
- package/display/views/button/SimpleButtonView.js +181 -0
- package/display/views/button/SimpleButtonView.js.map +1 -0
- package/display/views/getsize/GetSizeTools.d.ts +11 -0
- package/{src/display/views/getsize/GetSizeTools.ts → display/views/getsize/GetSizeTools.js} +14 -15
- package/display/views/getsize/GetSizeTools.js.map +1 -0
- package/display/views/getsize/IGetSizeObject.d.ts +4 -0
- package/display/views/getsize/IGetSizeObject.js +2 -0
- package/display/views/getsize/IGetSizeObject.js.map +1 -0
- package/display/views/layout/BaseLayout.d.ts +22 -0
- package/display/views/layout/BaseLayout.js +113 -0
- package/display/views/layout/BaseLayout.js.map +1 -0
- package/display/views/layout/ColumnLayout.d.ts +42 -0
- package/display/views/layout/ColumnLayout.js +117 -0
- package/display/views/layout/ColumnLayout.js.map +1 -0
- package/display/views/layout/LayoutConfig.d.ts +9 -0
- package/display/views/layout/LayoutConfig.js +14 -0
- package/display/views/layout/LayoutConfig.js.map +1 -0
- package/display/views/layout/RowLayout.d.ts +38 -0
- package/display/views/layout/RowLayout.js +113 -0
- package/display/views/layout/RowLayout.js.map +1 -0
- package/display/views/layout/container/BaseLayoutableContainer.d.ts +8 -0
- package/display/views/layout/container/BaseLayoutableContainer.js +31 -0
- package/display/views/layout/container/BaseLayoutableContainer.js.map +1 -0
- package/display/views/layout/container/ILayoutableChild.d.ts +2 -0
- package/display/views/layout/container/ILayoutableChild.js +2 -0
- package/display/views/layout/container/ILayoutableChild.js.map +1 -0
- package/{src/display/views/layout/container/ILayoutableContainer.ts → display/views/layout/container/ILayoutableContainer.d.ts} +2 -5
- package/display/views/layout/container/ILayoutableContainer.js +2 -0
- package/display/views/layout/container/ILayoutableContainer.js.map +1 -0
- package/display/views/resize/IResizable.d.ts +5 -0
- package/display/views/resize/IResizable.js +2 -0
- package/display/views/resize/IResizable.js.map +1 -0
- package/display/views/resize/ResizableContainer.d.ts +16 -0
- package/display/views/resize/ResizableContainer.js +99 -0
- package/display/views/resize/ResizableContainer.js.map +1 -0
- package/display/views/simplelist/ISimpleListItem.d.ts +3 -0
- package/display/views/simplelist/ISimpleListItem.js +2 -0
- package/display/views/simplelist/ISimpleListItem.js.map +1 -0
- package/display/views/simplelist/SimpleList.d.ts +38 -0
- package/{src/display/views/simplelist/SimpleList.ts → display/views/simplelist/SimpleList.js} +142 -186
- package/display/views/simplelist/SimpleList.js.map +1 -0
- package/display/views/simplelist/SimpleListEvent.d.ts +4 -0
- package/display/views/simplelist/SimpleListEvent.js +5 -0
- package/display/views/simplelist/SimpleListEvent.js.map +1 -0
- package/display/views/sizedistributor/ISizeDistributorChild.d.ts +4 -0
- package/display/views/sizedistributor/ISizeDistributorChild.js +2 -0
- package/display/views/sizedistributor/ISizeDistributorChild.js.map +1 -0
- package/display/views/sizedistributor/SizeDistributor.d.ts +2 -0
- package/display/views/sizedistributor/SizeDistributor.js +7 -0
- package/display/views/sizedistributor/SizeDistributor.js.map +1 -0
- package/display/views/sizedistributor/SizeDistributorConfig.d.ts +9 -0
- package/display/views/sizedistributor/SizeDistributorConfig.js +12 -0
- package/display/views/sizedistributor/SizeDistributorConfig.js.map +1 -0
- package/{src/display/views/togglegroup/IToggableItem.ts → display/views/togglegroup/IToggableItem.d.ts} +2 -3
- package/display/views/togglegroup/IToggableItem.js +2 -0
- package/display/views/togglegroup/IToggableItem.js.map +1 -0
- package/{src/display/views/togglegroup/IToggleGroupItem.ts → display/views/togglegroup/IToggleGroupItem.d.ts} +2 -3
- package/display/views/togglegroup/IToggleGroupItem.js +2 -0
- package/display/views/togglegroup/IToggleGroupItem.js.map +1 -0
- package/display/views/togglegroup/ToggleGroup.d.ts +18 -0
- package/display/views/togglegroup/ToggleGroup.js +143 -0
- package/display/views/togglegroup/ToggleGroup.js.map +1 -0
- package/display/views/togglegroup/ToggleGroupEvent.d.ts +3 -0
- package/display/views/togglegroup/ToggleGroupEvent.js +4 -0
- package/display/views/togglegroup/ToggleGroupEvent.js.map +1 -0
- package/display/views/viewstack/IViewStackItem.d.ts +4 -0
- package/display/views/viewstack/IViewStackItem.js +2 -0
- package/display/views/viewstack/IViewStackItem.js.map +1 -0
- package/display/views/viewstack/ViewLazyCreationServiceLocatorStack.d.ts +5 -0
- package/display/views/viewstack/ViewLazyCreationServiceLocatorStack.js +34 -0
- package/display/views/viewstack/ViewLazyCreationServiceLocatorStack.js.map +1 -0
- package/display/views/viewstack/ViewLazyCreationStack.d.ts +11 -0
- package/display/views/viewstack/ViewLazyCreationStack.js +55 -0
- package/display/views/viewstack/ViewLazyCreationStack.js.map +1 -0
- package/display/views/viewstack/ViewStack.d.ts +18 -0
- package/display/views/viewstack/ViewStack.js +96 -0
- package/display/views/viewstack/ViewStack.js.map +1 -0
- package/display/views/viewstack/ViewStackLazyCreation.d.ts +10 -0
- package/display/views/viewstack/ViewStackLazyCreation.js +50 -0
- package/display/views/viewstack/ViewStackLazyCreation.js.map +1 -0
- package/events/commands/DispatchGlobalEventCommand.d.ts +8 -0
- package/events/commands/DispatchGlobalEventCommand.js +34 -0
- package/events/commands/DispatchGlobalEventCommand.js.map +1 -0
- package/facade/Facade.d.ts +27 -0
- package/{src/facade/Facade.ts → facade/Facade.js} +77 -114
- package/facade/Facade.js.map +1 -0
- package/{src/facade/IFacadeOptions.ts → facade/IFacadeOptions.d.ts} +3 -4
- package/facade/IFacadeOptions.js +2 -0
- package/facade/IFacadeOptions.js.map +1 -0
- package/globaleventdispatcher/GlobalEventDispatcherModule.d.ts +4 -0
- package/globaleventdispatcher/GlobalEventDispatcherModule.js +33 -0
- package/globaleventdispatcher/GlobalEventDispatcherModule.js.map +1 -0
- package/globaleventdispatcher/commands/WaitGlobalEventCommand.d.ts +6 -0
- package/globaleventdispatcher/commands/WaitGlobalEventCommand.js +39 -0
- package/globaleventdispatcher/commands/WaitGlobalEventCommand.js.map +1 -0
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcher.d.ts +9 -0
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcher.js +60 -0
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcher.js.map +1 -0
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcherEvent.d.ts +4 -0
- package/{src/globaleventdispatcher/dispatcher/GlobalEventDispatcherEvent.ts → globaleventdispatcher/dispatcher/GlobalEventDispatcherEvent.js} +3 -2
- package/globaleventdispatcher/dispatcher/GlobalEventDispatcherEvent.js.map +1 -0
- package/{src/globaleventdispatcher/dispatcher/IGlobalDispatchEventVO.ts → globaleventdispatcher/dispatcher/IGlobalDispatchEventVO.d.ts} +3 -3
- package/globaleventdispatcher/dispatcher/IGlobalDispatchEventVO.js +2 -0
- package/globaleventdispatcher/dispatcher/IGlobalDispatchEventVO.js.map +1 -0
- package/globaleventdispatcher/managers/GlobalEventsCommandManager.d.ts +5 -0
- package/globaleventdispatcher/managers/GlobalEventsCommandManager.js +48 -0
- package/globaleventdispatcher/managers/GlobalEventsCommandManager.js.map +1 -0
- package/hints/commands/AnimateHintCommand.d.ts +10 -0
- package/hints/commands/AnimateHintCommand.js +73 -0
- package/hints/commands/AnimateHintCommand.js.map +1 -0
- package/hints/data/DefaultHintConfig.d.ts +15 -0
- package/hints/data/DefaultHintConfig.js +20 -0
- package/hints/data/DefaultHintConfig.js.map +1 -0
- package/hints/data/HintContainerId.d.ts +1 -0
- package/hints/data/HintContainerId.js +2 -0
- package/hints/data/HintContainerId.js.map +1 -0
- package/{src/hints/data/IHintConfig.ts → hints/data/IHintConfig.d.ts} +2 -7
- package/hints/data/IHintConfig.js +2 -0
- package/hints/data/IHintConfig.js.map +1 -0
- package/html/HTMLModule.d.ts +4 -0
- package/html/HTMLModule.js +31 -0
- package/html/HTMLModule.js.map +1 -0
- package/html/managers/HTMLManager.d.ts +8 -0
- package/html/managers/HTMLManager.js +39 -0
- package/html/managers/HTMLManager.js.map +1 -0
- package/index.d.ts +16 -0
- package/index.js +17 -0
- package/index.js.map +1 -0
- package/init/commands/InitApplicationCommand.d.ts +4 -0
- package/init/commands/InitApplicationCommand.js +43 -0
- package/init/commands/InitApplicationCommand.js.map +1 -0
- package/init/commands/InitApplicationDataCommand.d.ts +8 -0
- package/init/commands/InitApplicationDataCommand.js +36 -0
- package/init/commands/InitApplicationDataCommand.js.map +1 -0
- package/init/commands/InitApplicationDataEvent.d.ts +3 -0
- package/init/commands/InitApplicationDataEvent.js +4 -0
- package/init/commands/InitApplicationDataEvent.js.map +1 -0
- package/{src/load/LoadGroupName.ts → load/LoadGroupName.d.ts} +2 -2
- package/load/LoadGroupName.js +8 -0
- package/load/LoadGroupName.js.map +1 -0
- package/load/LoadModule.d.ts +7 -0
- package/load/LoadModule.js +38 -0
- package/load/LoadModule.js.map +1 -0
- package/load/LoaderId.d.ts +0 -0
- package/{src/load/LoaderId.ts → load/LoaderId.js} +1 -0
- package/load/LoaderId.js.map +1 -0
- package/locales/LocalesModule.d.ts +4 -0
- package/locales/LocalesModule.js +30 -0
- package/locales/LocalesModule.js.map +1 -0
- package/locales/commands/ParseLocaleConfigCommand.d.ts +4 -0
- package/locales/commands/ParseLocaleConfigCommand.js +44 -0
- package/locales/commands/ParseLocaleConfigCommand.js.map +1 -0
- package/package.json +1 -1
- package/pages/PageId.d.ts +4 -0
- package/{src/pages/PageId.ts → pages/PageId.js} +3 -2
- package/pages/PageId.js.map +1 -0
- package/pages/PagesModule.d.ts +4 -0
- package/pages/PagesModule.js +31 -0
- package/pages/PagesModule.js.map +1 -0
- package/pages/commands/ChangePageCommand.d.ts +8 -0
- package/pages/commands/ChangePageCommand.js +34 -0
- package/pages/commands/ChangePageCommand.js.map +1 -0
- package/pages/models/PagesModel.d.ts +11 -0
- package/pages/models/PagesModel.js +49 -0
- package/pages/models/PagesModel.js.map +1 -0
- package/pages/models/PagesModelEvent.d.ts +3 -0
- package/pages/models/PagesModelEvent.js +4 -0
- package/pages/models/PagesModelEvent.js.map +1 -0
- package/pages/views/BasePageView.d.ts +12 -0
- package/pages/views/BasePageView.js +66 -0
- package/pages/views/BasePageView.js.map +1 -0
- package/pages/views/PagesView.d.ts +12 -0
- package/pages/views/PagesView.js +62 -0
- package/pages/views/PagesView.js.map +1 -0
- package/pool/ObjectsPoolModule.d.ts +4 -0
- package/pool/ObjectsPoolModule.js +32 -0
- package/pool/ObjectsPoolModule.js.map +1 -0
- package/renderer/RendererModule.d.ts +4 -0
- package/renderer/RendererModule.js +31 -0
- package/renderer/RendererModule.js.map +1 -0
- package/renderer/events/RendererManagerEvent.d.ts +3 -0
- package/renderer/events/RendererManagerEvent.js +4 -0
- package/renderer/events/RendererManagerEvent.js.map +1 -0
- package/renderer/managers/RendererManager.d.ts +8 -0
- package/renderer/managers/RendererManager.js +66 -0
- package/renderer/managers/RendererManager.js.map +1 -0
- package/server/ServerModule.d.ts +4 -0
- package/server/ServerModule.js +31 -0
- package/server/ServerModule.js.map +1 -0
- package/server/commands/BaseServerCommand.d.ts +16 -0
- package/server/commands/BaseServerCommand.js +47 -0
- package/server/commands/BaseServerCommand.js.map +1 -0
- package/server/data/IServerRequestVO.d.ts +7 -0
- package/server/data/IServerRequestVO.js +2 -0
- package/server/data/IServerRequestVO.js.map +1 -0
- package/server/data/IServerResponseVO.d.ts +9 -0
- package/server/data/IServerResponseVO.js +2 -0
- package/server/data/IServerResponseVO.js.map +1 -0
- package/server/data/ServerErrorCode.d.ts +3 -0
- package/server/data/ServerErrorCode.js +5 -0
- package/server/data/ServerErrorCode.js.map +1 -0
- package/server/models/ServerModel.d.ts +11 -0
- package/server/models/ServerModel.js +66 -0
- package/server/models/ServerModel.js.map +1 -0
- package/sounds/SoundsModule.d.ts +5 -0
- package/sounds/SoundsModule.js +40 -0
- package/sounds/SoundsModule.js.map +1 -0
- package/sounds/SoundsSettings.d.ts +5 -0
- package/{src/sounds/SoundsSettings.ts → sounds/SoundsSettings.js} +3 -2
- package/sounds/SoundsSettings.js.map +1 -0
- package/sounds/managers/BackgroundMusicManager.d.ts +11 -0
- package/sounds/managers/BackgroundMusicManager.js +55 -0
- package/sounds/managers/BackgroundMusicManager.js.map +1 -0
- package/sounds/managers/SoundsStorageManager.d.ts +12 -0
- package/sounds/managers/SoundsStorageManager.js +54 -0
- package/sounds/managers/SoundsStorageManager.js.map +1 -0
- package/storage/StorageModule.d.ts +4 -0
- package/storage/StorageModule.js +31 -0
- package/storage/StorageModule.js.map +1 -0
- package/storage/StorageModuleConfig.d.ts +3 -0
- package/storage/StorageModuleConfig.js +4 -0
- package/storage/StorageModuleConfig.js.map +1 -0
- package/storage/managers/StorageManager.d.ts +17 -0
- package/{src/storage/managers/StorageManager.ts → storage/managers/StorageManager.js} +49 -51
- package/storage/managers/StorageManager.js.map +1 -0
- package/strategy/managers/BaseStrategyManager.d.ts +15 -0
- package/strategy/managers/BaseStrategyManager.js +38 -0
- package/strategy/managers/BaseStrategyManager.js.map +1 -0
- package/strategy/models/BaseStrategyModel.d.ts +12 -0
- package/strategy/models/BaseStrategyModel.js +54 -0
- package/strategy/models/BaseStrategyModel.js.map +1 -0
- package/strategy/strategies/BaseStrategy.d.ts +6 -0
- package/strategy/strategies/BaseStrategy.js +38 -0
- package/strategy/strategies/BaseStrategy.js.map +1 -0
- package/time/TimeModule.d.ts +4 -0
- package/time/TimeModule.js +33 -0
- package/time/TimeModule.js.map +1 -0
- package/time/managers/TimeManager.d.ts +8 -0
- package/time/managers/TimeManager.js +42 -0
- package/time/managers/TimeManager.js.map +1 -0
- package/time/models/TimeModel.d.ts +10 -0
- package/time/models/TimeModel.js +52 -0
- package/time/models/TimeModel.js.map +1 -0
- package/time/models/TimeModelEvent.d.ts +3 -0
- package/time/models/TimeModelEvent.js +4 -0
- package/time/models/TimeModelEvent.js.map +1 -0
- package/windows/data/IWindowConfigVO.d.ts +10 -0
- package/windows/data/IWindowConfigVO.js +2 -0
- package/windows/data/IWindowConfigVO.js.map +1 -0
- package/{src/windows/managers/IShowWindowVO.ts → windows/managers/IShowWindowVO.d.ts} +1 -1
- package/windows/managers/IShowWindowVO.js +2 -0
- package/windows/managers/IShowWindowVO.js.map +1 -0
- package/windows/managers/WindowsManager.d.ts +19 -0
- package/windows/managers/WindowsManager.js +72 -0
- package/windows/managers/WindowsManager.js.map +1 -0
- package/windows/views/BaseWindow.d.ts +7 -0
- package/windows/views/BaseWindow.js +39 -0
- package/windows/views/BaseWindow.js.map +1 -0
- package/gulp/tasks/clean.js +0 -9
- package/gulp/tasks/compile.js +0 -27
- package/gulp/tasks/copy-to-dist.js +0 -15
- package/gulp/tasks/generate-definitions.js +0 -86
- package/gulpfile.js +0 -22
- package/src/app/AppModule.ts +0 -26
- package/src/app/commands/LoadAppConfigCommand.ts +0 -61
- package/src/app/commands/ParseStaticItemsConfigCommand.ts +0 -32
- package/src/app/data/AppConfigType.ts +0 -1
- package/src/app/data/AppConfigVO.ts +0 -27
- package/src/app/managers/AppManager.ts +0 -68
- package/src/app/models/AppConfigModel.ts +0 -20
- package/src/app/models/AppModel.ts +0 -18
- package/src/app/views/AppMainContainer.ts +0 -23
- package/src/assets/AssetsModule.ts +0 -13
- package/src/assets/commands/ParseAssetsConfigCommand.ts +0 -25
- package/src/assets/models/AssetsModel.ts +0 -7
- package/src/base/BaseObjectWithGlobalDispatcher.ts +0 -23
- package/src/base/commands/BaseAppCommand.ts +0 -22
- package/src/base/data/BaseAppObjectWithStaticVO.ts +0 -15
- package/src/base/managers/BaseAppManager.ts +0 -5
- package/src/base/mediators/BaseAppMediator.ts +0 -24
- package/src/base/models/BaseAppGenericObjectsModel.ts +0 -23
- package/src/base/models/BaseAppModel.ts +0 -5
- package/src/base/modules/AppModulesManager.ts +0 -44
- package/src/base/modules/BaseAppModule.ts +0 -17
- package/src/base/views/BaseAppView.ts +0 -25
- package/src/containers/ContainersModule.ts +0 -13
- package/src/containers/managers/ContainersManager.ts +0 -27
- package/src/debug/DebugModule.ts +0 -22
- package/src/dependencies/DependenciesModule.ts +0 -13
- package/src/display/data/IGetSizable.ts +0 -5
- package/src/display/tools/GetSizeTools.ts +0 -25
- package/src/display/views/AppContainer.ts +0 -20
- package/src/display/views/button/BaseBtn.ts +0 -325
- package/src/display/views/button/BaseBtnState.ts +0 -31
- package/src/display/views/button/DefaultButtonViewConfig.ts +0 -10
- package/src/display/views/button/SimpleButtonState.ts +0 -31
- package/src/display/views/button/SimpleButtonView.ts +0 -226
- package/src/display/views/getsize/IGetSizeObject.ts +0 -5
- package/src/display/views/layout/BaseLayout.ts +0 -160
- package/src/display/views/layout/ColumnLayout.ts +0 -120
- package/src/display/views/layout/LayoutConfig.ts +0 -15
- package/src/display/views/layout/RowLayout.ts +0 -115
- package/src/display/views/layout/container/BaseLayoutableContainer.ts +0 -21
- package/src/display/views/layout/container/ILayoutableChild.ts +0 -3
- package/src/display/views/resize/IResizable.ts +0 -6
- package/src/display/views/resize/ResizableContainer.ts +0 -80
- package/src/display/views/simplelist/ISimpleListItem.ts +0 -5
- package/src/display/views/simplelist/SimpleListEvent.ts +0 -4
- package/src/display/views/sizedistributor/ISizeDistributorChild.ts +0 -5
- package/src/display/views/sizedistributor/SizeDistributor.ts +0 -129
- package/src/display/views/sizedistributor/SizeDistributorConfig.ts +0 -12
- package/src/display/views/togglegroup/ToggleGroup.ts +0 -140
- package/src/display/views/togglegroup/ToggleGroupEvent.ts +0 -3
- package/src/display/views/viewstack/IViewStackItem.ts +0 -7
- package/src/display/views/viewstack/ViewLazyCreationServiceLocatorStack.ts +0 -19
- package/src/display/views/viewstack/ViewLazyCreationStack.ts +0 -47
- package/src/display/views/viewstack/ViewStack.ts +0 -93
- package/src/display/views/viewstack/ViewStackLazyCreation.ts +0 -45
- package/src/events/commands/DispatchGlobalEventCommand.ts +0 -22
- package/src/globaleventdispatcher/GlobalEventDispatcherModule.ts +0 -16
- package/src/globaleventdispatcher/commands/WaitGlobalEventCommand.ts +0 -25
- package/src/globaleventdispatcher/dispatcher/GlobalEventDispatcher.ts +0 -53
- package/src/globaleventdispatcher/managers/GlobalEventsCommandManager.ts +0 -26
- package/src/hints/commands/AnimateHintCommand.ts +0 -99
- package/src/hints/data/DefaultHintConfig.ts +0 -22
- package/src/hints/data/HintContainerId.ts +0 -1
- package/src/html/HTMLModule.ts +0 -13
- package/src/html/managers/HTMLManager.ts +0 -32
- package/src/index.ts +0 -21
- package/src/init/commands/InitApplicationCommand.ts +0 -34
- package/src/init/commands/InitApplicationDataCommand.ts +0 -19
- package/src/init/commands/InitApplicationDataEvent.ts +0 -3
- package/src/load/LoadModule.ts +0 -23
- package/src/locales/LocalesModule.ts +0 -11
- package/src/locales/commands/ParseLocaleConfigCommand.ts +0 -28
- package/src/package.json +0 -36
- package/src/pages/PagesModule.ts +0 -13
- package/src/pages/commands/ChangePageCommand.ts +0 -18
- package/src/pages/models/PagesModel.ts +0 -38
- package/src/pages/models/PagesModelEvent.ts +0 -3
- package/src/pages/views/BasePageView.ts +0 -75
- package/src/pages/views/PagesView.ts +0 -57
- package/src/pool/ObjectsPoolModule.ts +0 -13
- package/src/renderer/RendererModule.ts +0 -14
- package/src/renderer/events/RendererManagerEvent.ts +0 -3
- package/src/renderer/managers/RendererManager.ts +0 -52
- package/src/server/ServerModule.ts +0 -14
- package/src/server/commands/BaseServerCommand.ts +0 -39
- package/src/server/data/IServerRequestVO.ts +0 -12
- package/src/server/data/IServerResponseVO.ts +0 -15
- package/src/server/data/ServerErrorCode.ts +0 -3
- package/src/server/models/ServerModel.ts +0 -34
- package/src/sounds/SoundsModule.ts +0 -24
- package/src/sounds/managers/BackgroundMusicManager.ts +0 -48
- package/src/sounds/managers/SoundsStorageManager.ts +0 -45
- package/src/storage/StorageModule.ts +0 -13
- package/src/storage/StorageModuleConfig.ts +0 -3
- package/src/strategy/managers/BaseStrategyManager.ts +0 -37
- package/src/strategy/models/BaseStrategyModel.ts +0 -40
- package/src/strategy/strategies/BaseStrategy.ts +0 -21
- package/src/time/TimeModule.ts +0 -16
- package/src/time/managers/TimeManager.ts +0 -29
- package/src/time/models/TimeModel.ts +0 -29
- package/src/time/models/TimeModelEvent.ts +0 -3
- package/src/windows/data/IWindowConfigVO.ts +0 -9
- package/src/windows/managers/WindowsManager.ts +0 -72
- package/src/windows/views/BaseWindow.ts +0 -22
- package/tsconfig.json +0 -19
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {FContainer} from "@flashist/flibs";
|
|
2
|
-
import {EventListenerHelper} from "@flashist/fcore";
|
|
3
|
-
|
|
4
|
-
export class AppContainer<DataType extends any = any> extends FContainer<DataType> {
|
|
5
|
-
|
|
6
|
-
protected dataEventListenerHelper: EventListenerHelper;
|
|
7
|
-
|
|
8
|
-
protected construction(...args): void {
|
|
9
|
-
super.construction(...args);
|
|
10
|
-
|
|
11
|
-
this.dataEventListenerHelper = new EventListenerHelper(this);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
protected processDataUnset(value: DataType): void {
|
|
15
|
-
super.processDataUnset(value);
|
|
16
|
-
|
|
17
|
-
this.dataEventListenerHelper.removeAllListeners();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
}
|
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
import { BaseObject, EventListenerHelper, IDefaultEventDispatcher } from "@flashist/fcore";
|
|
2
|
-
|
|
3
|
-
import { DisplayObject, InteractiveEvent } from "@flashist/flibs";
|
|
4
|
-
|
|
5
|
-
import { BaseBtnState } from "./BaseBtnState";
|
|
6
|
-
import { BaseBtnEvent } from "./BaseBtnEvent";
|
|
7
|
-
|
|
8
|
-
export class BaseBtn extends BaseObject {
|
|
9
|
-
|
|
10
|
-
protected interactiveEventHelper: EventListenerHelper;
|
|
11
|
-
|
|
12
|
-
// ToDo: the previous code worked with MovieClip implementation,
|
|
13
|
-
// so this method might be moved to the MovieClip/Timeline-Button instead of the SimpleButton class
|
|
14
|
-
/*protected static SELECTED_FRAMES_FIRST_PART:string = "selected_";
|
|
15
|
-
protected static DISABLED_FRAME_NAME:string = "disabled";
|
|
16
|
-
protected static HIT_AREA_CLIP_NAME:string = "customHitArea";
|
|
17
|
-
protected static LABEL_FIELD_NAME:string = "labelField";*/
|
|
18
|
-
|
|
19
|
-
protected _hitArea: DisplayObject;
|
|
20
|
-
|
|
21
|
-
// protected label:BaseLabel;
|
|
22
|
-
|
|
23
|
-
private _state: string;
|
|
24
|
-
private _selected: boolean;
|
|
25
|
-
|
|
26
|
-
public autoToggleSelected: boolean;
|
|
27
|
-
|
|
28
|
-
private _enabled: boolean;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
protected construction(): void {
|
|
32
|
-
super.construction();
|
|
33
|
-
|
|
34
|
-
this.interactiveEventHelper = new EventListenerHelper(this);
|
|
35
|
-
// this.label = new BaseLabel();
|
|
36
|
-
|
|
37
|
-
this.state = BaseBtnState.NORMAL;
|
|
38
|
-
this.enabled = true;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public destruction(): void {
|
|
42
|
-
super.destruction();
|
|
43
|
-
|
|
44
|
-
if (this.interactiveEventHelper) {
|
|
45
|
-
this.interactiveEventHelper.destruction();
|
|
46
|
-
this.interactiveEventHelper = null;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
protected removeListeners(): void {
|
|
51
|
-
super.removeListeners();
|
|
52
|
-
|
|
53
|
-
this.removeMouseListeners();
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
protected addMouseListeners(dispatcher: IDefaultEventDispatcher<any>): void {
|
|
57
|
-
if (!dispatcher) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
this.removeMouseListeners();
|
|
62
|
-
|
|
63
|
-
this.interactiveEventHelper.addEventListener(
|
|
64
|
-
dispatcher,
|
|
65
|
-
InteractiveEvent.OVER,
|
|
66
|
-
this.onOver
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
this.interactiveEventHelper.addEventListener(
|
|
70
|
-
dispatcher,
|
|
71
|
-
InteractiveEvent.OUT,
|
|
72
|
-
this.onOut
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
this.interactiveEventHelper.addEventListener(
|
|
76
|
-
dispatcher,
|
|
77
|
-
InteractiveEvent.DOWN,
|
|
78
|
-
this.onMouseDown
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
this.interactiveEventHelper.addEventListener(
|
|
82
|
-
dispatcher,
|
|
83
|
-
InteractiveEvent.TAP,
|
|
84
|
-
this.onTap
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
protected removeMouseListeners(): void {
|
|
89
|
-
if (!this.isConstructed) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
this.interactiveEventHelper.removeAllListeners();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
protected onOver(): void {
|
|
98
|
-
if (!this._enabled) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
this.state = this.findStateValue(BaseBtnState.OVER);
|
|
103
|
-
|
|
104
|
-
this.redispatchEvent(InteractiveEvent.OVER);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
protected onOut(): void {
|
|
108
|
-
if (!this._enabled) {
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
this.state = this.findStateValue(BaseBtnState.NORMAL);
|
|
113
|
-
|
|
114
|
-
this.redispatchEvent(InteractiveEvent.OUT);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
protected onMouseDown(): void {
|
|
118
|
-
if (!this._enabled) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
this.state = this.findStateValue(BaseBtnState.PRESS);
|
|
123
|
-
|
|
124
|
-
this.redispatchEvent(InteractiveEvent.DOWN);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
protected onTap(): void {
|
|
128
|
-
if (!this._enabled) {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
if (this.autoToggleSelected) {
|
|
133
|
-
this.selected = !this.selected;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
this.state = this.findStateValue(BaseBtnState.OVER);
|
|
137
|
-
|
|
138
|
-
this.redispatchEvent(InteractiveEvent.TAP);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
protected redispatchEvent(sourceEvent: string): void {
|
|
143
|
-
this.dispatchEvent(sourceEvent);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
protected commitStateData(): void {
|
|
147
|
-
if (!this.isConstructed) {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
this.commitEnabledData();
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
protected commitEnabledData(): void {
|
|
155
|
-
if (this.hitArea) {
|
|
156
|
-
if (this.enabled) {
|
|
157
|
-
this.hitArea.interactive = true;
|
|
158
|
-
this.hitArea.buttonMode = true;
|
|
159
|
-
|
|
160
|
-
} else {
|
|
161
|
-
this.hitArea.interactive = false;
|
|
162
|
-
this.hitArea.buttonMode = false;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
public get state(): string {
|
|
168
|
-
return this._state;
|
|
169
|
-
}
|
|
170
|
-
public set state(value: string) {
|
|
171
|
-
if (value == this.state) {
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
this._state = value;
|
|
176
|
-
|
|
177
|
-
this.commitStateData();
|
|
178
|
-
|
|
179
|
-
this.dispatchEvent(BaseBtnEvent.STATE_CHANGE);
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
public get selected(): boolean {
|
|
183
|
-
return this._selected;
|
|
184
|
-
}
|
|
185
|
-
public set selected(value: boolean) {
|
|
186
|
-
if (value == this.selected) {
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
this._selected = value;
|
|
191
|
-
|
|
192
|
-
if (this._selected) {
|
|
193
|
-
this.state = BaseBtnState.SELECTED_NORMAL;
|
|
194
|
-
} else {
|
|
195
|
-
this.state = BaseBtnState.NORMAL;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
this.dispatchEvent(BaseBtnEvent.SELECTED_CHANGE);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
public get enabled(): boolean {
|
|
202
|
-
return this._enabled;
|
|
203
|
-
}
|
|
204
|
-
public set enabled(value: boolean) {
|
|
205
|
-
if (value == this.enabled) {
|
|
206
|
-
return;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
this._enabled = value;
|
|
210
|
-
|
|
211
|
-
if (this._enabled) {
|
|
212
|
-
this.state = this.findStateValue(BaseBtnState.NORMAL);
|
|
213
|
-
} else {
|
|
214
|
-
this.state = this.findStateValue(BaseBtnState.DISABLED);
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
this.commitEnabledData();
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
protected commitData(): void {
|
|
222
|
-
super.commitData();
|
|
223
|
-
|
|
224
|
-
if (!this.isConstructed) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// this.updateHitArea();
|
|
229
|
-
this.commitStateData();
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
public get hitArea(): DisplayObject {
|
|
234
|
-
return this._hitArea;
|
|
235
|
-
}
|
|
236
|
-
public set hitArea(value: DisplayObject) {
|
|
237
|
-
if (value == this.hitArea) {
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
// Remove previous hit area
|
|
242
|
-
this.removeMouseListeners();
|
|
243
|
-
|
|
244
|
-
// Set the new hit area
|
|
245
|
-
this._hitArea = value;
|
|
246
|
-
this.addMouseListeners(this.hitArea);
|
|
247
|
-
|
|
248
|
-
this.commitData();
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
// protected updateHitArea():void {
|
|
252
|
-
// /*var tempNewHitArea:createjs.DisplayObject;
|
|
253
|
-
// if (this.view) {
|
|
254
|
-
// tempNewHitArea = (this.view[BaseBtn.HIT_AREA_CLIP_NAME] as createjs.DisplayObject);
|
|
255
|
-
// if (!tempNewHitArea) {
|
|
256
|
-
// tempNewHitArea = this.view;
|
|
257
|
-
// }
|
|
258
|
-
// }
|
|
259
|
-
//
|
|
260
|
-
// this.hitArea = tempNewHitArea;*/
|
|
261
|
-
// // ToDo: the previous code worked with MovieClip implementation,
|
|
262
|
-
// // so this method might be moved to the MovieClip/Timeline-Button instead of the SimpleButton class
|
|
263
|
-
// }
|
|
264
|
-
|
|
265
|
-
/*protected updateLabel():void {
|
|
266
|
-
// var tempNewField:createjs.Text;
|
|
267
|
-
// if (this.view) {
|
|
268
|
-
// tempNewField = DisplayObjectTools.findChildByName<createjs.Text>(this.view, BaseBtn.LABEL_FIELD_NAME, true);
|
|
269
|
-
// }
|
|
270
|
-
//
|
|
271
|
-
// this.label.field = tempNewField;
|
|
272
|
-
// ToDo: the previous code worked with MovieClip implementation,
|
|
273
|
-
// so this method might be moved to the MovieClip/Timeline-Button instead of the BaseBtn class
|
|
274
|
-
}*/
|
|
275
|
-
|
|
276
|
-
// Think whether we really need to have the label object in the BaseBtn class
|
|
277
|
-
/*public get text():string {
|
|
278
|
-
return this.label.text;
|
|
279
|
-
}
|
|
280
|
-
public set text(value:string) {
|
|
281
|
-
this.label.text = value;
|
|
282
|
-
}*/
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
/*public simulateClick():void {
|
|
286
|
-
if (this.enabled) {
|
|
287
|
-
var tempEvent:createjs.MouseEvent = new createjs.MouseEvent(createjs.MouseEvent.CLICK);
|
|
288
|
-
tempEvent.target = this;
|
|
289
|
-
|
|
290
|
-
this.onTap(tempEvent);
|
|
291
|
-
}
|
|
292
|
-
}*/
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
/*private _commitStateDataCallback: Function;
|
|
296
|
-
get commitStateDataCallback(): Function {
|
|
297
|
-
return this._commitStateDataCallback;
|
|
298
|
-
}
|
|
299
|
-
set commitStateDataCallback(value: Function) {
|
|
300
|
-
if (value === this.commitStateDataCallback) {
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
this._commitStateDataCallback = value;
|
|
305
|
-
|
|
306
|
-
this.commitStateData();
|
|
307
|
-
}*/
|
|
308
|
-
|
|
309
|
-
protected findStateValue(sourceState: string): string {
|
|
310
|
-
let result: string;
|
|
311
|
-
|
|
312
|
-
if (this.selected) {
|
|
313
|
-
result = BaseBtnState.NORMAL_TO_SELECTED_MAP[sourceState];
|
|
314
|
-
|
|
315
|
-
} else {
|
|
316
|
-
result = BaseBtnState.SELECTED_TO_NORMAL_MAP[sourceState];
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
if (!result) {
|
|
320
|
-
result = sourceState;
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
return result;
|
|
324
|
-
}
|
|
325
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export class BaseBtnState {
|
|
2
|
-
public static NORMAL:string = "normal";
|
|
3
|
-
public static OVER:string = "over";
|
|
4
|
-
public static PRESS:string = "press";
|
|
5
|
-
public static DISABLED:string = "disabled";
|
|
6
|
-
|
|
7
|
-
public static SELECTED_NORMAL:string = "selected_normal";
|
|
8
|
-
public static SELECTED_OVER:string = "selected_over";
|
|
9
|
-
public static SELECTED_PRESS:string = "selected_press";
|
|
10
|
-
public static SELECTED_DISABLED:string = "selected_disabled";
|
|
11
|
-
|
|
12
|
-
public static NORMAL_TO_SELECTED_MAP = ((): any => {
|
|
13
|
-
let result: any = {};
|
|
14
|
-
result[BaseBtnState.NORMAL] = BaseBtnState.SELECTED_NORMAL;
|
|
15
|
-
result[BaseBtnState.OVER] = BaseBtnState.SELECTED_OVER;
|
|
16
|
-
result[BaseBtnState.PRESS] = BaseBtnState.SELECTED_PRESS;
|
|
17
|
-
result[BaseBtnState.DISABLED] = BaseBtnState.SELECTED_DISABLED;
|
|
18
|
-
|
|
19
|
-
return result;
|
|
20
|
-
})();
|
|
21
|
-
|
|
22
|
-
public static SELECTED_TO_NORMAL_MAP = ((): any => {
|
|
23
|
-
let result: any = {};
|
|
24
|
-
result[BaseBtnState.SELECTED_NORMAL] = BaseBtnState.NORMAL;
|
|
25
|
-
result[BaseBtnState.SELECTED_OVER] = BaseBtnState.OVER;
|
|
26
|
-
result[BaseBtnState.SELECTED_PRESS] = BaseBtnState.PRESS;
|
|
27
|
-
result[BaseBtnState.SELECTED_DISABLED] = BaseBtnState.DISABLED;
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
})();
|
|
31
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import {Point} from "@flashist/flibs";
|
|
2
|
-
|
|
3
|
-
import {IButtonViewConfig} from "./IButtonViewConfig";
|
|
4
|
-
|
|
5
|
-
export class DefaultButtonViewConfig implements IButtonViewConfig {
|
|
6
|
-
iconPadding: Point = new Point();
|
|
7
|
-
iconTextureId: string = "";
|
|
8
|
-
pressTextureId: string = "tools_press_bg.png";
|
|
9
|
-
overTextureId: string = "tools_over_bg.png";
|
|
10
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
export class SimpleButtonState {
|
|
2
|
-
public static NORMAL:string = "normal";
|
|
3
|
-
public static OVER:string = "over";
|
|
4
|
-
public static PRESS:string = "press";
|
|
5
|
-
public static DISABLED:string = "disabled";
|
|
6
|
-
|
|
7
|
-
public static SELECTED_NORMAL:string = "selected_normal";
|
|
8
|
-
public static SELECTED_OVER:string = "selected_over";
|
|
9
|
-
public static SELECTED_PRESS:string = "selected_press";
|
|
10
|
-
public static SELECTED_DISABLED:string = "selected_disabled";
|
|
11
|
-
|
|
12
|
-
public static NORMAL_TO_SELECTED_MAP = ((): any => {
|
|
13
|
-
let result = {};
|
|
14
|
-
result[SimpleButtonState.NORMAL] = SimpleButtonState.SELECTED_NORMAL;
|
|
15
|
-
result[SimpleButtonState.OVER] = SimpleButtonState.SELECTED_OVER;
|
|
16
|
-
result[SimpleButtonState.PRESS] = SimpleButtonState.SELECTED_PRESS;
|
|
17
|
-
result[SimpleButtonState.DISABLED] = SimpleButtonState.SELECTED_DISABLED;
|
|
18
|
-
|
|
19
|
-
return result;
|
|
20
|
-
})();
|
|
21
|
-
|
|
22
|
-
public static SELECTED_TO_NORMAL_MAP = ((): any => {
|
|
23
|
-
let result = {};
|
|
24
|
-
result[SimpleButtonState.SELECTED_NORMAL] = SimpleButtonState.NORMAL;
|
|
25
|
-
result[SimpleButtonState.SELECTED_OVER] = SimpleButtonState.OVER;
|
|
26
|
-
result[SimpleButtonState.SELECTED_PRESS] = SimpleButtonState.PRESS;
|
|
27
|
-
result[SimpleButtonState.SELECTED_DISABLED] = SimpleButtonState.DISABLED;
|
|
28
|
-
|
|
29
|
-
return result;
|
|
30
|
-
})();
|
|
31
|
-
}
|
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import {FContainer, FLabel, Graphics, InteractiveEvent, Sprite} from "@flashist/flibs";
|
|
2
|
-
|
|
3
|
-
import {ISimpleButtonConfig} from "./ISimpleButtonConfig";
|
|
4
|
-
import {SimpleButtonState} from "./SimpleButtonState";
|
|
5
|
-
import {ResizableContainer} from "../resize/ResizableContainer";
|
|
6
|
-
import {IToggableItem} from "../togglegroup/IToggableItem";
|
|
7
|
-
|
|
8
|
-
export class SimpleButtonView<DataType extends object = object> extends ResizableContainer<DataType> implements IToggableItem {
|
|
9
|
-
|
|
10
|
-
public id: string;
|
|
11
|
-
|
|
12
|
-
private _enabled: boolean;
|
|
13
|
-
protected _state: string;
|
|
14
|
-
protected _selected: boolean;
|
|
15
|
-
|
|
16
|
-
protected config: ISimpleButtonConfig;
|
|
17
|
-
|
|
18
|
-
protected contentCont: FContainer;
|
|
19
|
-
protected bg: Graphics | Sprite;
|
|
20
|
-
protected label: FLabel;
|
|
21
|
-
|
|
22
|
-
constructor(config: ISimpleButtonConfig) {
|
|
23
|
-
super(config);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
protected construction(config: ISimpleButtonConfig): void {
|
|
27
|
-
super.construction();
|
|
28
|
-
|
|
29
|
-
this.config = config;
|
|
30
|
-
|
|
31
|
-
this.contentCont = new FContainer();
|
|
32
|
-
this.addChild(this.contentCont);
|
|
33
|
-
|
|
34
|
-
this.bg = this.createBg();
|
|
35
|
-
this.contentCont.addChild(this.bg);
|
|
36
|
-
|
|
37
|
-
this.label = new FLabel(this.config.labelConfig);
|
|
38
|
-
this.contentCont.addChild(this.label);
|
|
39
|
-
//
|
|
40
|
-
this.label.interactive = false;
|
|
41
|
-
this.label.interactiveChildren = false;
|
|
42
|
-
|
|
43
|
-
this.state = SimpleButtonState.NORMAL;
|
|
44
|
-
this.enabled = true;
|
|
45
|
-
|
|
46
|
-
if (!this.config.bgConfig.resizeBg) {
|
|
47
|
-
this.resize(
|
|
48
|
-
this.bg.width,
|
|
49
|
-
this.bg.height
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
protected addListeners(): void {
|
|
55
|
-
super.addListeners();
|
|
56
|
-
|
|
57
|
-
this.eventListenerHelper.addEventListener(
|
|
58
|
-
this,
|
|
59
|
-
InteractiveEvent.OVER,
|
|
60
|
-
this.onOver
|
|
61
|
-
);
|
|
62
|
-
this.eventListenerHelper.addEventListener(
|
|
63
|
-
this,
|
|
64
|
-
InteractiveEvent.OUT,
|
|
65
|
-
this.onOut
|
|
66
|
-
);
|
|
67
|
-
this.eventListenerHelper.addEventListener(
|
|
68
|
-
this,
|
|
69
|
-
InteractiveEvent.TAP,
|
|
70
|
-
this.onTap
|
|
71
|
-
);
|
|
72
|
-
this.eventListenerHelper.addEventListener(
|
|
73
|
-
this,
|
|
74
|
-
InteractiveEvent.UP_OUTSIDE,
|
|
75
|
-
this.onOut
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
private onOver(): void {
|
|
80
|
-
// this.contentCont.alpha = 1;
|
|
81
|
-
this.state = this.findStateValue(SimpleButtonState.OVER);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
private onOut(): void {
|
|
85
|
-
// this.contentCont.alpha = 0.75;
|
|
86
|
-
this.state = this.findStateValue(SimpleButtonState.NORMAL);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
protected onTap(): void {
|
|
90
|
-
// this.onOut();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
protected arrange(): void {
|
|
94
|
-
super.arrange();
|
|
95
|
-
|
|
96
|
-
if (this.config.bgConfig.resizeBg) {
|
|
97
|
-
if (this.bg.width !== this.resizeSize.x ||
|
|
98
|
-
this.bg.height !== this.resizeSize.y) {
|
|
99
|
-
|
|
100
|
-
this.updateBg();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
this.label.width = this.bg.width;
|
|
105
|
-
this.label.height = this.bg.height;
|
|
106
|
-
this.label.x = this.bg.x + Math.floor((this.bg.width - this.label.width) / 2);
|
|
107
|
-
this.label.y = this.bg.y + Math.floor((this.bg.height - this.label.height) / 2);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
get enabled(): boolean {
|
|
111
|
-
return this._enabled;
|
|
112
|
-
}
|
|
113
|
-
set enabled(value: boolean) {
|
|
114
|
-
if (value === this._enabled) {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
this._enabled = value;
|
|
119
|
-
|
|
120
|
-
this.commitData();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
public get text(): string {
|
|
124
|
-
return this.label.text;
|
|
125
|
-
}
|
|
126
|
-
public set text(value: string) {
|
|
127
|
-
this.label.text = value;
|
|
128
|
-
this.arrange();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
public get state(): string {
|
|
132
|
-
return this._state;
|
|
133
|
-
}
|
|
134
|
-
public set state(value: string) {
|
|
135
|
-
if (value == this.state) {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
this._state = value;
|
|
140
|
-
|
|
141
|
-
this.commitData();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
protected commitData(): void {
|
|
145
|
-
super.commitData();
|
|
146
|
-
|
|
147
|
-
if (this.enabled) {
|
|
148
|
-
this.interactive = true;
|
|
149
|
-
this.alpha = 1;
|
|
150
|
-
|
|
151
|
-
} else {
|
|
152
|
-
this.interactive = false;
|
|
153
|
-
this.alpha = 0.5;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
this.updateBg();
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
public get selected(): boolean {
|
|
160
|
-
return this._selected;
|
|
161
|
-
}
|
|
162
|
-
public set selected(value: boolean) {
|
|
163
|
-
if (value == this.selected) {
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
this._selected = value;
|
|
168
|
-
|
|
169
|
-
this.state = this.findStateValue(SimpleButtonState.NORMAL);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
protected findStateValue(normalState: string): string {
|
|
173
|
-
let result: string;
|
|
174
|
-
|
|
175
|
-
if (this.selected) {
|
|
176
|
-
result = SimpleButtonState.NORMAL_TO_SELECTED_MAP[normalState];
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (!result) {
|
|
180
|
-
result = normalState;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
return result;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
protected createBg(): Sprite | Graphics {
|
|
187
|
-
let result: Sprite | Graphics;
|
|
188
|
-
if (this.config.bgConfig.image) {
|
|
189
|
-
result = Sprite.from(this.config.bgConfig.image.imageId);
|
|
190
|
-
|
|
191
|
-
} else {
|
|
192
|
-
result = new Graphics();
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return result;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
protected updateBg(): void {
|
|
199
|
-
if (this.config.bgConfig.image) {
|
|
200
|
-
if (this.config.bgConfig.resizeBg) {
|
|
201
|
-
this.bg.width = this.resizeSize.x;
|
|
202
|
-
this.bg.height = this.resizeSize.y;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
} else {
|
|
206
|
-
const vectorBg: Graphics = this.bg as Graphics;
|
|
207
|
-
|
|
208
|
-
vectorBg.clear();
|
|
209
|
-
|
|
210
|
-
let bgColor: number = this.config.bgConfig.vector.bgColor;
|
|
211
|
-
if (this.state === SimpleButtonState.SELECTED_NORMAL || this.state === SimpleButtonState.OVER || this.state === SimpleButtonState.SELECTED_OVER) {
|
|
212
|
-
bgColor = this.config.bgConfig.vector.overBgColor;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
vectorBg.beginFill(bgColor, this.config.bgConfig.vector.bgAlpha);
|
|
216
|
-
vectorBg.lineStyle(
|
|
217
|
-
this.config.bgConfig.vector.bgBorderWidth,
|
|
218
|
-
this.config.bgConfig.vector.bgBorderColor,
|
|
219
|
-
this.config.bgConfig.vector.bgBorderAlpha,
|
|
220
|
-
0
|
|
221
|
-
);
|
|
222
|
-
vectorBg.drawRect(0, 0, this.resizeSize.x, this.resizeSize.y);
|
|
223
|
-
vectorBg.endFill();
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|