Skip to content

Commit

Permalink
Profiler: Fix cat display on small screens.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed Dec 30, 2017
1 parent 267b9a6 commit 4871b1e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions UI/ProfilerDraw.cpp
Expand Up @@ -94,6 +94,10 @@ void DrawProfile(UIContext &ui) {
}
legendWidth += 20.0f;

if (legendHeight > ui.GetBounds().h) {
legendHeight = ui.GetBounds().h;
}

float legendStartY = legendHeight > ui.GetBounds().centerY() ? ui.GetBounds().y2() - legendHeight : ui.GetBounds().centerY();
float legendStartX = ui.GetBounds().x2() - std::min(legendWidth, 200.0f);

Expand Down

0 comments on commit 4871b1e

Please sign in to comment.