Skip to content

Commit

Permalink
Show Toolbar when touch Map Screen
Browse files Browse the repository at this point in the history
  • Loading branch information
jgauchia committed Aug 15, 2024
1 parent 34b8ef4 commit c13cd04
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/gui/src/mainScr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "mainScr.hpp"
#include "globalGuiDef.h"
#include "settings.hpp"
#include "tft.hpp"


Expand Down Expand Up @@ -419,6 +420,17 @@ void updateSatTrack(lv_event_t *event)
#endif
}

/**
* @brief Tool Bar Event
*
* @param event
*/
void toolBarEvent(lv_event_t *event)
{
showToolBar = !showToolBar;
lv_obj_send_event(mapTile, LV_EVENT_REFRESH, NULL);
}

/**
* @brief Create Main Screen
*
Expand Down Expand Up @@ -566,6 +578,7 @@ void createMainScr()
// Map Tile Events
lv_obj_add_event_cb(mapTile, updateMap, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_add_event_cb(mainScreen, getZoomValue, LV_EVENT_GESTURE, NULL);
lv_obj_add_event_cb(mapTile, toolBarEvent, LV_EVENT_CLICKED, NULL);

// Navigation Tile
// TODO
Expand Down
1 change: 1 addition & 0 deletions lib/gui/src/mainScr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ void drawMapWidgets();
void updateMap(lv_event_t *event);
void activeGnssEvent(lv_event_t *event);
void updateSatTrack(lv_event_t *event);
void toolBarEvent(lv_event_t *event);

void createMainScr();

Expand Down

0 comments on commit c13cd04

Please sign in to comment.