diff options
| author | David Skoland <davidskoland@gmail.com> | 2017-02-01 18:20:48 +0100 |
|---|---|---|
| committer | David Skoland <davidskoland@gmail.com> | 2017-02-01 18:20:48 +0100 |
| commit | 6e7fd9c522822fab82b6b53dfd39b203a9a71091 (patch) | |
| tree | 4bcb464e3ec214b1e018a853557cdb3491bcd139 /courtroom.h | |
| parent | ab4de962e0bc8b2e8435af83dc568db99e1e303c (diff) | |
added objection handler and started on set_scene
Diffstat (limited to 'courtroom.h')
| -rw-r--r-- | courtroom.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/courtroom.h b/courtroom.h index a2902970..f15d5a01 100644 --- a/courtroom.h +++ b/courtroom.h @@ -39,18 +39,28 @@ public: void set_size_and_pos(QWidget *p_widget, QString p_identifier); void set_taken(int n_char, bool p_taken); void set_char_select_page(); - void set_background(QString p_background){current_background = p_background;} + void set_background(QString p_background); + + //sets desk and bg based on pos in chatmessage + void set_scene(); + + //sets text color based on text color in chatmessage + void set_text_color(); //implementations in path_functions.cpp QString get_background_path(); QString get_default_background_path(); + int get_cid() {return m_cid;} + void enter_courtroom(int p_cid); void append_ms_chatmessage(QString f_message); void append_server_chatmessage(QString f_message); void handle_chatmessage(QStringList *p_contents); + void handle_chatmessage_2(); + void handle_wtce(QString p_wtce); ~Courtroom(); @@ -73,6 +83,28 @@ private: QSignalMapper *char_button_mapper; + //determines how fast messages tick onto screen + QTimer *chat_tick_timer; + int chat_tick_interval = 60; + //which tick position(character in chat message) we are at + int tick_pos = 0; + + //delay before chat messages starts ticking + QTimer *text_delay; + + //delay before sfx plays + QTimer *sfx_delay; + + static const int chatmessage_size = 15; + QString m_chatmessage[chatmessage_size]; + bool chatmessage_is_empty = false; + + //state of animation, 0 = objecting, 1 = preanim, 2 = talking, 3 = idle + int anim_state = 0; + + //state of text ticking, 0 = not yet ticking, 1 = ticking in progress, 2 = ticking done + int text_state = 0; + //0 is the first page, 1 second etc. //makes char arithmetic easier int current_char_page = 0; @@ -80,6 +112,9 @@ private: //character id, which index of the char_list the player is int m_cid = 0; + //is set to true if the bg folder contains defensedesk.png, prosecutiondesk.png and stand.png + bool is_ao2_bg = false; + //wether the ooc chat is server or master chat, true is server bool server_ooc = true; |
