Sets hard cap so #743 doesnt have to happen.

This commit is contained in:
eh-K 2026-03-06 17:05:49 -06:00 committed by GitHub
parent f254af3d0c
commit 2198ac5d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,11 +92,32 @@ void UIScene_DebugSetCamera::onDirectEditFinished(UIControl_TextInput *input, UI
double val = 0; double val = 0;
if (!value.empty()) val = _fromString<double>(value); if (!value.empty()) val = _fromString<double>(value);
if (input == &m_textInputX) currentPosition->m_camX = val; if (input == &m_textInputX)
else if (input == &m_textInputY) currentPosition->m_camY = val; {
else if (input == &m_textInputZ) currentPosition->m_camZ = val; currentPosition->m_camX = val;
else if (input == &m_textInputYRot) currentPosition->m_yRot = val; if (val > 30000000) currentPosition->m_camX = 30000000;
else if (input == &m_textInputElevation) currentPosition->m_elev = val;
}
else if (input == &m_textInputY)
{
currentPosition->m_camY = val;
if (val > 300) currentPosition->m_camY = 300;
if (val < -16) currentPosition->m_camY = 70;
}
else if (input == &m_textInputZ)
{
currentPosition->m_camZ = val;
if (val > 30000000) currentPosition->m_camZ = 30000000;
}
else if (input == &m_textInputYRot)
{
currentPosition->m_yRot = val;
}
else if (input == &m_textInputElevation)
{
currentPosition->m_elev = val;
}
} }
bool UIScene_DebugSetCamera::handleMouseClick(F32 x, F32 y) bool UIScene_DebugSetCamera::handleMouseClick(F32 x, F32 y)