diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/aoapplication.h | 5 | ||||
| -rw-r--r-- | include/aolineedit.h | 11 | ||||
| -rw-r--r-- | include/courtroom.h | 16 | ||||
| -rw-r--r-- | include/datatypes.h | 15 |
4 files changed, 17 insertions, 30 deletions
diff --git a/include/aoapplication.h b/include/aoapplication.h index fef299b..89bfaa2 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -242,6 +242,9 @@ public: //Returns the color with p_identifier from p_file QColor get_color(QString p_identifier, QString p_file); + // Returns the markdown symbol used for specified p_identifier such as colors + QString get_chat_markdown(QString p_identifier, QString p_file); + // Returns the color from the misc folder. QColor get_chat_color(QString p_identifier, QString p_chat); @@ -261,7 +264,7 @@ public: QString read_char_ini(QString p_char, QString p_search_line, QString target_tag); //Returns a QStringList of all key=value definitions on a given tag. - QStringList read_char_ini_tag(QString p_char, QString target_tag); + QStringList read_ini_tags(QString p_file, QString target_tag = ""); //Sets the char.ini p_search_line key under tag target_tag to value. void set_char_ini(QString p_char, QString value, QString p_search_line, QString target_tag); diff --git a/include/aolineedit.h b/include/aolineedit.h index ce17680..0952172 100644 --- a/include/aolineedit.h +++ b/include/aolineedit.h @@ -11,16 +11,17 @@ class AOLineEdit : public QLineEdit public: AOLineEdit(QWidget *parent); + void preserve_selection(bool toggle) {p_selection = toggle;} + +private: + bool p_selection = false; + protected: void mouseDoubleClickEvent(QMouseEvent *e); + void focusOutEvent(QFocusEvent *ev); signals: void double_clicked(); - -private slots: - void on_enter_pressed(); - - }; #endif // AOLINEEDIT_H diff --git a/include/courtroom.h b/include/courtroom.h index 5aad1cb..72dec04 100644 --- a/include/courtroom.h +++ b/include/courtroom.h @@ -168,12 +168,6 @@ public: //sets desk and bg based on pos in chatmessage void set_scene(QString f_desk_mod, QString f_side); - //sets text color based on text color in chatmessage - void set_text_color(); - - // And gets the color, too! - QColor get_text_color(QString color); - //takes in serverD-formatted IP list as prints a converted version to server OOC //admittedly poorly named void set_ip_list(QString p_list); @@ -213,7 +207,7 @@ public: //This function filters out the common CC inline text trickery, for appending to //the IC chatlog. - QString filter_ic_text(QString p_text, bool colorize = false, int pos = -1, int default_color = WHITE); + QString filter_ic_text(QString p_text, bool colorize = false, int pos = -1, int default_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 @@ -360,6 +354,9 @@ private: int realization_state = 0; int screenshake_state = 0; int text_color = 0; + static const int max_colors = 12; //How many unique user colors are possible + QVector<int> color_row_to_number; //Current color list indexes to real color references + bool is_presenting_evidence = false; QString effect = ""; @@ -440,7 +437,7 @@ private: QListWidget *ui_pair_list; QSpinBox *ui_pair_offset_spinbox; - QLineEdit *ui_ic_chat_message; + AOLineEdit *ui_ic_chat_message; QLineEdit *ui_ic_chat_name; QLineEdit *ui_ooc_chat_message; @@ -625,7 +622,7 @@ private slots: QString get_char_sfx(); int get_char_sfx_delay(); - void on_evidence_name_edited(QString text); + void on_evidence_name_edited(); void on_evidence_image_name_edited(); void on_evidence_image_button_clicked(); void on_evidence_clicked(int p_id); @@ -654,6 +651,7 @@ private slots: void on_prosecution_plus_clicked(); void on_text_color_changed(int p_color); + void set_text_color_dropdown(); void on_music_slider_moved(int p_value); void on_sfx_slider_moved(int p_value); diff --git a/include/datatypes.h b/include/datatypes.h index 1917482..835cf8f 100644 --- a/include/datatypes.h +++ b/include/datatypes.h @@ -110,19 +110,4 @@ enum CHAT_MESSAGE EFFECTS }; -enum COLOR -{ - WHITE = 0, - GREEN, - RED, - ORANGE, - BLUE, - YELLOW, - RAINBOW, - PINK, - CYAN, - GRAY, - BLANK -}; - #endif // DATATYPES_H |
