mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-29 12:48:47 +00:00
完善对多屏幕的支持
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2021.06.13) Improved support for multiple screens
|
||||||
* (2021.06.12) Add `iconStyle` `align` parameter to set the horizontal alignment of the icon
|
* (2021.06.12) Add `iconStyle` `align` parameter to set the horizontal alignment of the icon
|
||||||
* (2021.06.12) Optimized import of `Theme` and automatic font refresh (#148)
|
* (2021.06.12) Optimized import of `Theme` and automatic font refresh (#148)
|
||||||
* (2021.06.10) Fixed compatibility issues with `Unity` version (#154)
|
* (2021.06.10) Fixed compatibility issues with `Unity` version (#154)
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2021.06.13) 完善对多屏幕的支持
|
||||||
* (2021.06.12) 增加`IconStyle`的`align`参数设置图标的水平对齐
|
* (2021.06.12) 增加`IconStyle`的`align`参数设置图标的水平对齐
|
||||||
* (2021.06.12) 优化主题`Theme`的导入和字体自动刷新 (#148)
|
* (2021.06.12) 优化主题`Theme`的导入和字体自动刷新 (#148)
|
||||||
* (2021.06.10) 修复`Unity`版本兼容问题 (#154)
|
* (2021.06.10) 修复`Unity`版本兼容问题 (#154)
|
||||||
|
|||||||
@@ -166,6 +166,9 @@ namespace XCharts
|
|||||||
|
|
||||||
public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)
|
public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)
|
||||||
{
|
{
|
||||||
|
#if ! UNITY_EDITOR
|
||||||
|
screenPoint = Display.RelativeMouseAt(screenPoint);
|
||||||
|
#endif
|
||||||
var cam = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
|
var cam = canvas.renderMode == RenderMode.ScreenSpaceOverlay ? null : canvas.worldCamera;
|
||||||
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform,
|
if (!RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform,
|
||||||
screenPoint, cam, out chartPoint))
|
screenPoint, cam, out chartPoint))
|
||||||
|
|||||||
Reference in New Issue
Block a user