From 821ddbb2a79bbfe18998751f2ea002d5ec772382 Mon Sep 17 00:00:00 2001 From: shmyga Date: Tue, 24 Mar 2020 20:59:47 +0300 Subject: [PATCH] [update] update to haxework renaming --- src/haxe/hw/app/App.hx | 86 ------------------- src/haxe/hw/app/Const.hx | 20 ----- src/haxe/hw/app/LinuxIcon.hx | 29 ------- src/haxe/ru/m/Device.hx | 2 +- src/haxe/ru/m/pixabay/PixabayApi.hx | 2 +- src/haxe/ru/m/puzzlez/PuzzlezApp.hx | 2 +- src/haxe/ru/m/puzzlez/PuzzlezTheme.hx | 12 +-- src/haxe/ru/m/puzzlez/core/Game.hx | 4 +- src/haxe/ru/m/puzzlez/core/GameEvent.hx | 2 +- src/haxe/ru/m/puzzlez/core/GamePreset.hx | 2 +- src/haxe/ru/m/puzzlez/core/GameUtil.hx | 4 +- src/haxe/ru/m/puzzlez/core/IGame.hx | 2 +- src/haxe/ru/m/puzzlez/core/Part.hx | 2 +- src/haxe/ru/m/puzzlez/core/PartLocation.hx | 2 +- src/haxe/ru/m/puzzlez/render/Background.hx | 2 +- src/haxe/ru/m/puzzlez/render/IRender.hx | 4 +- src/haxe/ru/m/puzzlez/render/PartView.hx | 2 +- src/haxe/ru/m/puzzlez/render/ProgressView.hx | 2 +- src/haxe/ru/m/puzzlez/render/Render.hx | 8 +- src/haxe/ru/m/puzzlez/render/RenderUtil.hx | 6 +- .../m/puzzlez/render/part/BasePartBuilder.hx | 2 +- .../ru/m/puzzlez/render/part/IPartBuilder.hx | 2 +- src/haxe/ru/m/puzzlez/source/PixabaySource.hx | 2 +- .../ru/m/puzzlez/storage/SettingsStorage.hx | 2 +- src/haxe/ru/m/puzzlez/view/GameFrame.hx | 6 +- src/haxe/ru/m/puzzlez/view/GameFrame.yaml | 18 ++-- src/haxe/ru/m/puzzlez/view/ImageListFrame.hx | 8 +- .../ru/m/puzzlez/view/ImageListFrame.yaml | 6 +- src/haxe/ru/m/puzzlez/view/LoadingWrapper.hx | 14 +-- src/haxe/ru/m/puzzlez/view/PresetFrame.hx | 10 +-- src/haxe/ru/m/puzzlez/view/PresetFrame.yaml | 12 +-- src/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx | 6 +- .../ru/m/puzzlez/view/PuzzlezAppView.yaml | 4 +- src/haxe/ru/m/puzzlez/view/StartFrame.hx | 8 +- src/haxe/ru/m/puzzlez/view/StartFrame.yaml | 22 ++--- .../ru/m/puzzlez/view/common/ImageDataList.hx | 10 +-- .../m/puzzlez/view/common/ImageDataList.yaml | 4 +- .../ru/m/puzzlez/view/common/PaginatorView.hx | 8 +- .../ru/m/puzzlez/view/common/PresetView.hx | 2 +- .../m/puzzlez/view/common/PuzzleImageView.hx | 10 +-- .../puzzlez/view/common/PuzzleImageView.yaml | 8 +- .../m/puzzlez/view/popup/BackgroundPopup.hx | 14 +-- .../m/puzzlez/view/popup/BackgroundPopup.yaml | 22 ++--- .../ru/m/puzzlez/view/popup/PreviewPopup.hx | 2 +- .../ru/m/puzzlez/view/popup/PreviewPopup.yaml | 10 +-- src/haxe/ru/m/skin/ButtonSVGSkin.hx | 10 +-- src/haxe/ru/m/update/Updater.hx | 2 +- 47 files changed, 142 insertions(+), 277 deletions(-) delete mode 100644 src/haxe/hw/app/App.hx delete mode 100755 src/haxe/hw/app/Const.hx delete mode 100644 src/haxe/hw/app/LinuxIcon.hx diff --git a/src/haxe/hw/app/App.hx b/src/haxe/hw/app/App.hx deleted file mode 100644 index 45edf36..0000000 --- a/src/haxe/hw/app/App.hx +++ /dev/null @@ -1,86 +0,0 @@ -package hw.app; - -import flash.Lib; -import haxework.animate.Animate; -import haxework.animate.FadeAnimate; -import haxework.animate.IAnimate; -import haxework.animate.UnFadeAnimate; -import haxework.resources.IResources; -import haxework.signal.Signal; -import haxework.view.IView; -import haxework.view.popup.PopupManager; -import haxework.view.Root; -import haxework.view.theme.ITheme; -import openfl.display.BitmapData; -import openfl.display.StageDisplayState; -import openfl.events.FullScreenEvent; - -class App { - - public var view(default, set):IView; - - private function set_view(value:IView):IView { - view = value; - Root.bind(view); - return view; - } - - public var icon(default, set):BitmapData; - - private function set_icon(value:BitmapData):BitmapData { - icon = value; - #if linux - if (icon != null) { - hw.app.LinuxIcon.value = icon; - } - #end - return icon; - } - - public var fullScreenSupport(get, never):Bool; - - public function get_fullScreenSupport():Bool { - return Lib.current.stage.allowsFullScreen; - } - - public var fullScreen(get, set):Bool; - - private function get_fullScreen():Bool { - return Lib.current.stage.displayState != StageDisplayState.NORMAL; - } - - private function set_fullScreen(value:Bool):Bool { - Lib.current.stage.displayState = value ? StageDisplayState.FULL_SCREEN : StageDisplayState.NORMAL; - return get_fullScreen(); - } - - public var fullScreenSignal(default, null):Signal = new Signal(); - - @:provide static var app:App; - @:provide static var resources:IResources; - @:provide static var popupManager:PopupManager; - - @:provide public var theme:ITheme; - - public function new() { - Lib.current.stage.stageFocusRect = false; - Lib.current.stage.addEventListener(FullScreenEvent.FULL_SCREEN, event -> fullScreenSignal.emit(event.fullScreen)); - Animate.bind(Lib.current.stage); - - popupManager.showAnimateFactory = createShowAnimate; - popupManager.closeAnimateFactory = createCloseAnimate; - - resources.text.put("app.version", Const.instance.VERSION); - resources.text.put("app.name", Const.instance.NAME); - - app = this; - } - - private function createShowAnimate(view:IView):IAnimate { - return new UnFadeAnimate(view); - } - - private function createCloseAnimate(view:IView):IAnimate { - return new FadeAnimate(view); - } -} diff --git a/src/haxe/hw/app/Const.hx b/src/haxe/hw/app/Const.hx deleted file mode 100755 index 7fba90c..0000000 --- a/src/haxe/hw/app/Const.hx +++ /dev/null @@ -1,20 +0,0 @@ -package hw.app; - -import flash.Lib; -import flash.system.Capabilities; - -@:singleton class Const { - public var FPS(default, null):Int; - public var BUILD(default, null):String; - public var VERSION(default, null):String; - public var NAME(default, null):String; - public var DEBUG(default, null):Bool; - - public function new():Void { - FPS = Std.parseInt(Lib.current.stage.application.meta.get("fps")); - BUILD = CompilationOption.get("build"); - VERSION = Lib.current.stage.application.meta.get("version"); - NAME = Lib.current.stage.application.meta.get("name"); - DEBUG = Capabilities.isDebugger; - } -} diff --git a/src/haxe/hw/app/LinuxIcon.hx b/src/haxe/hw/app/LinuxIcon.hx deleted file mode 100644 index 6c556ce..0000000 --- a/src/haxe/hw/app/LinuxIcon.hx +++ /dev/null @@ -1,29 +0,0 @@ -package hw.app; - -import flash.display.BitmapData; -import flash.filters.ColorMatrixFilter; -import flash.geom.Point; -import flash.Lib; - -class LinuxIcon { - - public static var value(default, set):BitmapData; - - private static function set_value(value:BitmapData):BitmapData { - LinuxIcon.value = value; - Lib.current.stage.window.setIcon(prepareIcon(value).image); - return LinuxIcon.value; - } - - private static function prepareIcon(bitmap:BitmapData):BitmapData { - var matrix:Array = []; - matrix = matrix.concat([0, 0, 1, 0, 0]); - matrix = matrix.concat([0, 1, 0, 0, 0]); - matrix = matrix.concat([1, 0, 0, 0, 0]); - matrix = matrix.concat([0, 0, 0, 1, 0]); - var cmf:ColorMatrixFilter = new ColorMatrixFilter(matrix); - var bitmap:BitmapData = bitmap.clone(); - bitmap.applyFilter(bitmap, bitmap.rect, new Point(0, 0), cmf); - return bitmap; - } -} diff --git a/src/haxe/ru/m/Device.hx b/src/haxe/ru/m/Device.hx index 0f36266..57766ff 100644 --- a/src/haxe/ru/m/Device.hx +++ b/src/haxe/ru/m/Device.hx @@ -3,7 +3,7 @@ package ru.m; import flash.display.StageDisplayState; import flash.events.FullScreenEvent; import flash.Lib; -import haxework.signal.Signal; +import hw.signal.Signal; enum abstract Platform(String) from String to String { var ANDROID = "android"; diff --git a/src/haxe/ru/m/pixabay/PixabayApi.hx b/src/haxe/ru/m/pixabay/PixabayApi.hx index c88a8f6..95d8f93 100644 --- a/src/haxe/ru/m/pixabay/PixabayApi.hx +++ b/src/haxe/ru/m/pixabay/PixabayApi.hx @@ -1,6 +1,6 @@ package ru.m.pixabay; -import haxework.net.JsonLoader; +import hw.net.JsonLoader; import promhx.Promise; import ru.m.data.IDataSource; diff --git a/src/haxe/ru/m/puzzlez/PuzzlezApp.hx b/src/haxe/ru/m/puzzlez/PuzzlezApp.hx index 3b0e3f8..fc99f08 100644 --- a/src/haxe/ru/m/puzzlez/PuzzlezApp.hx +++ b/src/haxe/ru/m/puzzlez/PuzzlezApp.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez; -import haxework.log.TraceLogger; +import hw.log.TraceLogger; import hw.app.App; import hw.app.Const; import ru.m.puzzlez.storage.GameStorage; diff --git a/src/haxe/ru/m/puzzlez/PuzzlezTheme.hx b/src/haxe/ru/m/puzzlez/PuzzlezTheme.hx index a69a5df..0a21ee1 100644 --- a/src/haxe/ru/m/puzzlez/PuzzlezTheme.hx +++ b/src/haxe/ru/m/puzzlez/PuzzlezTheme.hx @@ -1,11 +1,11 @@ package ru.m.puzzlez; -import haxework.color.Color; -import haxework.view.geometry.Box; -import haxework.view.geometry.HAlign; -import haxework.view.geometry.SizeValue; -import haxework.view.geometry.VAlign; -import haxework.view.theme.Theme; +import hw.color.Color; +import hw.view.geometry.Box; +import hw.view.geometry.HAlign; +import hw.view.geometry.SizeValue; +import hw.view.geometry.VAlign; +import hw.view.theme.Theme; import openfl.Assets; import ru.m.skin.ButtonSVGSkin; diff --git a/src/haxe/ru/m/puzzlez/core/Game.hx b/src/haxe/ru/m/puzzlez/core/Game.hx index 00f7c49..02cbe59 100644 --- a/src/haxe/ru/m/puzzlez/core/Game.hx +++ b/src/haxe/ru/m/puzzlez/core/Game.hx @@ -1,7 +1,7 @@ package ru.m.puzzlez.core; -import haxework.geom.Point; -import haxework.signal.Signal; +import hw.geom.Point; +import hw.signal.Signal; import ru.m.puzzlez.core.GameEvent; import ru.m.puzzlez.core.GameState; import ru.m.puzzlez.core.PartLocation; diff --git a/src/haxe/ru/m/puzzlez/core/GameEvent.hx b/src/haxe/ru/m/puzzlez/core/GameEvent.hx index e458fc1..90165c4 100644 --- a/src/haxe/ru/m/puzzlez/core/GameEvent.hx +++ b/src/haxe/ru/m/puzzlez/core/GameEvent.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.core; -import haxework.geom.Point; +import hw.geom.Point; enum GameAction { PART_TAKE(id:Int); diff --git a/src/haxe/ru/m/puzzlez/core/GamePreset.hx b/src/haxe/ru/m/puzzlez/core/GamePreset.hx index d6de9ed..a21c2dd 100644 --- a/src/haxe/ru/m/puzzlez/core/GamePreset.hx +++ b/src/haxe/ru/m/puzzlez/core/GamePreset.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.core; -import haxework.geom.Rectangle; +import hw.geom.Rectangle; import ru.m.puzzlez.core.Id; typedef GamePreset = { diff --git a/src/haxe/ru/m/puzzlez/core/GameUtil.hx b/src/haxe/ru/m/puzzlez/core/GameUtil.hx index c90c112..cdbd132 100644 --- a/src/haxe/ru/m/puzzlez/core/GameUtil.hx +++ b/src/haxe/ru/m/puzzlez/core/GameUtil.hx @@ -1,7 +1,7 @@ package ru.m.puzzlez.core; -import haxework.geom.Point; -import haxework.geom.Rectangle; +import hw.geom.Point; +import hw.geom.Rectangle; import ru.m.puzzlez.core.BoundType; import ru.m.puzzlez.core.GameState; import ru.m.puzzlez.core.Id; diff --git a/src/haxe/ru/m/puzzlez/core/IGame.hx b/src/haxe/ru/m/puzzlez/core/IGame.hx index c85ddef..de99f5f 100644 --- a/src/haxe/ru/m/puzzlez/core/IGame.hx +++ b/src/haxe/ru/m/puzzlez/core/IGame.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.core; -import haxework.signal.Signal; +import hw.signal.Signal; interface IGame { public var state(default, null):GameState; diff --git a/src/haxe/ru/m/puzzlez/core/Part.hx b/src/haxe/ru/m/puzzlez/core/Part.hx index 0311308..6d0bdd1 100644 --- a/src/haxe/ru/m/puzzlez/core/Part.hx +++ b/src/haxe/ru/m/puzzlez/core/Part.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.core; -import haxework.geom.Rectangle; +import hw.geom.Rectangle; typedef PartBound = { var spike:BoundType; diff --git a/src/haxe/ru/m/puzzlez/core/PartLocation.hx b/src/haxe/ru/m/puzzlez/core/PartLocation.hx index cf0881d..8346347 100644 --- a/src/haxe/ru/m/puzzlez/core/PartLocation.hx +++ b/src/haxe/ru/m/puzzlez/core/PartLocation.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.core; -import haxework.geom.Point; +import hw.geom.Point; enum PartLocation { //PANEL(index:Int); diff --git a/src/haxe/ru/m/puzzlez/render/Background.hx b/src/haxe/ru/m/puzzlez/render/Background.hx index 3609c77..7b6c645 100644 --- a/src/haxe/ru/m/puzzlez/render/Background.hx +++ b/src/haxe/ru/m/puzzlez/render/Background.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.render; -import haxework.color.Color; +import hw.color.Color; import ru.m.puzzlez.core.Id; enum Background { diff --git a/src/haxe/ru/m/puzzlez/render/IRender.hx b/src/haxe/ru/m/puzzlez/render/IRender.hx index 71fed24..3c0e65a 100644 --- a/src/haxe/ru/m/puzzlez/render/IRender.hx +++ b/src/haxe/ru/m/puzzlez/render/IRender.hx @@ -1,7 +1,7 @@ package ru.m.puzzlez.render; -import haxework.signal.Signal; -import haxework.view.IView; +import hw.signal.Signal; +import hw.view.IView; import ru.m.puzzlez.core.GameEvent; interface IRender extends IView { diff --git a/src/haxe/ru/m/puzzlez/render/PartView.hx b/src/haxe/ru/m/puzzlez/render/PartView.hx index 0fa613d..519d713 100644 --- a/src/haxe/ru/m/puzzlez/render/PartView.hx +++ b/src/haxe/ru/m/puzzlez/render/PartView.hx @@ -4,7 +4,7 @@ import flash.display.BitmapData; import flash.display.Bitmap; import flash.display.PixelSnapping; import flash.display.Sprite; -import haxework.geom.Point; +import hw.geom.Point; import ru.m.puzzlez.core.Part; import ru.m.puzzlez.render.RenderUtil; diff --git a/src/haxe/ru/m/puzzlez/render/ProgressView.hx b/src/haxe/ru/m/puzzlez/render/ProgressView.hx index 1ef54f9..3ae8416 100644 --- a/src/haxe/ru/m/puzzlez/render/ProgressView.hx +++ b/src/haxe/ru/m/puzzlez/render/ProgressView.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.render; -import haxework.view.form.LabelView; +import hw.view.form.LabelView; class ProgressView extends LabelView { diff --git a/src/haxe/ru/m/puzzlez/render/Render.hx b/src/haxe/ru/m/puzzlez/render/Render.hx index 369ca2a..ec3274f 100644 --- a/src/haxe/ru/m/puzzlez/render/Render.hx +++ b/src/haxe/ru/m/puzzlez/render/Render.hx @@ -8,10 +8,10 @@ import flash.geom.Point as FlashPoint; import flash.geom.Rectangle; import flash.net.FileReference; import flash.utils.ByteArray; -import haxework.geom.Point; -import haxework.signal.Signal; -import haxework.view.popup.AlertView; -import haxework.view.SpriteView; +import hw.geom.Point; +import hw.signal.Signal; +import hw.view.popup.AlertView; +import hw.view.SpriteView; import ru.m.puzzlez.core.GameEvent; import ru.m.puzzlez.core.GameState; import ru.m.puzzlez.core.PartLocation; diff --git a/src/haxe/ru/m/puzzlez/render/RenderUtil.hx b/src/haxe/ru/m/puzzlez/render/RenderUtil.hx index cddbf6d..5cfab7f 100644 --- a/src/haxe/ru/m/puzzlez/render/RenderUtil.hx +++ b/src/haxe/ru/m/puzzlez/render/RenderUtil.hx @@ -3,9 +3,9 @@ package ru.m.puzzlez.render; import flash.display.BitmapData; import flash.display.Shape; import flash.geom.Matrix; -import haxework.color.Color; -import haxework.geom.Point; -import haxework.geom.Rectangle; +import hw.color.Color; +import hw.geom.Point; +import hw.geom.Rectangle; import ru.m.draw.DrawPath; import ru.m.puzzlez.core.Part; import ru.m.puzzlez.render.part.ClassicPartBuilder; diff --git a/src/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx b/src/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx index 7480202..8b41c70 100644 --- a/src/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx +++ b/src/haxe/ru/m/puzzlez/render/part/BasePartBuilder.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.render.part; -import haxework.geom.Rectangle; +import hw.geom.Rectangle; import ru.m.draw.DrawPath; import ru.m.puzzlez.core.Part; import ru.m.puzzlez.render.part.IPartBuilder; diff --git a/src/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx b/src/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx index 01d47fc..c53a143 100644 --- a/src/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx +++ b/src/haxe/ru/m/puzzlez/render/part/IPartBuilder.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.render.part; -import haxework.geom.Rectangle; +import hw.geom.Rectangle; import ru.m.draw.DrawPath; import ru.m.puzzlez.core.Part; diff --git a/src/haxe/ru/m/puzzlez/source/PixabaySource.hx b/src/haxe/ru/m/puzzlez/source/PixabaySource.hx index 040c098..be8937c 100644 --- a/src/haxe/ru/m/puzzlez/source/PixabaySource.hx +++ b/src/haxe/ru/m/puzzlez/source/PixabaySource.hx @@ -3,7 +3,7 @@ package ru.m.puzzlez.source; import flash.display.BitmapData; import flash.utils.ByteArray; import haxe.io.Bytes; -import haxework.net.BytesLoader; +import hw.net.BytesLoader; import promhx.Promise; import ru.m.data.IDataSource; import ru.m.pixabay.PixabayApi; diff --git a/src/haxe/ru/m/puzzlez/storage/SettingsStorage.hx b/src/haxe/ru/m/puzzlez/storage/SettingsStorage.hx index 2fc20eb..b14f16f 100644 --- a/src/haxe/ru/m/puzzlez/storage/SettingsStorage.hx +++ b/src/haxe/ru/m/puzzlez/storage/SettingsStorage.hx @@ -1,6 +1,6 @@ package ru.m.puzzlez.storage; -import haxework.storage.SharedObjectStorage; +import hw.storage.SharedObjectStorage; import ru.m.puzzlez.render.Background; @:provide class SettingsStorage extends SharedObjectStorage { diff --git a/src/haxe/ru/m/puzzlez/view/GameFrame.hx b/src/haxe/ru/m/puzzlez/view/GameFrame.hx index ba4983f..72a922d 100644 --- a/src/haxe/ru/m/puzzlez/view/GameFrame.hx +++ b/src/haxe/ru/m/puzzlez/view/GameFrame.hx @@ -1,9 +1,9 @@ package ru.m.puzzlez.view; import haxe.Timer; -import haxework.view.frame.FrameSwitcher; -import haxework.view.frame.FrameView; -import haxework.view.popup.ConfirmView; +import hw.view.frame.FrameSwitcher; +import hw.view.frame.FrameView; +import hw.view.popup.ConfirmView; import promhx.Promise; import ru.m.puzzlez.core.Game; import ru.m.puzzlez.core.GameEvent; diff --git a/src/haxe/ru/m/puzzlez/view/GameFrame.yaml b/src/haxe/ru/m/puzzlez/view/GameFrame.yaml index 583d8b5..fc8ad53 100644 --- a/src/haxe/ru/m/puzzlez/view/GameFrame.yaml +++ b/src/haxe/ru/m/puzzlez/view/GameFrame.yaml @@ -1,30 +1,30 @@ --- style: frame layout: - $type: haxework.view.layout.HorizontalLayout + $type: hw.view.layout.HorizontalLayout views: - - $type: haxework.view.group.VGroupView + - $type: hw.view.group.VGroupView geometry.height: 100% geometry.padding: 5 layout.margin: 10 views: - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView style: icon.image +onPress: ~showPreview() - - $type: haxework.view.SpriteView + - $type: hw.view.SpriteView geometry.stretch: true - - $type: haxework.view.form.ToggleButtonView + - $type: hw.view.form.ToggleButtonView style: icon.lock on: true +onPress: | ~button -> { render.manager.locked = !render.manager.locked; - cast(button, haxework.view.form.ToggleButtonView).on = !render.manager.locked; + cast(button, hw.view.form.ToggleButtonView).on = !render.manager.locked; } - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView style: icon.restore +onPress: ~render.manager.reset() - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView style: icon.setting geometry.margin.top: 30 +onPress: ~choiseBackground() @@ -32,7 +32,7 @@ views: $type: ru.m.puzzlez.render.Render geometry.width: 100% geometry.height: 100% - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView style: icon.close geometry.position: absolute geometry.hAlign: right diff --git a/src/haxe/ru/m/puzzlez/view/ImageListFrame.hx b/src/haxe/ru/m/puzzlez/view/ImageListFrame.hx index 40d46e6..9633063 100644 --- a/src/haxe/ru/m/puzzlez/view/ImageListFrame.hx +++ b/src/haxe/ru/m/puzzlez/view/ImageListFrame.hx @@ -1,9 +1,9 @@ package ru.m.puzzlez.view; -import haxework.view.form.ButtonView; -import haxework.view.form.LabelView; -import haxework.view.frame.FrameSwitcher; -import haxework.view.frame.FrameView; +import hw.view.form.ButtonView; +import hw.view.form.LabelView; +import hw.view.frame.FrameSwitcher; +import hw.view.frame.FrameView; import ru.m.puzzlez.core.ImageListSource; import ru.m.puzzlez.FileUtil; import ru.m.puzzlez.source.FileSource; diff --git a/src/haxe/ru/m/puzzlez/view/ImageListFrame.yaml b/src/haxe/ru/m/puzzlez/view/ImageListFrame.yaml index 787eef3..d1352a4 100644 --- a/src/haxe/ru/m/puzzlez/view/ImageListFrame.yaml +++ b/src/haxe/ru/m/puzzlez/view/ImageListFrame.yaml @@ -2,17 +2,17 @@ style: frame views: - id: header - $type: haxework.view.form.LabelView + $type: hw.view.form.LabelView style: label.header - id: images $type: ru.m.puzzlez.view.common.ImageDataList geometry.stretch: true - id: select - $type: haxework.view.form.ButtonView + $type: hw.view.form.ButtonView text: Select... +onPress: ~selectFile() visible: false - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView text: Back geometry.position: absolute geometry.hAlign: right diff --git a/src/haxe/ru/m/puzzlez/view/LoadingWrapper.hx b/src/haxe/ru/m/puzzlez/view/LoadingWrapper.hx index ae4dc87..a202dd4 100644 --- a/src/haxe/ru/m/puzzlez/view/LoadingWrapper.hx +++ b/src/haxe/ru/m/puzzlez/view/LoadingWrapper.hx @@ -1,13 +1,13 @@ package ru.m.puzzlez.view; -import haxework.view.form.LabelView; +import hw.view.form.LabelView; import flash.text.TextFormatAlign; -import haxework.view.geometry.HAlign; -import haxework.view.geometry.Position; -import haxework.view.geometry.VAlign; -import haxework.view.group.IGroupView; -import haxework.view.IView; -import haxework.view.text.TextView; +import hw.view.geometry.HAlign; +import hw.view.geometry.Position; +import hw.view.geometry.VAlign; +import hw.view.group.IGroupView; +import hw.view.IView; +import hw.view.text.TextView; import promhx.Promise; enum State { diff --git a/src/haxe/ru/m/puzzlez/view/PresetFrame.hx b/src/haxe/ru/m/puzzlez/view/PresetFrame.hx index 9271fdc..d4c2a7d 100644 --- a/src/haxe/ru/m/puzzlez/view/PresetFrame.hx +++ b/src/haxe/ru/m/puzzlez/view/PresetFrame.hx @@ -1,10 +1,10 @@ package ru.m.puzzlez.view; -import haxework.geom.IntPoint; -import haxework.view.data.DataView; -import haxework.view.form.ToggleButtonView; -import haxework.view.frame.FrameSwitcher; -import haxework.view.frame.FrameView; +import hw.geom.IntPoint; +import hw.view.data.DataView; +import hw.view.form.ToggleButtonView; +import hw.view.frame.FrameSwitcher; +import hw.view.frame.FrameView; import ru.m.puzzlez.core.GameUtil; import ru.m.puzzlez.core.Id; import ru.m.puzzlez.storage.ImageStorage; diff --git a/src/haxe/ru/m/puzzlez/view/PresetFrame.yaml b/src/haxe/ru/m/puzzlez/view/PresetFrame.yaml index 9a6b909..f3adc65 100644 --- a/src/haxe/ru/m/puzzlez/view/PresetFrame.yaml +++ b/src/haxe/ru/m/puzzlez/view/PresetFrame.yaml @@ -2,24 +2,24 @@ style: frame layout.margin: 10 views: - - $type: haxework.view.form.LabelView + - $type: hw.view.form.LabelView text: Puzzle configure style: label.header - - $type: haxework.view.group.HGroupView + - $type: hw.view.group.HGroupView geometry.width: 100% layout.hAlign: center layout.vAlign: middle views: - id: sizes - $type: haxework.view.data.DataView + $type: hw.view.data.DataView layout: - $type: haxework.view.layout.TailLayout + $type: hw.view.layout.TailLayout hAlign: center stretch: true margin: 5 factory: ~factory +onDataSelect: ~selectSize - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView style: button.active geometry.margin.left: 15 text: Start @@ -28,7 +28,7 @@ views: $type: ru.m.puzzlez.view.common.PresetView geometry.stretch: true geometry.margin: 15 - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView text: Back geometry.position: absolute geometry.hAlign: right diff --git a/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx b/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx index 7b373b6..4112850 100644 --- a/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx +++ b/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.hx @@ -2,9 +2,9 @@ package ru.m.puzzlez.view; import flash.events.KeyboardEvent; import flash.ui.Keyboard; -import haxework.view.form.ButtonView; -import haxework.view.frame.FrameSwitcher; -import haxework.view.group.VGroupView; +import hw.view.form.ButtonView; +import hw.view.frame.FrameSwitcher; +import hw.view.group.VGroupView; import hw.app.App; @:template class PuzzlezAppView extends VGroupView { diff --git a/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml b/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml index 2ea0ed6..a218621 100644 --- a/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml +++ b/src/haxe/ru/m/puzzlez/view/PuzzlezAppView.yaml @@ -1,6 +1,6 @@ --- views: - - $type: haxework.view.frame.FrameSwitcher + - $type: hw.view.frame.FrameSwitcher id: switcher geometry.stretch: true style: dark @@ -10,7 +10,7 @@ views: _preset_: {$class: ru.m.puzzlez.view.PresetFrame} _game_: {$class: ru.m.puzzlez.view.GameFrame} - id: fullscreen - $type: haxework.view.form.ButtonView + $type: hw.view.form.ButtonView geometry.position: absolute geometry.hAlign: right geometry.vAlign: bottom diff --git a/src/haxe/ru/m/puzzlez/view/StartFrame.hx b/src/haxe/ru/m/puzzlez/view/StartFrame.hx index fc952a9..b821458 100644 --- a/src/haxe/ru/m/puzzlez/view/StartFrame.hx +++ b/src/haxe/ru/m/puzzlez/view/StartFrame.hx @@ -1,9 +1,9 @@ package ru.m.puzzlez.view; -import haxework.view.data.DataView; -import haxework.view.form.ButtonView; -import haxework.view.frame.FrameSwitcher; -import haxework.view.frame.FrameView; +import hw.view.data.DataView; +import hw.view.form.ButtonView; +import hw.view.frame.FrameSwitcher; +import hw.view.frame.FrameView; import ru.m.data.IDataSource; import ru.m.pixabay.PixabayApi; import ru.m.puzzlez.core.GameState.GameStatus; diff --git a/src/haxe/ru/m/puzzlez/view/StartFrame.yaml b/src/haxe/ru/m/puzzlez/view/StartFrame.yaml index 16f016c..f498e1c 100644 --- a/src/haxe/ru/m/puzzlez/view/StartFrame.yaml +++ b/src/haxe/ru/m/puzzlez/view/StartFrame.yaml @@ -1,24 +1,24 @@ --- style: frame views: - - $type: haxework.view.group.HGroupView + - $type: hw.view.group.HGroupView geometry.hAlign: center geometry.margin.top: 15 layout.vAlign: middle views: - - $type: haxework.view.ImageView + - $type: hw.view.ImageView image: $a:image:resources/icon.png stretch: false fillType: CONTAIN geometry.width: 96 geometry.height: 96 - - $type: haxework.view.form.LabelView + - $type: hw.view.form.LabelView text: $r:text:app.name font.size: 50 - id: sources - $type: haxework.view.data.DataView + $type: hw.view.data.DataView layout: - $type: haxework.view.layout.TailLayout + $type: hw.view.layout.TailLayout rowSize: 5 margin: 10 vAlign: middle @@ -27,28 +27,28 @@ views: +onDataSelect: ~load geometry.margin: 5 overflow.y: scroll - - $type: haxework.view.group.HGroupView + - $type: hw.view.group.HGroupView geometry.width: 100% layout.vAlign: middle layout.margin: 10 views: - id: load - $type: haxework.view.form.ButtonView + $type: hw.view.form.ButtonView text: Load +onPress: ~games('started') - id: complete - $type: haxework.view.form.ButtonView + $type: hw.view.form.ButtonView text: Complete +onPress: ~games('complete') - - $type: haxework.view.SpriteView + - $type: hw.view.SpriteView geometry.width: 100% - - $type: haxework.view.form.LabelView + - $type: hw.view.form.LabelView text: $r:text:app.version geometry.position: absolute geometry.hAlign: right geometry.vAlign: top - id: update - $type: haxework.view.form.ButtonView + $type: hw.view.form.ButtonView style: button.active geometry.position: absolute geometry.hAlign: left diff --git a/src/haxe/ru/m/puzzlez/view/common/ImageDataList.hx b/src/haxe/ru/m/puzzlez/view/common/ImageDataList.hx index 31b2be2..bbebad3 100644 --- a/src/haxe/ru/m/puzzlez/view/common/ImageDataList.hx +++ b/src/haxe/ru/m/puzzlez/view/common/ImageDataList.hx @@ -1,10 +1,10 @@ package ru.m.puzzlez.view.common; -import haxework.view.data.DataView; -import haxework.view.form.ToggleButtonView; -import haxework.view.frame.FrameSwitcher; -import haxework.view.group.VGroupView; -import haxework.view.popup.ConfirmView; +import hw.view.data.DataView; +import hw.view.form.ToggleButtonView; +import hw.view.frame.FrameSwitcher; +import hw.view.group.VGroupView; +import hw.view.popup.ConfirmView; import ru.m.data.IDataSource; import ru.m.puzzlez.core.Id; import ru.m.puzzlez.source.FileSource; diff --git a/src/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml b/src/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml index 97c0a15..712c0d1 100644 --- a/src/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml +++ b/src/haxe/ru/m/puzzlez/view/common/ImageDataList.yaml @@ -1,9 +1,9 @@ --- views: - id: images - $type: haxework.view.data.ActionDataView + $type: hw.view.data.ActionDataView layout: - $type: haxework.view.layout.TailLayout + $type: hw.view.layout.TailLayout rowSize: 3 margin: 5 vAlign: middle diff --git a/src/haxe/ru/m/puzzlez/view/common/PaginatorView.hx b/src/haxe/ru/m/puzzlez/view/common/PaginatorView.hx index b0e2e19..731740f 100644 --- a/src/haxe/ru/m/puzzlez/view/common/PaginatorView.hx +++ b/src/haxe/ru/m/puzzlez/view/common/PaginatorView.hx @@ -1,9 +1,9 @@ package ru.m.puzzlez.view.common; -import haxework.signal.Signal; -import haxework.view.data.DataView; -import haxework.view.form.ToggleButtonView; -import haxework.view.layout.TailLayout; +import hw.signal.Signal; +import hw.view.data.DataView; +import hw.view.form.ToggleButtonView; +import hw.view.layout.TailLayout; import ru.m.data.IDataSource.DataPage; enum PaginatorAction { diff --git a/src/haxe/ru/m/puzzlez/view/common/PresetView.hx b/src/haxe/ru/m/puzzlez/view/common/PresetView.hx index bd9a416..d0a7dbf 100644 --- a/src/haxe/ru/m/puzzlez/view/common/PresetView.hx +++ b/src/haxe/ru/m/puzzlez/view/common/PresetView.hx @@ -3,7 +3,7 @@ package ru.m.puzzlez.view.common; import flash.display.BitmapData; import flash.display.Graphics; import flash.display.Shape; -import haxework.view.group.GroupView; +import hw.view.group.GroupView; import ru.m.puzzlez.core.GameState; import ru.m.puzzlez.render.RenderUtil; import ru.m.puzzlez.storage.ImageStorage; diff --git a/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx b/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx index 241a57a..2b2b64e 100644 --- a/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx +++ b/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.hx @@ -1,10 +1,10 @@ package ru.m.puzzlez.view.common; -import haxework.view.data.DataView; -import haxework.view.form.ButtonView; -import haxework.view.form.LabelView; -import haxework.view.group.GroupView; -import haxework.view.ImageView; +import hw.view.data.DataView; +import hw.view.form.ButtonView; +import hw.view.form.LabelView; +import hw.view.group.GroupView; +import hw.view.ImageView; import ru.m.puzzlez.core.GameUtil; import ru.m.puzzlez.core.Id; import ru.m.puzzlez.source.FileSource; diff --git a/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml b/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml index 20e13f7..7211f42 100644 --- a/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml +++ b/src/haxe/ru/m/puzzlez/view/common/PuzzleImageView.yaml @@ -2,19 +2,19 @@ style: view views: - id: image - $type: haxework.view.ImageView + $type: hw.view.ImageView geometry.stretch: true stretch: false fillType: COVER - id: label - $type: haxework.view.form.LabelView + $type: hw.view.form.LabelView - id: remove - $type: haxework.view.form.ButtonView + $type: hw.view.form.ButtonView propagation: false style: icon.control.small.close.red +onPress: ~emit(Action.REMOVE) - id: clean - $type: haxework.view.form.ButtonView + $type: hw.view.form.ButtonView propagation: false style: icon.control.small.close.orange +onPress: ~emit(Action.CLEAN) diff --git a/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx b/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx index c242b65..8bba205 100644 --- a/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx +++ b/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.hx @@ -1,12 +1,12 @@ package ru.m.puzzlez.view.popup; -import haxework.color.Color; -import haxework.view.data.DataView; -import haxework.view.form.ButtonView; -import haxework.view.popup.PopupView; -import haxework.view.skin.Skin; -import haxework.view.SpriteView; -import haxework.view.utils.DrawUtil; +import hw.color.Color; +import hw.view.data.DataView; +import hw.view.form.ButtonView; +import hw.view.popup.PopupView; +import hw.view.skin.Skin; +import hw.view.SpriteView; +import hw.view.utils.DrawUtil; import openfl.Assets; import openfl.utils.AssetType; import promhx.Promise; diff --git a/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml b/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml index 08fac98..1c2895c 100644 --- a/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml +++ b/src/haxe/ru/m/puzzlez/view/popup/BackgroundPopup.yaml @@ -1,6 +1,6 @@ --- view: - $type: haxework.view.group.VGroupView + $type: hw.view.group.VGroupView geometry.width: 660 geometry.height: 200 geometry.padding: 10 @@ -9,41 +9,41 @@ view: layout.margin: 10 style: frame views: - - $type: haxework.view.group.HGroupView + - $type: hw.view.group.HGroupView geometry.width: 100% layout.margin: 10 views: - id: header text: Choise background - $type: haxework.view.form.LabelView + $type: hw.view.form.LabelView - id: selected - $type: haxework.view.SpriteView + $type: hw.view.SpriteView geometry.width: 100% geometry.height: 200 - id: colors - $type: haxework.view.data.DataView + $type: hw.view.data.DataView factory: ~colorButtonFactory geometry.width: 100% layout: - $type: haxework.view.layout.TailLayout + $type: hw.view.layout.TailLayout margin: 5 +onDataSelect: ~(color) -> selected = COLOR(color) - id: textures - $type: haxework.view.data.DataView + $type: hw.view.data.DataView factory: ~textureButtonFactory geometry.width: 100% layout: - $type: haxework.view.layout.TailLayout + $type: hw.view.layout.TailLayout margin: 5 +onDataSelect: ~(imageId) -> selected = IMAGE(imageId) - - $type: haxework.view.group.HGroupView + - $type: hw.view.group.HGroupView geometry.width: 100% layout.hAlign: center layout.margin: 10 views: - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView text: Default +onPress: ~close(NONE) - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView text: OK +onPress: ~close(selected) diff --git a/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx b/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx index 7ed4f4a..125f45c 100644 --- a/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx +++ b/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.hx @@ -1,7 +1,7 @@ package ru.m.puzzlez.view.popup; import flash.events.MouseEvent; -import haxework.view.popup.PopupView; +import hw.view.popup.PopupView; import promhx.Promise; import ru.m.puzzlez.core.GameState; import ru.m.puzzlez.view.common.PresetView; diff --git a/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml b/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml index 0f72223..db884dc 100644 --- a/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml +++ b/src/haxe/ru/m/puzzlez/view/popup/PreviewPopup.yaml @@ -1,6 +1,6 @@ --- view: - $type: haxework.view.group.VGroupView + $type: hw.view.group.VGroupView geometry.width: 100% geometry.height: 100% geometry.padding: 10 @@ -9,21 +9,21 @@ view: layout.margin: 10 style: frame views: - - $type: haxework.view.group.HGroupView + - $type: hw.view.group.HGroupView geometry.width: 100% layout.margin: 10 views: - id: header text: Image preview - $type: haxework.view.form.LabelView + $type: hw.view.form.LabelView - id: preview $type: ru.m.puzzlez.view.common.PresetView geometry.stretch: true - - $type: haxework.view.group.HGroupView + - $type: hw.view.group.HGroupView geometry.width: 100% layout.hAlign: center layout.margin: 10 views: - - $type: haxework.view.form.ButtonView + - $type: hw.view.form.ButtonView text: OK +onPress: ~close(null) diff --git a/src/haxe/ru/m/skin/ButtonSVGSkin.hx b/src/haxe/ru/m/skin/ButtonSVGSkin.hx index d25443a..5835751 100644 --- a/src/haxe/ru/m/skin/ButtonSVGSkin.hx +++ b/src/haxe/ru/m/skin/ButtonSVGSkin.hx @@ -1,13 +1,13 @@ package ru.m.skin; import format.SVG; -import haxework.color.Color; -import haxework.view.form.ButtonView; -import haxework.view.form.ToggleButtonView; -import haxework.view.skin.ISkin; +import hw.color.Color; +import hw.view.form.ButtonView; +import hw.view.form.ToggleButtonView; +import hw.view.skin.ISkin; using StringTools; -using haxework.color.ColorUtil; +using hw.color.ColorUtil; @:style class ButtonSVGSkin implements ISkin { diff --git a/src/haxe/ru/m/update/Updater.hx b/src/haxe/ru/m/update/Updater.hx index 4997d6e..7295b5a 100644 --- a/src/haxe/ru/m/update/Updater.hx +++ b/src/haxe/ru/m/update/Updater.hx @@ -1,6 +1,6 @@ package ru.m.update; -import haxework.net.JsonLoader; +import hw.net.JsonLoader; import openfl.Lib; import openfl.net.URLRequest; import promhx.Promise;