Grid Y axis adjusts properly with toolbar width, and when gui is turned off
This commit is contained in:
parent
8f0ca434d6
commit
2f2f08b3df
1 changed files with 1 additions and 1 deletions
|
|
@ -341,7 +341,7 @@ void WorldGrid::draw_coordinates(SkCanvas* canvas, const DrawData& drawData, Vec
|
|||
if(coordinatesAxisOnBounds)
|
||||
boundsCamSpace = SCollision::AABB<float>(drawData.cam.c.to_space(bounds.value().min), drawData.cam.c.to_space(bounds.value().max));
|
||||
else {
|
||||
float toolbarXLength = drawData.main->toolbar.final_gui_scale() * 80.0f;
|
||||
float toolbarXLength = drawData.main->drawGui ? drawData.main->toolbar.final_gui_scale() * (50.0f + drawData.main->toolbar.io->theme->padding1 * 3.0f) : 0.0f;
|
||||
boundsCamSpace = SCollision::AABB<float>({toolbarXLength + axisOffset.x(), 0.0f}, {drawData.cam.viewingArea.x(), drawData.cam.viewingArea.y() - axisOffset.y()});
|
||||
if(boundsCamSpace.width() < 100.0f || boundsCamSpace.height() < 100.0f)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue