diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2018-12-12 13:05:27 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-12 13:05:27 -0600 |
| commit | d09269122408ee83c4fa20dfb90ed5aedd9fe85a (patch) | |
| tree | 57bb4ac47202158ac5062488151d3c83305ce424 /text_file_functions.cpp | |
| parent | 9270069e726d1f260e3c08ee5722f6d07067b770 (diff) | |
| parent | 171196885d88360c8c06def67ae398c8187dfd89 (diff) | |
Merge pull request #38 from Cerapter/mega-merge-fixes
CC-original related feature fixes.
Diffstat (limited to 'text_file_functions.cpp')
| -rw-r--r-- | text_file_functions.cpp | 39 |
1 files changed, 38 insertions, 1 deletions
diff --git a/text_file_functions.cpp b/text_file_functions.cpp index ff40c9c4..afe8fc30 100644 --- a/text_file_functions.cpp +++ b/text_file_functions.cpp @@ -268,12 +268,49 @@ QColor AOApplication::get_color(QString p_identifier, QString p_file) QColor AOApplication::get_chat_color(QString p_identifier, QString p_chat) { + QColor return_color(255, 255, 255); + + if (p_identifier == "_inline_grey") + { + return_color = QColor(187, 187, 187); + } + else + { + switch (p_identifier.toInt()) { + case 1: + return_color = QColor(0, 255, 0); + break; + case 2: + return_color = QColor(255, 0, 0); + break; + case 3: + return_color = QColor(255, 165, 0); + break; + case 4: + return_color = QColor(45, 150, 255); + break; + case 5: + return_color = QColor(255, 255, 0); + break; + case 7: + return_color = QColor(255, 192, 203); + break; + case 8: + return_color = QColor(0, 255, 255); + break; + case 0: + case 6: // 6 is rainbow. + default: + return_color = QColor(255, 255, 255); + break; + } + } + p_identifier = p_identifier.prepend("c"); QString design_ini_path = get_base_path() + "misc/" + p_chat + "/config.ini"; QString default_path = get_base_path() + "misc/default/config.ini"; QString f_result = read_design_ini(p_identifier, design_ini_path); - QColor return_color(255, 255, 255); if (f_result == "") { f_result = read_design_ini(p_identifier, default_path); |
