From f7df74469073be1ad891eac90430a1346db929c1 Mon Sep 17 00:00:00 2001 From: Piotr Zarzycki Date: Thu, 1 Feb 2024 15:21:22 +0100 Subject: [PATCH 1/7] Update development to 0.8.22 (reference #108) --- project.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.xml b/project.xml index ba11179b..a709b153 100644 --- a/project.xml +++ b/project.xml @@ -5,7 +5,7 @@ - + From bdb59d3e5d20694449210a9b40c874fa515b4daf Mon Sep 17 00:00:00 2001 From: Piotr Zarzycki Date: Fri, 2 Feb 2024 10:15:45 +0100 Subject: [PATCH 2/7] Update hashes for NomadWeb 1.0.9 and 1.0.10 --- Source/superhuman/config/SuperHumanHashes.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/superhuman/config/SuperHumanHashes.hx b/Source/superhuman/config/SuperHumanHashes.hx index ec362449..7f9ffa40 100644 --- a/Source/superhuman/config/SuperHumanHashes.hx +++ b/Source/superhuman/config/SuperHumanHashes.hx @@ -13,7 +13,9 @@ class SuperHumanHashes "leap" => [ "installers" => [ { hash: "080235c0f0cce7cc3446e01ffccf0046", version: { majorVersion: "1", minorVersion: "0", patch: "5", fullVersion: "1.0.5" } } ]], "nomadweb" => [ "installers" => [ { hash: "044c7a71598f41cd3ddb88c5b4c9b403" }, { hash: "8f3e42f4f5105467c99cfd56b8b4a755", version: { majorVersion: "1", minorVersion: "0", patch: "6", fullVersion: "1.0.6"} }, - { hash: "fe2dd37e6d05ea832d8ecc4f0e1dbe80", version: { majorVersion: "1", minorVersion: "0", patch: "8", fullVersion: "1.0.8"} }]], + { hash: "fe2dd37e6d05ea832d8ecc4f0e1dbe80", version: { majorVersion: "1", minorVersion: "0", patch: "8", fullVersion: "1.0.8"} }, + { hash: "378880b838aeeb4db513ebf05a8a7285", version: { majorVersion: "1", minorVersion: "0", patch: "9", fullVersion: "1.0.9"} }, + { hash: "697d89eb78fa6c1512e0ee199fa0c97c", version: { majorVersion: "1", minorVersion: "0", patch: "10", fullVersion: "1.0.10"}}]], "traveler" => [ "installers" => [ { hash: "4a195e3282536de175a2979def40527d" }, { hash: "4118ee30d590289070f2d29ecf1b34cb", version: { majorVersion: "12", minorVersion: "0", patch: "2", fullVersion: "12.0.2" }}, { hash: "216807509d96f65c7a76b878fc4c4bd5", version: { majorVersion: "12", minorVersion: "0", patch: "2", fixPackVersion: "FP1", fullVersion: "12.0.2"} } ]], From 4e301b8ed4b362e4a1940e7eb1203133da8063e0 Mon Sep 17 00:00:00 2001 From: Piotr Zarzycki Date: Fri, 2 Feb 2024 12:32:17 +0100 Subject: [PATCH 3/7] Update some libs (reference #105) --- .github/workflows/macos-dev.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/macos-dev.yml b/.github/workflows/macos-dev.yml index 0af90973..c36c7791 100644 --- a/.github/workflows/macos-dev.yml +++ b/.github/workflows/macos-dev.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Haxe uses: krdlab/setup-haxe@v1.5.1 with: - haxe-version: 4.3.1 + haxe-version: 4.3.3 - name: Install dependencies run: | @@ -40,7 +40,7 @@ jobs: haxelib git lime-samples https://github.com/openfl/lime-samples haxelib git openfl https://github.com/openfl/openfl.git develop haxelib run openfl setup - haxelib install feathersui + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - name: Build project From 30138a8789de4c8a6af2a4d9baef026c5da9f2d9 Mon Sep 17 00:00:00 2001 From: Piotr Zarzycki Date: Fri, 2 Feb 2024 13:00:04 +0100 Subject: [PATCH 4/7] Try to fix DefaultPopUpManager (reference #105) --- .../feathers/core/DefaultPopUpManager.hx | 673 +++++++++--------- 1 file changed, 344 insertions(+), 329 deletions(-) diff --git a/Genesis/Source/feathers/core/DefaultPopUpManager.hx b/Genesis/Source/feathers/core/DefaultPopUpManager.hx index d03e1c83..a8d95734 100644 --- a/Genesis/Source/feathers/core/DefaultPopUpManager.hx +++ b/Genesis/Source/feathers/core/DefaultPopUpManager.hx @@ -1,336 +1,351 @@ /* Feathers UI - Copyright 2022 Bowler Hat LLC. All Rights Reserved. + Copyright 2023 Bowler Hat LLC. All Rights Reserved. This program is free software. You can redistribute and/or modify it in accordance with the terms of the accompanying license agreement. */ - package feathers.core; - - import openfl.display.DisplayObject; - import openfl.display.DisplayObjectContainer; - import openfl.display.Sprite; - import openfl.display.Stage; - import openfl.errors.ArgumentError; - import openfl.events.Event; - import openfl.geom.Point; - - /** - The default implementation of the `IPopUpManager` interface. - - @see `feathers.core.PopUpManager` - - @since 1.0.0 - **/ - class DefaultPopUpManager implements IPopUpManager { - private static function defaultOverlayFactory():DisplayObject { - var overlay = new Sprite(); - overlay.graphics.beginFill(0x222222, 0.75); - overlay.graphics.drawRect(0, 0, 1, 1); - overlay.graphics.endFill(); - return overlay; - } - - /** - Creates a new `DefaultPopUpManager` object with the given arguments. - - @since 1.0.0 - **/ - public function new(root:DisplayObjectContainer) { - this.root = root; - } - - private var _ignoreRemoval = false; - - private var _root:DisplayObjectContainer; - - /** - @see `feathers.core.IPopUpManager.root` - **/ - public var root(get, set):DisplayObjectContainer; - - private function get_root():DisplayObjectContainer { - return this._root; - } - - private function set_root(value:DisplayObjectContainer):DisplayObjectContainer { - if (this._root == value) { - return this._root; - } - if (value.stage == null) { - throw new ArgumentError("DefaultPopUpManager root's stage property must not be null."); - } - var oldIgnoreRemoval = this._ignoreRemoval; - this._ignoreRemoval = true; - for (popUp in this.popUps) { - this._root.removeChild(popUp); - var overlay = this._popUpToOverlay.get(popUp); - if (overlay != null) { - this._root.removeChild(overlay); - } - } - this._ignoreRemoval = oldIgnoreRemoval; - this._root = value; - for (popUp in this.popUps) { - var overlay = this._popUpToOverlay.get(popUp); - if (overlay != null) { - this._root.addChild(overlay); - } - this._root.addChild(popUp); - } - return this._root; - } - - private var popUps:Array = []; - - private var _centeredPopUps:Array = []; - - private var _popUpToOverlay:Map = []; - - private var _overlayFactory:() -> DisplayObject; - - /** - @see `feathers.core.IPopUpManager.overlayFactory` - **/ - public var overlayFactory(get, set):() -> DisplayObject; - - private function get_overlayFactory():() -> DisplayObject { - return this._overlayFactory; - } - - private function set_overlayFactory(value:() -> DisplayObject):() -> DisplayObject { - if (Reflect.compareMethods(this._overlayFactory, value)) { - return this._overlayFactory; - } - this._overlayFactory = value; - return this._overlayFactory; - } - - /** - @see `feathers.core.IPopUpManager.popUpCount` - **/ - public var popUpCount(get, never):Int; - - private function get_popUpCount():Int { - return this.popUps.length; - } - - /** - @see `feathers.core.IPopUpManager.topLevelPopUpCount` - **/ - public var topLevelPopUpCount(get, never):Int; - - private function get_topLevelPopUpCount():Int { - var count = 0; - var i = this.popUps.length - 1; - while (i >= 0) { - count++; - var popUp = this.popUps[i]; - var overlay = this._popUpToOverlay.get(popUp); - if (overlay != null) { - return count; - } - i--; - } - return count; - } - - /** - @see `feathers.core.IPopUpManager.getPopUpAt()` - **/ - public function getPopUpAt(index:Int):DisplayObject { - return this.popUps[index]; - } - - /** - @see `feathers.core.IPopUpManager.isPopUp` - **/ - public function isPopUp(target:DisplayObject):Bool { - return this.popUps.indexOf(target) != -1; - } - - /** - @see `feathers.core.IPopUpManager.isTopLevelPopUp` - **/ - public function isTopLevelPopUp(target:DisplayObject):Bool { - var i = this.popUps.length - 1; - while (i >= 0) { - var otherPopUp = this.popUps[i]; - if (otherPopUp == target) { - // we haven't encountered an overlay yet, so it is top-level - return true; - } - var overlay = this._popUpToOverlay.get(otherPopUp); - if (overlay != null) { - // this is the first overlay, and we haven't found the pop-up - // yet, so it is not top-level - return false; - } - i--; - } - return false; - } - - /** - @see `feathers.core.IPopUpManager.isModal` - **/ - public function isModal(target:DisplayObject):Bool { - if (target == null) { - return false; - } - return this._popUpToOverlay.get(target) != null; - } - - /** - @see `feathers.core.IPopUpManager.hasModalPopUps` - **/ - public function hasModalPopUps():Bool { - return this._popUpToOverlay.keyValueIterator().hasNext(); - } - - /** - @see `feathers.core.IPopUpManager.addPopUp` - **/ - public function addPopUp(popUp:DisplayObject, isModal:Bool = true, isCentered:Bool = true, ?customOverlayFactory:() -> DisplayObject):DisplayObject { - var index = this.popUps.indexOf(popUp); - if (index != -1) { - this.cleanupOverlay(popUp); - this.popUps.splice(index, 1); - } - if (isModal) { - if (customOverlayFactory == null) { - customOverlayFactory = this._overlayFactory; - } - if (customOverlayFactory == null) { - customOverlayFactory = DefaultPopUpManager.defaultOverlayFactory; - } - var overlay = customOverlayFactory(); - var stage = this._root.stage; - var stageTopLeft = this._root.globalToLocal(new Point()); - var stageBottomRight = this._root.globalToLocal(new Point(stage.stageWidth, stage.stageHeight)); - overlay.x = stageTopLeft.x; - overlay.y = stageTopLeft.y; - overlay.width = stageBottomRight.x - stageTopLeft.x; - overlay.height = stageBottomRight.y - stageTopLeft.y; - this._root.addChild(overlay); - this._popUpToOverlay.set(popUp, overlay); - } - - this.popUps.push(popUp); - - var result = this._root.addChild(popUp); - if (popUp.parent == null) { - this.cleanupOverlay(popUp); - this.popUps.remove(popUp); - return null; - } - - // this listener needs to be added after the pop-up is added to the - // root because the pop-up may not have been removed from its old - // parent yet, which will trigger the listener if it is added first. - popUp.addEventListener(Event.REMOVED_FROM_STAGE, defaultPopUpManager_popUp_removedFromStageHandler); - if (this.popUps.length == 1) { - this._root.stage.addEventListener(Event.RESIZE, defaultPopUpManager_stage_resizeHandler, false, 0, true); - } - if (isCentered) { - if ((popUp is IMeasureObject)) { - var measurePopUp = cast(popUp, IMeasureObject); - measurePopUp.addEventListener(Event.RESIZE, defaultPopUpManager_popUp_resizeHandler); - } - this._centeredPopUps.push(popUp); - this.centerPopUp(popUp); - } - return result; - } - - /** - @see `feathers.core.IPopUpManager.removePopUp` - **/ - public function removePopUp(popUp:DisplayObject):DisplayObject { - var index = this.popUps.indexOf(popUp); - if (index == -1) { - return popUp; - } - return this._root.removeChild(popUp); - } - - /** - @see `feathers.core.IPopUpManager.removePopUp` - **/ - public function removeAllPopUps():Void { - // removing pop-ups may call event listeners that add new pop-ups, - // and we don't want to remove the new ones or miss old ones, so - // create a copy of the popUps array to be safe. - var popUps = this.popUps.copy(); - for (popUp in popUps) { - // we check if this is still a pop-up because it might have been - // removed in an Event.REMOVED or Event.REMOVED_FROM_STAGE - // listener for another pop-up earlier in the loop - if (this.isPopUp(popUp)) { - this.removePopUp(popUp); - } - } - } - - /** - @see `feathers.core.IPopUpManager.centerPopUp` - **/ - public function centerPopUp(popUp:DisplayObject):Void { - if ((popUp is IValidating)) { - cast(popUp, IValidating).validateNow(); - } - var stage = this._root.stage; - var stageTopLeft = this._root.globalToLocal(new Point()); - var stageBottomRight = this._root.globalToLocal(new Point(stage.stageWidth, stage.stageHeight)); - popUp.x = stageTopLeft.x + (stageBottomRight.x - stageTopLeft.x - popUp.width) / 2.0; - popUp.y = stageTopLeft.y + (stageBottomRight.y - stageTopLeft.y - popUp.height) / 2.0; - } - - private function cleanupOverlay(popUp:DisplayObject):Void { - var overlay = this._popUpToOverlay.get(popUp); - if (overlay == null) { - return; - } - this._root.removeChild(overlay); - this._popUpToOverlay.remove(popUp); - } - - private function defaultPopUpManager_popUp_removedFromStageHandler(event:Event):Void { - if (this._ignoreRemoval) { - return; - } - var popUp = cast(event.currentTarget, DisplayObject); - popUp.removeEventListener(Event.REMOVED_FROM_STAGE, defaultPopUpManager_popUp_removedFromStageHandler); - this.popUps.remove(popUp); - this.cleanupOverlay(popUp); - - if (this.popUps.length == 0) { - this._root.stage.removeEventListener(Event.RESIZE, defaultPopUpManager_stage_resizeHandler); - } - } - - private function defaultPopUpManager_popUp_resizeHandler(event:Event):Void { - var popUp = cast(event.currentTarget, DisplayObject); - this.centerPopUp(popUp); - } - - private function defaultPopUpManager_stage_resizeHandler(event:Event):Void { - var stage = cast(event.currentTarget, Stage); - var stageTopLeft = this._root.globalToLocal(new Point()); - var stageBottomRight = this._root.globalToLocal(new Point(stage.stageWidth, stage.stageHeight)); - for (popUp in popUps) { - var overlay = this._popUpToOverlay.get(popUp); - if (overlay != null) { - overlay.x = stageTopLeft.x; - overlay.y = stageTopLeft.y; - overlay.width = stageBottomRight.x - stageTopLeft.x; - overlay.height = stageBottomRight.y - stageTopLeft.y; - } - } - for (popUp in this._centeredPopUps) { - this.centerPopUp(popUp); - } - } - } - \ No newline at end of file +package feathers.core; + +import openfl.display.DisplayObject; +import openfl.display.DisplayObjectContainer; +import openfl.display.Sprite; +import openfl.display.Stage; +import openfl.errors.ArgumentError; +import openfl.errors.Error; +import openfl.events.Event; +import openfl.geom.Point; + +/** + The default implementation of the `IPopUpManager` interface. + + @see `feathers.core.PopUpManager` + + @since 1.0.0 +**/ +class DefaultPopUpManager implements IPopUpManager { + private static function defaultOverlayFactory():DisplayObject { + var overlay = new Sprite(); + overlay.graphics.beginFill(0x808080, 0.75); + overlay.graphics.drawRect(0, 0, 1, 1); + overlay.graphics.endFill(); + return overlay; + } + + /** + Creates a new `DefaultPopUpManager` object with the given arguments. + + @since 1.0.0 + **/ + public function new(root:DisplayObjectContainer) { + this.root = root; + } + + private var _ignoreRemoval = false; + + private var _root:DisplayObjectContainer; + + /** + @see `feathers.core.IPopUpManager.root` + **/ + public var root(get, set):DisplayObjectContainer; + + private function get_root():DisplayObjectContainer { + return this._root; + } + + private function set_root(value:DisplayObjectContainer):DisplayObjectContainer { + if (this._root == value) { + return this._root; + } + if (value.stage == null) { + throw new ArgumentError("DefaultPopUpManager root's stage property must not be null."); + } + var oldIgnoreRemoval = this._ignoreRemoval; + this._ignoreRemoval = true; + for (popUp in this.popUps) { + this._root.removeChild(popUp); + var overlay = this._popUpToOverlay.get(popUp); + if (overlay != null) { + this._root.removeChild(overlay); + } + } + this._ignoreRemoval = oldIgnoreRemoval; + this._root = value; + for (popUp in this.popUps) { + var overlay = this._popUpToOverlay.get(popUp); + if (overlay != null) { + this._root.addChild(overlay); + } + this._root.addChild(popUp); + } + return this._root; + } + + private var popUps:Array = []; + + private var _centeredPopUps:Array = []; + + private var _popUpToOverlay:Map = []; + + private var _overlayFactory:() -> DisplayObject; + + /** + @see `feathers.core.IPopUpManager.overlayFactory` + **/ + public var overlayFactory(get, set):() -> DisplayObject; + + private function get_overlayFactory():() -> DisplayObject { + return this._overlayFactory; + } + + private function set_overlayFactory(value:() -> DisplayObject):() -> DisplayObject { + if (Reflect.compareMethods(this._overlayFactory, value)) { + return this._overlayFactory; + } + this._overlayFactory = value; + return this._overlayFactory; + } + + /** + @see `feathers.core.IPopUpManager.popUpCount` + **/ + public var popUpCount(get, never):Int; + + private function get_popUpCount():Int { + return this.popUps.length; + } + + /** + @see `feathers.core.IPopUpManager.topLevelPopUpCount` + **/ + public var topLevelPopUpCount(get, never):Int; + + private function get_topLevelPopUpCount():Int { + var count = 0; + var i = this.popUps.length - 1; + while (i >= 0) { + count++; + var popUp = this.popUps[i]; + var overlay = this._popUpToOverlay.get(popUp); + if (overlay != null) { + return count; + } + i--; + } + return count; + } + + /** + @see `feathers.core.IPopUpManager.getPopUpAt()` + **/ + public function getPopUpAt(index:Int):DisplayObject { + return this.popUps[index]; + } + + /** + @see `feathers.core.IPopUpManager.isPopUp` + **/ + public function isPopUp(target:DisplayObject):Bool { + return this.popUps.indexOf(target) != -1; + } + + /** + @see `feathers.core.IPopUpManager.isTopLevelPopUp` + **/ + public function isTopLevelPopUp(target:DisplayObject):Bool { + var i = this.popUps.length - 1; + while (i >= 0) { + var otherPopUp = this.popUps[i]; + if (otherPopUp == target) { + // we haven't encountered an overlay yet, so it is top-level + return true; + } + var overlay = this._popUpToOverlay.get(otherPopUp); + if (overlay != null) { + // this is the first overlay, and we haven't found the pop-up + // yet, so it is not top-level + return false; + } + i--; + } + return false; + } + + /** + @see `feathers.core.IPopUpManager.isModal` + **/ + public function isModal(target:DisplayObject):Bool { + if (target == null) { + return false; + } + return this._popUpToOverlay.get(target) != null; + } + + /** + @see `feathers.core.IPopUpManager.hasModalPopUps` + **/ + public function hasModalPopUps():Bool { + return this._popUpToOverlay.keyValueIterator().hasNext(); + } + + /** + @see `feathers.core.IPopUpManager.addPopUp` + **/ + public function addPopUp(popUp:DisplayObject, isModal:Bool = true, isCentered:Bool = true, ?customOverlayFactory:() -> DisplayObject):DisplayObject { + var index = this.popUps.indexOf(popUp); + if (index != -1) { + this.cleanupOverlay(popUp); + this.popUps.splice(index, 1); + } + if (isModal) { + if (customOverlayFactory == null) { + customOverlayFactory = this._overlayFactory; + } + if (customOverlayFactory == null) { + customOverlayFactory = DefaultPopUpManager.defaultOverlayFactory; + } + var overlay = customOverlayFactory(); + var stage = this._root.stage; + var stageTopLeft = this._root.globalToLocal(new Point()); + var stageBottomRight = this._root.globalToLocal(new Point(stage.stageWidth, stage.stageHeight)); + overlay.x = stageTopLeft.x; + overlay.y = stageTopLeft.y; + overlay.width = stageBottomRight.x - stageTopLeft.x; + overlay.height = stageBottomRight.y - stageTopLeft.y; + this._root.addChild(overlay); + this._popUpToOverlay.set(popUp, overlay); + } + + this.popUps.push(popUp); + + var result = this._root.addChild(popUp); + if (popUp.parent == null) { + this.cleanupOverlay(popUp); + this.popUps.remove(popUp); + return null; + } + + // this listener needs to be added after the pop-up is added to the + // root because the pop-up may not have been removed from its old + // parent yet, which will trigger the listener if it is added first. + popUp.addEventListener(Event.REMOVED_FROM_STAGE, defaultPopUpManager_popUp_removedFromStageHandler); + if (this.popUps.length == 1) { + this._root.stage.addEventListener(Event.RESIZE, defaultPopUpManager_stage_resizeHandler, false, 0, true); + } + if (isCentered) { + if ((popUp is IMeasureObject)) { + var measurePopUp:IMeasureObject = cast popUp; + measurePopUp.addEventListener(Event.RESIZE, defaultPopUpManager_popUp_resizeHandler); + } + this._centeredPopUps.push(popUp); + this.centerPopUp(popUp); + } + return result; + } + + /** + @see `feathers.core.IPopUpManager.removePopUp` + **/ + public function removePopUp(popUp:DisplayObject):DisplayObject { + var index = this.popUps.indexOf(popUp); + if (index == -1) { + return popUp; + } + return this._root.removeChild(popUp); + } + + /** + @see `feathers.core.IPopUpManager.removePopUp` + **/ + public function removeAllPopUps():Void { + // removing pop-ups may call event listeners that add new pop-ups, + // and we don't want to remove the new ones or miss old ones, so + // create a copy of the popUps array to be safe. + var popUps = this.popUps.copy(); + for (popUp in popUps) { + // we check if this is still a pop-up because it might have been + // removed in an Event.REMOVED or Event.REMOVED_FROM_STAGE + // listener for another pop-up earlier in the loop + if (this.isPopUp(popUp)) { + this.removePopUp(popUp); + } + } + } + + /** + @see `feathers.core.IPopUpManager.centerPopUp` + **/ + public function centerPopUp(popUp:DisplayObject):Void { + if ((popUp is IValidating)) { + (cast popUp : IValidating).validateNow(); + } + var stage = this._root.stage; + var stageTopLeft = this._root.globalToLocal(new Point()); + var stageBottomRight = this._root.globalToLocal(new Point(stage.stageWidth, stage.stageHeight)); + popUp.x = stageTopLeft.x + (stageBottomRight.x - stageTopLeft.x - popUp.width) / 2.0; + popUp.y = stageTopLeft.y + (stageBottomRight.y - stageTopLeft.y - popUp.height) / 2.0; + } + + /** + @see `feathers.core.IPopUpManager.bringToFront` + **/ + public function bringToFront(popUp:DisplayObject):Void { + if (!this.popUps.remove(popUp)) { + throw new Error("Not a popup"); + } + this.popUps.push(popUp); + var overlay = this._popUpToOverlay.get(popUp); + if (overlay != null) { + this._root.setChildIndex(overlay, this._root.numChildren - 1); + } + this._root.setChildIndex(popUp, this._root.numChildren - 1); + } + + private function cleanupOverlay(popUp:DisplayObject):Void { + var overlay = this._popUpToOverlay.get(popUp); + if (overlay == null) { + return; + } + this._root.removeChild(overlay); + this._popUpToOverlay.remove(popUp); + } + + private function defaultPopUpManager_popUp_removedFromStageHandler(event:Event):Void { + if (this._ignoreRemoval) { + return; + } + var popUp = cast(event.currentTarget, DisplayObject); + popUp.removeEventListener(Event.REMOVED_FROM_STAGE, defaultPopUpManager_popUp_removedFromStageHandler); + this.popUps.remove(popUp); + this.cleanupOverlay(popUp); + + if (this.popUps.length == 0) { + this._root.stage.removeEventListener(Event.RESIZE, defaultPopUpManager_stage_resizeHandler); + } + } + + private function defaultPopUpManager_popUp_resizeHandler(event:Event):Void { + var popUp = cast(event.currentTarget, DisplayObject); + this.centerPopUp(popUp); + } + + private function defaultPopUpManager_stage_resizeHandler(event:Event):Void { + var stage = cast(event.currentTarget, Stage); + var stageTopLeft = this._root.globalToLocal(new Point()); + var stageBottomRight = this._root.globalToLocal(new Point(stage.stageWidth, stage.stageHeight)); + for (popUp in popUps) { + var overlay = this._popUpToOverlay.get(popUp); + if (overlay != null) { + overlay.x = stageTopLeft.x; + overlay.y = stageTopLeft.y; + overlay.width = stageBottomRight.x - stageTopLeft.x; + overlay.height = stageBottomRight.y - stageTopLeft.y; + } + } + for (popUp in this._centeredPopUps) { + this.centerPopUp(popUp); + } + } +} \ No newline at end of file From 629523421923115074d8ca447bab9e8fdaa26b51 Mon Sep 17 00:00:00 2001 From: Piotr Zarzycki Date: Fri, 2 Feb 2024 13:52:35 +0100 Subject: [PATCH 5/7] Update haxe libs for other platforms (reference #105) --- .github/workflows/linux-dev.yml | 4 ++-- .github/workflows/windows-dev.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-dev.yml b/.github/workflows/linux-dev.yml index 3866f65a..031a0ee4 100644 --- a/.github/workflows/linux-dev.yml +++ b/.github/workflows/linux-dev.yml @@ -21,14 +21,14 @@ jobs: - name: Set up Haxe uses: krdlab/setup-haxe@v1.5.1 with: - haxe-version: 4.3.1 + haxe-version: 4.3.3 - name: Install dependencies run: | haxelib install hxcpp haxelib git openfl https://github.com/openfl/openfl.git develop haxelib run openfl setup - haxelib install feathersui + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - name: Build project diff --git a/.github/workflows/windows-dev.yml b/.github/workflows/windows-dev.yml index 076b20d3..560c0aac 100644 --- a/.github/workflows/windows-dev.yml +++ b/.github/workflows/windows-dev.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Haxe uses: krdlab/setup-haxe@v1.5.1 with: - haxe-version: 4.3.1 + haxe-version: 4.3.3 - name: Install dependencies run: | @@ -40,7 +40,7 @@ jobs: haxelib git lime-samples https://github.com/openfl/lime-samples haxelib git openfl https://github.com/openfl/openfl.git develop haxelib run openfl setup - haxelib install feathersui + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - name: Build project From c61f000a75ef68a1f3c54b69837ea4a0dd4cb300 Mon Sep 17 00:00:00 2001 From: Piotr Zarzycki Date: Fri, 2 Feb 2024 13:56:56 +0100 Subject: [PATCH 6/7] Update some packages for prod (reference #105) --- .github/workflows/linux-prod.yml | 4 ++-- .github/workflows/macos-prod.yml | 4 ++-- .github/workflows/windows-prod.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux-prod.yml b/.github/workflows/linux-prod.yml index cd79763a..98b6e097 100644 --- a/.github/workflows/linux-prod.yml +++ b/.github/workflows/linux-prod.yml @@ -21,14 +21,14 @@ jobs: - name: Set up Haxe uses: krdlab/setup-haxe@v1.5.1 with: - haxe-version: 4.3.1 + haxe-version: 4.3.3 - name: Install dependencies run: | haxelib install hxcpp haxelib git openfl https://github.com/openfl/openfl.git develop haxelib run openfl setup - haxelib install feathersui + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - name: Build project diff --git a/.github/workflows/macos-prod.yml b/.github/workflows/macos-prod.yml index 824bae55..25ebc15e 100644 --- a/.github/workflows/macos-prod.yml +++ b/.github/workflows/macos-prod.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Haxe uses: krdlab/setup-haxe@v1.5.1 with: - haxe-version: 4.3.1 + haxe-version: 4.3.3 - name: Install dependencies run: | @@ -40,7 +40,7 @@ jobs: haxelib git lime-samples https://github.com/openfl/lime-samples haxelib git openfl https://github.com/openfl/openfl.git develop haxelib run openfl setup - haxelib install feathersui + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - name: Build project diff --git a/.github/workflows/windows-prod.yml b/.github/workflows/windows-prod.yml index a2ef9484..b6906da9 100644 --- a/.github/workflows/windows-prod.yml +++ b/.github/workflows/windows-prod.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Haxe uses: krdlab/setup-haxe@v1.5.1 with: - haxe-version: 4.3.1 + haxe-version: 4.3.3 - name: Install dependencies run: | @@ -40,7 +40,7 @@ jobs: haxelib git lime-samples https://github.com/openfl/lime-samples haxelib git openfl https://github.com/openfl/openfl.git develop haxelib run openfl setup - haxelib install feathersui + haxelib git feathersui https://github.com/feathersui/feathersui-openfl.git haxelib git champaign https://github.com/Moonshine-IDE/Champaign.git - name: Build project From f365bbfa70128fc3fee11b0fcab99abd5348f920 Mon Sep 17 00:00:00 2001 From: Piotr Zarzycki Date: Fri, 2 Feb 2024 14:37:42 +0100 Subject: [PATCH 7/7] Make sure console is not null (reference #105) --- Source/superhuman/server/Server.hx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/superhuman/server/Server.hx b/Source/superhuman/server/Server.hx index 1a04681a..cc126855 100644 --- a/Source/superhuman/server/Server.hx +++ b/Source/superhuman/server/Server.hx @@ -647,8 +647,10 @@ class Server { function _batchCopyComplete() { Logger.debug( '${this}: Setting working directory to ${_serverDir}' ); - console.appendText( LanguageManager.getInstance().getString( 'serverpage.server.console.setworkingdirectory', _serverDir ) ); - + if (console != null) { + console.appendText( LanguageManager.getInstance().getString( 'serverpage.server.console.setworkingdirectory', _serverDir ) ); + } + _saveSafeId(); if ( !_provisioner.hostFileExists ) _provisioner.saveHostsFile(); @@ -659,7 +661,6 @@ class Server { } _startVagrantUp(); - } function _saveSafeId() {