alpha
alpha copied to clipboard
Camera set_size after onwindowsized
I'm seeing an issue where a camera's size is being reset after an onwindowsized event on mobile. On a home-button press (a suspend, basically) the camera's size and center are being reset, which is a bit of a problem. Adding a guard and a check after the if(!_connected)
check in Camera.hx:set_size (L193) seems to fix the problem, but I'm not sure if it's the best way to do things. Here's my guard:
if(_size != null && size != null) {
if( size.equals(_size)) {
return size;
}
}
Thoughts?
Sorry for the delay, can you elaborate on what what being reset means? The way the size mode works is that you give up some aspects in order to have the sizing handled for you, so I'm not sure I understand the bug symptom as described. If you had a test case that demonstrates it that would be even better, but screenshots/descriptions are good too.
ok after more direct discussion, the real issue is that position isn't handled well by the wip size modes. Meaning, if you set pos to a new value, and a resize happens, the center point is adjusted which resets your adjusted position.