[update] update to haxework renaming

This commit is contained in:
2020-03-24 20:59:47 +03:00
parent 83ed6cc076
commit 821ddbb2a7
47 changed files with 142 additions and 277 deletions

View File

@@ -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<Dynamic>;
private function set_view(value:IView<Dynamic>):IView<Dynamic> {
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<Bool> = 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<Dynamic>):IAnimate {
return new UnFadeAnimate(view);
}
private function createCloseAnimate(view:IView<Dynamic>):IAnimate {
return new FadeAnimate(view);
}
}

View File

@@ -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;
}
}

View File

@@ -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<Float> = [];
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;
}
}

View File

@@ -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";

View File

@@ -1,6 +1,6 @@
package ru.m.pixabay;
import haxework.net.JsonLoader;
import hw.net.JsonLoader;
import promhx.Promise;
import ru.m.data.IDataSource;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -1,6 +1,6 @@
package ru.m.puzzlez.core;
import haxework.geom.Point;
import hw.geom.Point;
enum GameAction {
PART_TAKE(id:Int);

View File

@@ -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 = {

View File

@@ -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;

View File

@@ -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;

View File

@@ -1,6 +1,6 @@
package ru.m.puzzlez.core;
import haxework.geom.Rectangle;
import hw.geom.Rectangle;
typedef PartBound = {
var spike:BoundType;

View File

@@ -1,6 +1,6 @@
package ru.m.puzzlez.core;
import haxework.geom.Point;
import hw.geom.Point;
enum PartLocation {
//PANEL(index:Int);

View File

@@ -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 {

View File

@@ -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<Dynamic> {

View File

@@ -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;

View File

@@ -1,6 +1,6 @@
package ru.m.puzzlez.render;
import haxework.view.form.LabelView;
import hw.view.form.LabelView;
class ProgressView extends LabelView {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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 {

View File

@@ -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;

View File

@@ -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

View File

@@ -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 {

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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;

View File

@@ -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

View File

@@ -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 {

View File

@@ -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;

View File

@@ -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;

View File

@@ -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)

View File

@@ -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;

View File

@@ -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)

View File

@@ -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;

View File

@@ -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)

View File

@@ -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<ButtonView> {

View File

@@ -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;