Beispiel #1
0
 public static Rect Calc(Rect world, CLUI_Border scale, CLUI_Border pos)
 {
     return Rect.MinMaxRect(
         world.xMin + world.width * scale.x + pos.x,
         world.yMin + world.height * scale.y + pos.y,
         world.xMin + world.width * scale.x2 + pos.x2,
         world.yMin + world.height * scale.y2 + pos.y2);
 }
Beispiel #2
0
 public static Rect Calc(Rect world, CLUI_Border scale, CLUI_Border pos)
 {
     return(Rect.MinMaxRect(
                world.xMin + world.width * scale.x + pos.x,
                world.yMin + world.height * scale.y + pos.y,
                world.xMin + world.width * scale.x2 + pos.x2,
                world.yMin + world.height * scale.y2 + pos.y2));
 }
Beispiel #3
0
 public static Rect CalcFromFullScreen(CLUI_Border scale, CLUI_Border pos)
 {
     return Rect.MinMaxRect(
        Screen.width * scale.x + pos.x,
        Screen.height * scale.y + pos.y,
        Screen.width * scale.x2 + pos.x2,
        Screen.height * scale.y2 + pos.y2
        );
 }
Beispiel #4
0
 public static Rect CalcFromFullScreen(CLUI_Border scale, CLUI_Border pos)
 {
     return(Rect.MinMaxRect(
                Screen.width * scale.x + pos.x,
                Screen.height * scale.y + pos.y,
                Screen.width * scale.x2 + pos.x2,
                Screen.height * scale.y2 + pos.y2
                ));
 }
Beispiel #5
0
 protected virtual void OnUpdate()
 {
     if (parent == null)
     {
         rectWorld = CLUI_Border.CalcFromFullScreen(_rectScale, _rectPos);
     }
     else
     {
         rectWorld = CLUI_Border.Calc(parent.rectWorld, _rectScale, _rectPos);
     }
 }