FrogPilot setup - Determine if the map is open

This commit is contained in:
FrogAi
2024-07-31 19:16:57 -07:00
parent e70d6969fd
commit 482a9042fc
3 changed files with 16 additions and 0 deletions
+8
View File
@@ -41,3 +41,11 @@ void MapPanel::toggleMapSettings() {
emit mapPanelRequested();
show();
}
void MapPanel::showEvent(QShowEvent *event) {
uiState()->scene.map_open = true;
}
void MapPanel::hideEvent(QHideEvent *event) {
uiState()->scene.map_open = false;
}
+4
View File
@@ -18,4 +18,8 @@ public slots:
private:
QStackedLayout *content_stack;
// FrogPilot widgets
void hideEvent(QHideEvent *event);
void showEvent(QShowEvent *event);
};
+4
View File
@@ -101,6 +101,10 @@ typedef struct UIScene {
bool started, ignition, is_metric, map_on_left, longitudinal_control;
bool world_objects_visible = false;
uint64_t started_frame;
// FrogPilot variables
bool map_open;
} UIScene;
class UIState : public QObject {