@@ -46,7 +46,6 @@ IncludeScript("challenge_traitors_enums.nut");
4646FONT_DEFAULTLARGE <- self.LookupFont(" DefaultMedium" );
4747
4848xMargin <- 0;
49- yMargin <- 0;
5049
5150function Paint () {
5251 // 如果正在控制士兵,显示信息。
@@ -87,11 +86,6 @@ function PaintMsg(point, role, font, message) {
8786 self. PaintRectangle (ScreenHeight () * 0.315 , ScreenHeight () * 0.91 , xMargin, ScreenHeight (), 0 , 0 , 0 , alpha);
8887 self. PaintRectangle (ScreenWidth () - xMargin, 0 , ScreenWidth (), ScreenHeight (), 0 , 0 , 0 , alpha);
8988 }
90- if (yMargin != 0 ) {
91- self. PaintRectangle (0 , 0 , ScreenWidth (), yMargin, 0 , 0 , 0 , alpha);
92- // self.PaintRectangle(0, ScreenHeight() - yMargin, ScreenWidth() / 10, ScreenHeight(), 0, 0, 0, alpha);
93- self. PaintRectangle (ScreenWidth () / 10 * 2.4 , ScreenHeight () - yMargin, ScreenWidth (), ScreenHeight (), 0 , 0 , 0 , alpha);
94- }
9589 local xOffset = point[0 ] >= textHalfWidth + 20 ? 0 : textHalfWidth + 20 - point[0 ];
9690 point[0 ] += xOffset;
9791 if (role <= ROLE. MAX_IAF_TEAM ) {
@@ -124,9 +118,6 @@ function SetMargin() {
124118 if (ScreenWidth (). tofloat () / ScreenHeight (). tofloat () > 16.0 / 9.0 ) {
125119 xMargin = ((ScreenWidth (). tofloat () - ScreenHeight (). tofloat () * 16.0 / 9.0 ) / 2.0 ). tointeger ();
126120 }
127- if (ScreenWidth (). tofloat () / ScreenHeight (). tofloat () < 16.0 / 10.0 ) {
128- yMargin = ((ScreenHeight (). tofloat () - ScreenWidth (). tofloat () / 16.0 * 10.0 ) / 2.0 ). tointeger ();;
129- }
130121}
131122
132123// pass in a value from 0.0 to 1.0, 0.0 means the left side of the screen, 1.0 means the right, 0.5 in the middle
@@ -136,5 +127,5 @@ function ScreenPosX(fraction) {
136127
137128// pass in a value from 0.0 to 1.0, 0.0 means the up side of the screen, 1.0 means the down, 0.5 in the middle
138129function ScreenPosY (fraction) {
139- return yMargin + ( ScreenHeight () - 2 * yMargin ) * fraction;
130+ return ScreenHeight () * fraction;
140131}
0 commit comments