Skip to content

Commit

Permalink
lightpreview: show area in status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
ericwa committed Oct 3, 2024
1 parent 3ec5ef4 commit 47faf6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lightpreview/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,7 @@ void MainWindow::displayCameraPositionInfo()
const qvec3f forward = glView->cameraForward();

std::string leaf_type;
int32_t area = -1;
{
const auto *bsp = std::get_if<mbsp_t>(&m_bspdata.bsp);
if (!bsp)
Expand All @@ -1078,10 +1079,12 @@ void MainWindow::displayCameraPositionInfo()
if (leaf) {
auto *game = bsp->loadversion->game;
leaf_type = game->create_contents_from_native(leaf->contents).to_string();

area = leaf->area;
}
}

std::string cpp_str = fmt::format("pos ({}) forward ({}) contents ({})", point, forward, leaf_type);
std::string cpp_str = fmt::format("pos ({}) forward ({}) contents ({}) area ({})", point, forward, leaf_type, area);

m_cameraStatus->setText(QString::fromStdString(cpp_str));
}

0 comments on commit 47faf6c

Please sign in to comment.