aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/MessageBoard.hpp6
-rw-r--r--include/Text.hpp2
-rw-r--r--include/Theme.hpp17
3 files changed, 25 insertions, 0 deletions
diff --git a/include/MessageBoard.hpp b/include/MessageBoard.hpp
index e84396d..a4dc5a6 100644
--- a/include/MessageBoard.hpp
+++ b/include/MessageBoard.hpp
@@ -24,6 +24,9 @@ namespace dchat
private:
void updateStaticContentTexture(const sf::Vector2u &newSize);
void addMessage(Message *message);
+
+ void drawDefault(sf::RenderWindow &window, Cache &cache);
+ void drawSimple(sf::RenderWindow &window, Cache &cache);
private:
sf::RenderTexture staticContentTexture;
bool dirty;
@@ -37,5 +40,8 @@ namespace dchat
sf::Clock frameTimer;
double totalHeight;
bool scrollToBottom;
+ sf::Vector2f backgroundSizeWithoutPadding;
+ sf::Vector2f backgroundSize;
+ sf::Vector2f backgroundPos;
};
}
diff --git a/include/Text.hpp b/include/Text.hpp
index 4bb5ec0..016e852 100644
--- a/include/Text.hpp
+++ b/include/Text.hpp
@@ -24,6 +24,7 @@ namespace dchat
void setMaxWidth(float maxWidth);
void setCharacterSize(unsigned int characterSize);
void setFillColor(sf::Color color);
+ void setLineSpacing(float lineSpacing);
// Warning: won't update until @draw is called
float getHeight() const;
@@ -61,6 +62,7 @@ namespace dchat
bool dirty;
bool plainText;
float totalHeight;
+ float lineSpacing;
std::vector<TextElement> textElements;
};
}
diff --git a/include/Theme.hpp b/include/Theme.hpp
new file mode 100644
index 0000000..19f3200
--- /dev/null
+++ b/include/Theme.hpp
@@ -0,0 +1,17 @@
+#pragma once
+
+namespace dchat
+{
+ class Theme
+ {
+ public:
+ enum class Type
+ {
+ DEFAULT,
+ SIMPLE
+ };
+
+ static Type getType();
+ static void setType(Type type);
+ };
+}