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); }
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)); }
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 ); }
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 )); }
protected virtual void OnUpdate() { if (parent == null) { rectWorld = CLUI_Border.CalcFromFullScreen(_rectScale, _rectPos); } else { rectWorld = CLUI_Border.Calc(parent.rectWorld, _rectScale, _rectPos); } }