From 47faf6c0be311915c44959804a270173aa4c207b Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Thu, 3 Oct 2024 00:05:48 -0600 Subject: [PATCH] lightpreview: show area in status bar --- lightpreview/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lightpreview/mainwindow.cpp b/lightpreview/mainwindow.cpp index b423fd73..509cd98a 100644 --- a/lightpreview/mainwindow.cpp +++ b/lightpreview/mainwindow.cpp @@ -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(&m_bspdata.bsp); if (!bsp) @@ -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)); }