diff --git a/src/dn/Process.hx b/src/dn/Process.hx index 143dff0..a924514 100644 --- a/src/dn/Process.hx +++ b/src/dn/Process.hx @@ -83,6 +83,12 @@ class Process { var children : FixedArray; #end + public var stageWid(get,never) : Int; + public var stageHei(get,never) : Int; + + public var scaleStageWid(get,never) : Int; inline function get_scaleStageWid() return M.ceil( w() / (root!=null?root.scaleX:1) ); + public var scaleStageHei(get,never) : Int; inline function get_scaleStageHei() return M.ceil( h() / (root!=null?root.scaleY:1) ); + /** Delayer allows for callbacks to be called in a future frame **/ public var delayer : dn.Delayer; @@ -393,27 +399,36 @@ class Process { /** Get graphical context width **/ - public inline function w(){ + @:noCompletion @:deprecated("Use stageWid variable instead") + public inline function w() return stageWid; + + inline function get_stageWid(){ if( CUSTOM_STAGE_WIDTH > 0 ) return CUSTOM_STAGE_WIDTH; + #if heaps - return hxd.Window.getInstance().width; + return hxd.Window.getInstance().width; #else - return 1; + return 1; #end } /** Get graphical context height **/ - public inline function h(){ + @:noCompletion @:deprecated("Use stageHei variable instead") + public inline function h() return stageHei; + + inline function get_stageHei(){ if( CUSTOM_STAGE_HEIGHT > 0 ) return CUSTOM_STAGE_HEIGHT; + #if heaps - return hxd.Window.getInstance().height; + return hxd.Window.getInstance().height; #else - return 1; + return 1; #end } + inline function anyParentPaused() { return parent!=null ? parent.isPaused() : false; }