File tree 6 files changed +14
-14
lines changed
6 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -116,11 +116,11 @@ class Camera extends GameChildProcess {
116
116
}
117
117
118
118
function get_pxWid () {
119
- return M .ceil ( Game .ME .w () / Const .SCALE / zoom );
119
+ return M .ceil ( Game .ME .stageWid / Const .SCALE / zoom );
120
120
}
121
121
122
122
function get_pxHei () {
123
- return M .ceil ( Game .ME .h () / Const .SCALE / zoom );
123
+ return M .ceil ( Game .ME .stageHei / Const .SCALE / zoom );
124
124
}
125
125
126
126
Original file line number Diff line number Diff line change @@ -143,8 +143,8 @@ class Fx extends GameChildProcess {
143
143
public inline function flashBangS (c : Col , a : Float , t = 0.1 ) {
144
144
var e = new h2d. Bitmap (h2d. Tile .fromColor (c ,1 ,1 ,a ));
145
145
game .root .add (e , Const .DP_FX_FRONT );
146
- e .scaleX = game .w () ;
147
- e .scaleY = game .h () ;
146
+ e .scaleX = game .stageWid ;
147
+ e .scaleY = game .stageHei ;
148
148
e .blendMode = Add ;
149
149
game .tw .createS (e .alpha , 0 , t ).end ( function () {
150
150
e .remove ();
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ class Hud extends GameChildProcess {
42
42
else
43
43
debugText .text + = " \n " + v ;
44
44
debugText .visible = true ;
45
- debugText .x = Std .int ( w () / Const .UI_SCALE - 4 - debugText .textWidth );
45
+ debugText .x = Std .int ( stageWid / Const .UI_SCALE - 4 - debugText .textWidth );
46
46
}
47
47
48
48
@@ -61,7 +61,7 @@ class Hud extends GameChildProcess {
61
61
// Text
62
62
var tf = new h2d. Text (Assets .fontPixel , f );
63
63
tf .text = str ;
64
- tf .maxWidth = 0.6 * w () / Const .UI_SCALE ;
64
+ tf .maxWidth = 0.6 * stageWid / Const .UI_SCALE ;
65
65
tf .textColor = 0xffffff ;
66
66
tf .filter = new dn.heaps.filter. PixelOutline ( color .toBlack (0.2 ) );
67
67
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ enum WindowAlign {
10
10
class Window extends dn. Process {
11
11
public static var ALL : Array <Window > = [];
12
12
13
- var uiWid (get ,never ) : Int ; inline function get_uiWid () return M .ceil ( w () / Const .UI_SCALE );
14
- var uiHei (get ,never ) : Int ; inline function get_uiHei () return M .ceil ( h () / Const .UI_SCALE );
13
+ var uiWid (get ,never ) : Int ; inline function get_uiWid () return M .ceil ( stageWid / Const .UI_SCALE );
14
+ var uiHei (get ,never ) : Int ; inline function get_uiHei () return M .ceil ( stageHei / Const .UI_SCALE );
15
15
16
16
public var content : h2d. Flow ;
17
17
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ class DebugWindow extends ui.Window {
22
22
override function onResize () {
23
23
super .onResize ();
24
24
switch verticalAlign {
25
- case Start ,End : content .maxHeight = Std .int ( 0.4 * h () / Const .UI_SCALE );
26
- case Center : content .maxHeight = Std .int ( 0.8 * h () / Const .UI_SCALE );
27
- case Fill : content .maxHeight = Std .int ( h () / Const .UI_SCALE );
25
+ case Start ,End : content .maxHeight = Std .int ( 0.4 * stageHei / Const .UI_SCALE );
26
+ case Center : content .maxHeight = Std .int ( 0.8 * stageHei / Const .UI_SCALE );
27
+ case Fill : content .maxHeight = Std .int ( stageHei / Const .UI_SCALE );
28
28
}
29
29
}
30
30
Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ class SimpleMenu extends ui.Window {
25
25
override function onResize () {
26
26
super .onResize ();
27
27
switch verticalAlign {
28
- case Start ,End : content .maxHeight = Std .int ( 0.4 * h () / Const .UI_SCALE );
29
- case Center : content .maxHeight = Std .int ( 0.8 * h () / Const .UI_SCALE );
30
- case Fill : content .maxHeight = Std .int ( h () / Const .UI_SCALE );
28
+ case Start ,End : content .maxHeight = Std .int ( 0.4 * stageHei / Const .UI_SCALE );
29
+ case Center : content .maxHeight = Std .int ( 0.8 * stageHei / Const .UI_SCALE );
30
+ case Fill : content .maxHeight = Std .int ( stageHei / Const .UI_SCALE );
31
31
}
32
32
}
33
33
You can’t perform that action at this time.
0 commit comments