modify layouter to fix height.
This commit is contained in:
Binary file not shown.
@@ -125,8 +125,8 @@ public class MultipleMonitorCreator : MonoBehaviour
|
||||
height = monitor.heightMeter;
|
||||
break;
|
||||
case ScaleMode.Fixed:
|
||||
width = scale * (monitor.isHorizontal ? 1f : monitor.aspect);
|
||||
height = scale * (monitor.isHorizontal ? 1f / monitor.aspect : 1f);
|
||||
width = scale * (monitor.isHorizontal ? monitor.aspect : 1f);
|
||||
height = scale * (monitor.isHorizontal ? 1f : 1f / monitor.aspect);
|
||||
break;
|
||||
case ScaleMode.Pixel:
|
||||
width = scale * (monitor.isHorizontal ? 1f : monitor.aspect) * ((float)monitor.width / 1920);
|
||||
|
||||
@@ -30,7 +30,7 @@ public class MultipleMonitorLayouter : MonoBehaviour
|
||||
|
||||
var totalWidth = 0f;
|
||||
foreach (var info in monitors) {
|
||||
var width = info.gameObject.transform.localEulerAngles.x * (info.mesh.bounds.extents.x * 2f);
|
||||
var width = info.gameObject.transform.localScale.x * (info.mesh.bounds.extents.x * 2f);
|
||||
totalWidth += width;
|
||||
}
|
||||
totalWidth += margin * (n - 1);
|
||||
@@ -38,7 +38,7 @@ public class MultipleMonitorLayouter : MonoBehaviour
|
||||
var x = -totalWidth / 2;
|
||||
|
||||
foreach (var info in monitors) {
|
||||
var width = info.gameObject.transform.localEulerAngles.x;
|
||||
var width = info.gameObject.transform.localScale.x;
|
||||
x += (width * info.mesh.bounds.extents.x);
|
||||
info.gameObject.transform.localPosition = new Vector3(x, 0f, 0f);
|
||||
info.gameObject.transform.localRotation = info.originalRotation;
|
||||
|
||||
Binary file not shown.
@@ -14,6 +14,7 @@ public enum Message
|
||||
|
||||
public enum CursorShapeType
|
||||
{
|
||||
Unspecified = 0,
|
||||
MonoChrome = 1,
|
||||
Color = 2,
|
||||
MaskedColor = 4,
|
||||
|
||||
Reference in New Issue
Block a user