Bugfix: Black screen on furniture rearranging:
- The range model was not correctly handling the case that the viewport in which we were arranging furniture was bigger than the area that the room wanted to cover. This problem never occurred in 800x600 mode, but could occur at larger resolutions in smaller rooms (such as shacks). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3874 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -65,13 +65,17 @@ public class VirtualRangeModel
|
||||
value = MathUtil.bound(x, _hrange.getValue(), hmax - vb.width);
|
||||
_hrange.setRangeProperties(value, vb.width, x, hmax, false);
|
||||
} else {
|
||||
_hrange.setRangeProperties(0, vb.width, 0, vb.width, false);
|
||||
// Let's center it and lock it down.
|
||||
int newx = x - (vb.width - width)/2;
|
||||
_hrange.setRangeProperties(newx, 0, newx, newx, false);
|
||||
}
|
||||
if (height > vb.height) {
|
||||
value = MathUtil.bound(y, _vrange.getValue(), vmax - vb.height);
|
||||
_vrange.setRangeProperties(value, vb.height, y, vmax, false);
|
||||
} else {
|
||||
_vrange.setRangeProperties(0, vb.height, 0, vb.height, false);
|
||||
// Let's center it and lock it down.
|
||||
int newy = y - (vb.height - height)/2;
|
||||
_vrange.setRangeProperties(newy, 0, newy, newy, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user