Fix property value panel layout update.
This commit is contained in:
@@ -24,10 +24,6 @@ namespace Cryville.Crtr.Browsing {
|
|||||||
const float SPEED = 8;
|
const float SPEED = 8;
|
||||||
float _ratio;
|
float _ratio;
|
||||||
#pragma warning disable IDE0051
|
#pragma warning disable IDE0051
|
||||||
void Start() {
|
|
||||||
m_handleArea.sizeDelta = new Vector2(m_handle.rect.height - m_handle.rect.width, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update() {
|
void Update() {
|
||||||
if (_value && _ratio != 1) {
|
if (_value && _ratio != 1) {
|
||||||
_ratio += SPEED * Time.deltaTime;
|
_ratio += SPEED * Time.deltaTime;
|
||||||
@@ -40,6 +36,10 @@ namespace Cryville.Crtr.Browsing {
|
|||||||
UpdateGraphics();
|
UpdateGraphics();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnRectTransformDimensionsChange() {
|
||||||
|
m_handleArea.sizeDelta = new Vector2(m_handle.rect.height - m_handle.rect.width, 0);
|
||||||
|
}
|
||||||
#pragma warning restore IDE0051
|
#pragma warning restore IDE0051
|
||||||
|
|
||||||
void UpdateGraphics() {
|
void UpdateGraphics() {
|
||||||
|
@@ -60,7 +60,6 @@ namespace Cryville.Crtr.Browsing {
|
|||||||
ev.callback.AddListener(e => OnPointerClick((PointerEventData)e));
|
ev.callback.AddListener(e => OnPointerClick((PointerEventData)e));
|
||||||
m_ctn.triggers.Add(ev);
|
m_ctn.triggers.Add(ev);
|
||||||
|
|
||||||
m_handleArea.sizeDelta = new Vector2(m_handle.rect.height - m_handle.rect.width, 0);
|
|
||||||
if (MaxStep != 0) SetRatio(0.5f);
|
if (MaxStep != 0) SetRatio(0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,6 +69,10 @@ namespace Cryville.Crtr.Browsing {
|
|||||||
SetValueFromPos(pp);
|
SetValueFromPos(pp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnRectTransformDimensionsChange() {
|
||||||
|
m_handleArea.sizeDelta = new Vector2(m_handle.rect.height - m_handle.rect.width, 0);
|
||||||
|
}
|
||||||
#pragma warning restore IDE0051
|
#pragma warning restore IDE0051
|
||||||
|
|
||||||
Vector2 pp;
|
Vector2 pp;
|
||||||
|
Reference in New Issue
Block a user