aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-07-03 03:10:50 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-03 03:10:50 +0200
commit13681189d41f3d5c6c132d92b7451fea151fb713 (patch)
treeafd0f7fc51179cdd4f9180daa5e30117d7aec30c /include
parent59295d52e65deaba992df55c5fe2ad4f52fa3046 (diff)
bind I to switching between single image and scroll 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