aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/Body.hpp3
-rw-r--r--include/ResourceLoader.hpp (renamed from include/FontLoader.hpp)12
-rw-r--r--include/Text.hpp2
3 files changed, 13 insertions, 4 deletions
diff --git a/include/Body.hpp b/include/Body.hpp
index 236a02d..43e2946 100644
--- a/include/Body.hpp
+++ b/include/Body.hpp
@@ -174,7 +174,7 @@ namespace QuickMedia {
BodyItem* get_selected() const;
std::shared_ptr<BodyItem> get_selected_shared();
- // Returns null if not visible item
+ // Returns null if no visible items. This is the item we can see the end of
BodyItem* get_last_fully_visible_item();
void clamp_selection();
@@ -205,6 +205,7 @@ namespace QuickMedia {
void set_page_scroll(float scroll) { page_scroll = scroll; }
float get_page_scroll() const { return page_scroll; }
+ // This is the item we can see the end of
bool is_last_item_fully_visible() const { return last_item_fully_visible; }
bool is_body_full_with_items() const { return items_cut_off; }
diff --git a/include/FontLoader.hpp b/include/ResourceLoader.hpp
index bff0f18..a332ba4 100644
--- a/include/FontLoader.hpp
+++ b/include/ResourceLoader.hpp
@@ -1,9 +1,12 @@
#pragma once
-#include <string>
-
namespace sf {
class Font;
+ class Texture;
+}
+
+namespace QuickMedia {
+ void set_resource_loader_root_path(const char *resource_root);
}
namespace QuickMedia::FontLoader {
@@ -16,4 +19,9 @@ namespace QuickMedia::FontLoader {
// Note: not thread-safe
sf::Font* get_font(FontType font_type);
+}
+
+namespace QuickMedia::TextureLoader {
+ // Note: not thread-safe
+ sf::Texture* get_texture(const char *filepath);
} \ No newline at end of file
diff --git a/include/Text.hpp b/include/Text.hpp
index f102c59..135a89c 100644
--- a/include/Text.hpp
+++ b/include/Text.hpp
@@ -139,7 +139,7 @@ namespace QuickMedia
sf::String str; // TODO: Remove this for non-editable text??? also replace with std::string? then we get more efficient editing of text
const bool bold_font;
unsigned int characterSize;
- sf::VertexArray vertices[2];
+ sf::VertexArray vertices[3];
float maxWidth;
sf::Vector2f position;
sf::Color color;