summaryrefslogtreecommitdiff
path: root/src/gui/widgets/chattab.h
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-11-13 05:44:22 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-01-09 06:55:07 +0100
commitf54cd905f49d08116bf988bcb4451beb168cbd48 (patch)
treefe1b9eebd4941fe44cee48cfd2818a7239b2ac07 /src/gui/widgets/chattab.h
parent734cf89900cde0526043429c3028cb69616f7cb8 (diff)
downloadmana-client-f54cd905f49d08116bf988bcb4451beb168cbd48.tar.gz
mana-client-f54cd905f49d08116bf988bcb4451beb168cbd48.tar.bz2
mana-client-f54cd905f49d08116bf988bcb4451beb168cbd48.tar.xz
mana-client-f54cd905f49d08116bf988bcb4451beb168cbd48.zip
Made the chat text much more readable in every opacity case.
I added text shadow and outline support to the browserbox, and made it adapt the text for the chattabs depending on the GUI opacity. Reviewed-by: Ablu.
Diffstat (limited to 'src/gui/widgets/chattab.h')
-rw-r--r--src/gui/widgets/chattab.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/widgets/chattab.h b/src/gui/widgets/chattab.h
index bc139079..1b666da1 100644
--- a/src/gui/widgets/chattab.h
+++ b/src/gui/widgets/chattab.h
@@ -34,7 +34,7 @@ class ScrollArea;
/**
* A tab for the chat window. This is special to ease chat handling.
*/
-class ChatTab : public Tab, public AutoCompleteLister
+class ChatTab : public Tab, public AutoCompleteLister, public EventListener
{
public:
ChatTab(const std::string &name);
@@ -102,6 +102,8 @@ class ChatTab : public Tab, public AutoCompleteLister
virtual void saveToLogFile(std::string &msg);
+ void event(Event::Channel channel, const Event &event);
+
protected:
friend class ChatWindow;
friend class WhisperWindow;
@@ -112,6 +114,12 @@ class ChatTab : public Tab, public AutoCompleteLister
virtual void handleCommand(const std::string &msg);
+ /**
+ * Adapts the text format to the current gui opacity,
+ * for better readability.
+ */
+ void updateTextFormat(int alpha);
+
void addRow(std::string &line);
ScrollArea *mScrollArea;