aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ImageViewer.hpp8
-rw-r--r--include/QuickMedia.hpp7
2 files changed, 14 insertions, 1 deletions
diff --git a/include/ImageViewer.hpp b/include/ImageViewer.hpp
index fb1e5e3..ed3363d 100644
--- a/include/ImageViewer.hpp
+++ b/include/ImageViewer.hpp
@@ -25,10 +25,16 @@ namespace QuickMedia {
bool loaded;
};
+ enum class ImageViewerAction {
+ NONE,
+ RETURN,
+ SWITCH_TO_SINGLE_IMAGE_MODE
+ };
+
class ImageViewer {
public:
ImageViewer(Manga *manga, const std::string &images_url, const std::string &chapter_title, int current_page, const Path &chapter_cache_dir, sf::Font *font);
- bool draw(sf::RenderWindow &window);
+ ImageViewerAction draw(sf::RenderWindow &window);
// Returns page as 1 indexed
int get_focused_page() const;
int get_num_pages() const { return num_pages; }
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 387a5a5..8884c79 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -18,6 +18,11 @@
namespace QuickMedia {
class Plugin;
class Manga;
+
+ enum class ImageViewMode {
+ SINGLE,
+ SCROLL
+ };
class Program {
public:
@@ -85,5 +90,7 @@ namespace QuickMedia {
std::string resources_root;
bool use_tor = false;
bool use_system_mpv_config = false;
+ // TODO: Save this to config file when switching modes
+ ImageViewMode image_view_mode = ImageViewMode::SINGLE;
};
} \ No newline at end of file