mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-21 05:17:37 +00:00
Support for viewing BMP files in File Manager and setting as Splash screen (#1242)
* Use filesystem::path type vs string for BMP file name * Use filesystem::path type vs string for BMP files * Use a global const file path string for "/splash.bmp" * Support for viewing BMP files and setting as Splash screen * Support for viewing BMP files and setting as Splash screen * Support for viewing BMP files and setting as Splash screen * Update ui_ss_viewer.cpp * Update ui_ss_viewer.hpp
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
|
||||
namespace ui {
|
||||
|
||||
extern const std::filesystem::path splash_dot_bmp;
|
||||
|
||||
class ScreenshotViewer : public View {
|
||||
public:
|
||||
ScreenshotViewer(NavigationView& nav, const std::filesystem::path& path);
|
||||
@@ -42,6 +44,19 @@ class ScreenshotViewer : public View {
|
||||
std::filesystem::path path_{};
|
||||
};
|
||||
|
||||
class SplashViewer : public View {
|
||||
public:
|
||||
SplashViewer(NavigationView& nav, const std::filesystem::path& path);
|
||||
bool on_key(KeyEvent key) override;
|
||||
void paint(Painter& painter) override;
|
||||
void update_ss(void);
|
||||
|
||||
private:
|
||||
NavigationView& nav_;
|
||||
std::filesystem::path path_{};
|
||||
bool valid_image{};
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
|
||||
#endif // __UI_SS_VIEWER_H__
|
||||
|
Reference in New Issue
Block a user