aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/aoapplication.h9
-rw-r--r--include/aooptionsdialog.h6
-rw-r--r--include/chatlogpiece.h8
-rw-r--r--include/courtroom.h19
4 files changed, 36 insertions, 6 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h
index f4685eca..b44c8a80 100644
--- a/include/aoapplication.h
+++ b/include/aoapplication.h
@@ -213,6 +213,15 @@ public:
// or downwards (vanilla behaviour).
bool get_log_goes_downwards();
+ // Returns whether the log should separate name from text via newline or :
+ bool get_log_newline();
+
+ // Get spacing between IC log entries.
+ int get_log_margin();
+
+ // Returns whether the log should have a timestamp.
+ bool get_log_timestamp();
+
// Returns the username the user may have set in config.ini.
QString get_default_username();
diff --git a/include/aooptionsdialog.h b/include/aooptionsdialog.h
index 2b8c879b..fe99626a 100644
--- a/include/aooptionsdialog.h
+++ b/include/aooptionsdialog.h
@@ -46,6 +46,12 @@ private:
QCheckBox *ui_downwards_cb;
QLabel *ui_length_lbl;
QSpinBox *ui_length_spinbox;
+ QLabel *ui_log_newline_lbl;
+ QCheckBox *ui_log_newline_cb;
+ QLabel *ui_log_margin_lbl;
+ QSpinBox *ui_log_margin_spinbox;
+ QLabel *ui_log_timestamp_lbl;
+ QCheckBox *ui_log_timestamp_cb;
QFrame *ui_log_names_divider;
QLineEdit *ui_username_textbox;
QLabel *ui_username_lbl;
diff --git a/include/chatlogpiece.h b/include/chatlogpiece.h
index 14d4b349..da78d0da 100644
--- a/include/chatlogpiece.h
+++ b/include/chatlogpiece.h
@@ -10,14 +10,14 @@ class chatlogpiece {
public:
chatlogpiece();
chatlogpiece(QString p_name, QString p_showname, QString p_message,
- bool p_song,int color);
+ QString p_action,int color);
chatlogpiece(QString p_name, QString p_showname, QString p_message,
- bool p_song, int color, QDateTime p_datetime);
+ QString p_action, int color, QDateTime p_datetime);
QString get_name();
QString get_showname();
QString get_message();
- bool is_song();
+ QString get_action();
QDateTime get_datetime();
QString get_datetime_as_string();
int get_chat_color();
@@ -27,9 +27,9 @@ private:
QString name;
QString showname;
QString message;
+ QString action;
QDateTime datetime;
int color;
- bool p_is_song;
};
#endif // CHATLOGPIECE_H
diff --git a/include/courtroom.h b/include/courtroom.h
index df75cce5..979650a3 100644
--- a/include/courtroom.h
+++ b/include/courtroom.h
@@ -218,6 +218,8 @@ public:
QString filter_ic_text(QString p_text, bool colorize = false, int pos = -1,
int default_color = 0);
+ void log_ic_text(QString p_name, QString p_showname, QString p_message, QString p_action="", int p_color=0);
+
// adds text to the IC chatlog. p_name first as bold then p_text then a newlin
// this function keeps the chatlog scrolled to the top unless there's text
// selected
@@ -262,7 +264,6 @@ private:
int m_viewport_width = 256;
int m_viewport_height = 192;
- bool first_message_sent = false;
int maximumMessages = 0;
QParallelAnimationGroup *screenshake_animation_group =
@@ -319,7 +320,19 @@ private:
int log_maximum_blocks = 0;
// True, if the log should go downwards.
- bool log_goes_downwards = false;
+ bool log_goes_downwards = true;
+
+ // True, if log should display colors.
+ bool log_colors = true;
+
+ // True, if the log should display the message like name<br>text instead of name: text
+ bool log_newline = false;
+
+ // Margin in pixels between log entries for the IC log.
+ int log_margin = 0;
+
+ // True, if the log should have a timestamp.
+ bool log_timestamp = false;
// delay before chat messages starts ticking
QTimer *text_delay_timer;
@@ -649,6 +662,8 @@ private:
void reset_ic();
void reset_ui();
+
+ void regenerate_ic_chatlog();
public slots:
void objection_done();
void preanim_done();