Allow realizationflash, prosecution_speedlines and defense_speedlines to be changed in a similar way shouts can be changed from the character, as well as misc folder, etc.

Same for chat indicator
Rename themes/ name of shouts from "objection.gif" to "objection_bubble.gif" naming convention for consistency
Reorganize the default theme a bit as well as to support new elements
Fix the background size not being updated properly due to bad order of reload theme
Set up proper tooltips for sfx dropdown, iniswap dropdown, custom objection
This commit is contained in:
Crystalwarrior 2019-09-20 22:08:36 +03:00
parent 3fd93ab341
commit 497901e8c3
11 changed files with 202 additions and 89 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 579 B

View File

@ -2,35 +2,14 @@
; compress courtroombackground.png accordingly. ; compress courtroombackground.png accordingly.
courtroom = 0, 0, 714, 668 courtroom = 0, 0, 714, 668
; **COORDINATE SYSTEM RELATIVE TO "courtroom"**
; x/y coordinates 0,0 will start at top-left of the "courtroom" for everything below until specified otherwise.
; ****
; IC Area. Changing 256, 192 will stretch or compress character gifs and the ; IC Area. Changing 256, 192 will stretch or compress character gifs and the
; /bgs being used accordingly ; /bgs being used accordingly
viewport = 0, 0, 256, 192 viewport = 0, 0, 256, 192
; IC chatbox
chatbox = 0, 174, 256, 108
; IC chatbox if the current background's folder contains stand.png,
; defensedesk.png and prosecutiondesk.png
ao2_chatbox = 0, 174, 256, 108
; Textbox for custom IC name (the "showname")
showname = 6, 1, 256, 15
; IC message, positioned within the chatbox. Changing 250 affects how
; long text goes on before going onto the next line. Changing 89 affects
; how many lines you can see before the message starts scrolling, based on
; the formula of n = 25+(n-1)*16, where n is the number of lines to be
; displayed. (ie, set it to 25 for 1 line, 41 for 2, 57 for 3, 73 for 4,
; 89 for 5, 105 for 6... Less than 25 displays nothing)
message = 3, 18, 250, 89
; Where you type to make an IC chat message
ic_chat_message = 2, 283, 250, 23
; IC chat message if the current background's folder contains stand.png,
; defensedesk.png and prosecutiondesk.png
ao2_ic_chat_message = 2, 283, 250, 23
; IC chatlog ; IC chatlog
ic_chatlog = 260, 0, 231, 319 ic_chatlog = 260, 0, 231, 319
@ -50,14 +29,20 @@ ooc_chat_name = 492, 300, 85, 19
; Toggle between Server and Master OOC chats ; Toggle between Server and Master OOC chats
ooc_toggle = 580, 300, 133, 19 ooc_toggle = 580, 300, 133, 19
; The scrolling music name display
music_display = 490, 0, 224, 26
; WARNING: music_name x/y coordinates relative to music_display!
music_name = 0, 0, 224, 26
; Where the jukebox is ; Where the jukebox is
music_list = 490, 342, 224, 326 music_list = 490, 342, 224, 326
; Jukebox search bar ; Jukebox search bar
music_search = 490, 319, 100, 23 music_search = 490, 319, 100, 23
found_song_color = 100, 255, 100 ; Music list state colors
missing_song_color = 255, 100, 100 found_song_color = 144, 238, 144
missing_song_color = 255, 125, 125
; Labels and sliders for music/sfx/blips ; Labels and sliders for music/sfx/blips
music_label = 282, 607, 41, 16 music_label = 282, 607, 41, 16
@ -74,6 +59,7 @@ blip_slider = 326, 648, 140, 16
; 49X, 49Y (ie. 490, 147 if you want 10 columns and 3 rows) ; 49X, 49Y (ie. 490, 147 if you want 10 columns and 3 rows)
emotes = 5, 342, 490, 98 emotes = 5, 342, 490, 98
emote_button_spacing = 9, 9 emote_button_spacing = 9, 9
emote_button_size = 40, 40
; Page togglers for emotes ; Page togglers for emotes
emote_left = 5, 434, 60, 32 emote_left = 5, 434, 60, 32
@ -83,6 +69,22 @@ emote_right = 428, 434, 60, 32
; display the full emote name or truncate it based on length ; display the full emote name or truncate it based on length
emote_dropdown = 5, 470, 105, 20 emote_dropdown = 5, 470, 105, 20
; Display the accessible iniswaps on this character (grabbed from iniswaps.ini)
iniswap_dropdown = 100, 442, 89, 20
; The button to remove the current iniswap
iniswap_remove = 78, 442, 20, 20
; Display the accessible sfx on this character (grabbed from soundlist.ini). If none found, courtroom_soundlist.ini will be used.
sfx_dropdown = 220, 442, 89, 20
; The button to remove the current iniswap
sfx_remove = 198, 442, 20, 20
; Display the list of overlay effects accessible
effects_dropdown = 330, 441, 89, 22
; The size of the icons for dropdown entries
effects_icon_size = 16, 16
; Hold it/Take That/Objection and the "BLING!" buttons ; Hold it/Take That/Objection and the "BLING!" buttons
hold_it = 10, 310, 76, 28 hold_it = 10, 310, 76, 28
objection = 90, 310, 76, 28 objection = 90, 310, 76, 28
@ -93,7 +95,7 @@ realization = 5, 515, 42, 42
; custom.gif and custom.wav in their folder, this button acts as another ; custom.gif and custom.wav in their folder, this button acts as another
; Objection/Take That/Hold It for that character that uses the custom animation ; Objection/Take That/Hold It for that character that uses the custom animation
; and sfx. (Think Satorah! Such Insolence!, Gotcha!) ; and sfx. (Think Satorah! Such Insolence!, Gotcha!)
custom_objection = 340, 565, 76, 28 custom_objection = 250, 310, 76, 28
; Text color dropdown menu ; Text color dropdown menu
text_color = 115, 470, 80, 20 text_color = 115, 470, 80, 20
@ -104,7 +106,10 @@ pos_dropdown = 200, 470, 80, 20
pre = 5, 490, 80, 21 pre = 5, 490, 80, 21
; Flip button ; Flip button
flip = 104, 490, 51, 21 flip = 64, 490, 51, 21
; Additive button
Additive = 114, 490, 80, 21
; Guard button ; Guard button
guard = 200, 580, 61, 21 guard = 200, 580, 61, 21
@ -132,33 +137,12 @@ call_mod = 104, 637, 64, 23
; Mute button ; Mute button
mute_button = 150, 515, 42, 42 mute_button = 150, 515, 42, 42
; Screenshake
screenshake = 51, 515, 42, 42
; Where the Mute list pops up when you click Mute ; Where the Mute list pops up when you click Mute
mute_list = 280, 469, 210, 198 mute_list = 280, 469, 210, 198
; ???? - if there was an Area button, where the area list would show up?
; area_list = 270, 494, 224, 174
; ???? - where a password box appears if an area is password locked?
; area_password = 266, 471, 224, 23
; >Evidence meme
evidence_button = 627, 322, 85, 18
evidence_background = 0, 385, 490, 284
evidence_name = 112, 4, 264, 19
evidence_buttons = 28, 27, 430, 216
evidence_button_spacing = 2, 3
evidence_overlay = 24, 24, 439, 222
evidence_delete = 78, 8, 70, 20
evidence_image_name = 150, 8, 130, 20
evidence_image_button = 280, 8, 60, 20
evidence_x = 341, 8, 20, 20
evidence_description = 78, 28, 281, 166
evidence_left = 28, 0, 60, 24
evidence_right = 400, 0, 60, 24
evidence_present = 165, 247, 158, 41
left_evidence_icon = 13, 13, 70, 70
right_evidence_icon = 173, 13, 70, 70
; Character select widgets ; Character select widgets
char_select = 0, 0, 714, 668 char_select = 0, 0, 714, 668
back_to_lobby = 5, 5, 91, 23 back_to_lobby = 5, 5, 91, 23
@ -173,15 +157,6 @@ spectator = 317, 640, 80, 23
; New in 2.6.0 ; New in 2.6.0
; ------------------------- ; -------------------------
; The log limiter explaining label. This is simply a piece of text that
; explains what the spin box is for.
; log_limit_label = 190, 612, 50, 30
; The spinbox allows you to set the log limit ingame inbetween 1 and 10000,
; with the option to set it to 0 as well (which is considered 'infinite' by
; the log limiter).
; log_limit_spinbox = 168, 636, 70, 25
; This is an input field that allows you to change your in-character showname. ; This is an input field that allows you to change your in-character showname.
ic_chat_name = 200, 534, 78, 23 ic_chat_name = 200, 534, 78, 23
@ -228,12 +203,12 @@ pair_offset_spinbox = 280, 470, 210, 20
switch_area_music = 590, 319, 35, 23 switch_area_music = 590, 319, 35, 23
; These are colours for the various statuses an area can be in. ; These are colours for the various statuses an area can be in.
area_free_color = 54, 198, 68 area_free_color = 144, 238, 144
area_lfp_color = 255, 255, 0 area_lfp_color = 127, 255, 0
area_casing_color = 255, 166, 0 area_casing_color = 255, 215, 0
area_recess_color = 255, 190, 30 area_recess_color = 255, 246, 143
area_rp_color = 200, 52, 252 area_rp_color = 135, 206, 255
area_gaming_color = 55, 255, 255 area_gaming_color = 171, 130, 255
area_locked_color = 165, 43, 43 area_locked_color = 165, 43, 43
; These two are casing-related inputs. ; These two are casing-related inputs.
@ -243,3 +218,84 @@ area_locked_color = 165, 43, 43
; a CM first to be able to announce cases). ; a CM first to be able to announce cases).
casing = 200, 560, 80, 21 casing = 200, 560, 80, 21
casing_button = 173, 637, 60, 23 casing_button = 173, 637, 60, 23
;
; Chat system
;
; IC chatbox
chatbox = 0, 178, 256, 104
; IC chatbox if the current background's folder contains stand.png,
; defensedesk.png and prosecutiondesk.png
ao2_chatbox = 0, 178, 256, 104
; **COORDINATE SYSTEM RELATIVE TO "chatbox"/"ao2_chatbox"**
; x/y coordinates 0,0 will start at top-left of the "chatbox"/"ao2_chatbox" for everything below until specified otherwise.
; ****
; Textbox for custom IC name (the "showname"), width is the smallest size
showname = 1, 0, 46, 15
; The chatbox image used for smallest possible size is "chat". "chatblank" is used if the showname is whitespace-only.
; "chatmed" will be used if the showname size exceeds the width, at which point the showname will receive showname_extra_width.
; "chatbig" will be used if the showname size exceeds the "chatmed" width, at which point the showname will receive showname_extra_width again.
; Text any bigger than that will be cut off. If "chatmed" or "chatbig" are missing, showname will not be resized.
showname_extra_width = 24
; IC message, positioned within the chatbox. Changing 250 affects how
; long text goes on before going onto the next line. Changing 89 affects
; how many lines you can see before the message starts scrolling, based on
; Every line height is 25 if the font size is 10 and the Sans font is used.
; There's 4 pixels from X position until the symbol is displayed.
; the formula of n = 25+(n-1)*16, where n is the number of lines to be
; displayed. (ie, set it to 25 for 1 line, 41 for 2, 57 for 3, 73 for 4,
; 89 for 5, 105 for 6... Less than 25 displays nothing)
message = 10, 12, 242, 89
; A chat indicator alerting us the chat ticker isn't active (text is no longer being processed).
chat_arrow = 245, 84, 11, 9
; Where you type to make an IC chat message
ic_chat_message = 2, 283, 250, 23
; IC chat message if the current background's folder contains stand.png,
; defensedesk.png and prosecutiondesk.png
ao2_ic_chat_message = 2, 283, 250, 23
;
; Evidence system
;
; **COORDINATE SYSTEM RELATIVE TO "viewport"**
; x/y coordinates 0,0 will start at top-left of the "viewport" for everything below until specified otherwise.
; ****
left_evidence_icon = 13, 13, 70, 70
right_evidence_icon = 173, 13, 70, 70
; **COORDINATE SYSTEM RELATIVE TO "courtroom"**
; x/y coordinates 0,0 will start at top-left of the "courtroom" for everything below until specified otherwise.
; ****
evidence_background = 0, 385, 490, 284
; **COORDINATE SYSTEM RELATIVE TO "evidence_background"**
; x/y coordinates 0,0 will start at top-left of the "evidence_background" for everything below until specified otherwise.
; ****
evidence_buttons = 28, 27, 430, 216
evidence_button_spacing = 2, 3
evidence_button_size = 70, 70
evidence_left = 28, 0, 60, 24
evidence_right = 400, 0, 60, 24
evidence_present = 165, 247, 158, 41
evidence_overlay = 24, 24, 439, 222
; **COORDINATE SYSTEM RELATIVE TO "evidence_overlay"**
; x/y coordinates 0,0 will start at top-left of the "evidence_overlay" (which is parented to "evidence_background") for everything below until specified otherwise.
; ****
evidence_delete = 78, 8, 70, 20
evidence_image_name = 150, 8, 130, 20
evidence_image_button = 280, 8, 60, 20
evidence_x = 341, 8, 20, 20
evidence_button = 627, 322, 85, 18
evidence_name = 112, 4, 264, 19
evidence_description = 78, 28, 281, 166

View File

@ -1,11 +1,56 @@
showname = 8 showname = 8
showname_font = Sans
showname_color = 255, 255, 255
showname_bold = 0
message = 10 message = 10
message_font = Sans
message_color = 0, 0, 0
message_bold = 0
ic_chatlog = 10 ic_chatlog = 10
ms_chatlog = 10 ic_chatlog_font = Sans
server_chatlog = 9
music_list = 8
ic_chatlog_color = 255, 255, 255 ic_chatlog_color = 255, 255, 255
ic_chatlog_bold = 0
; Color for all labels and checkboxes ms_chatlog = 8
label_color = 255, 255, 255 ms_chatlog_font = Sans
ms_chatlog_color = 0, 0, 0
ms_chatlog_sender_color = 0, 0, 95
ms_chatlog_bold = 0
server_chatlog = 8
server_chatlog_font = Sans
server_chatlog_color = 0, 0, 0
server_chatlog_sender_color = 95, 95, 0
server_chatlog_bold = 0
music_list = 8
music_list_font = Sans
music_list_color = 0, 0, 0
music_list_bold = 0
music_name = 8
music_name_font = Sans
music_name_color = 255, 255, 255
music_name_bold = 0
area_list = 8
area_list_font = Sans
area_list_color = 0, 0, 0
area_list_bold = 0
evidence_name = 14
evidence_name_font = Arial
evidence_name_color = 255, 128, 0
evidence_name_bold = 1
evidence_image_name = 8
evidence_image_name_font = Arial
evidence_image_name_color = 0, 0, 0
evidence_image_name_bold = 0
evidence_description = 10
evidence_description_font = Times New Roman
evidence_description_color = 255, 255, 255
evidence_description_bold = 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

View File

@ -579,6 +579,8 @@ void Courtroom::set_widgets()
set_size_and_pos(ui_music_search, "music_search"); set_size_and_pos(ui_music_search, "music_search");
set_size_and_pos(ui_emote_dropdown, "emote_dropdown"); set_size_and_pos(ui_emote_dropdown, "emote_dropdown");
ui_pos_dropdown->setToolTip(tr("Set your character's emote to play on your next message."));
set_size_and_pos(ui_pos_dropdown, "pos_dropdown"); set_size_and_pos(ui_pos_dropdown, "pos_dropdown");
ui_pos_dropdown->setToolTip(tr("Set your character's supplementary background.")); ui_pos_dropdown->setToolTip(tr("Set your character's supplementary background."));
@ -586,7 +588,7 @@ void Courtroom::set_widgets()
ui_iniswap_dropdown->setEditable(true); ui_iniswap_dropdown->setEditable(true);
ui_iniswap_dropdown->setInsertPolicy(QComboBox::InsertAtBottom); ui_iniswap_dropdown->setInsertPolicy(QComboBox::InsertAtBottom);
ui_iniswap_dropdown->setToolTip(tr("Set an 'iniswap', or an alternative character folder to refer to from your current character.\n" ui_iniswap_dropdown->setToolTip(tr("Set an 'iniswap', or an alternative character folder to refer to from your current character.\n"
"This information is saved to your base/characters/<charname>/iniswaps.ini")); "Edit by typing and pressing Enter, [X] to remove. This saves to your base/characters/<charname>/iniswaps.ini"));
set_size_and_pos(ui_iniswap_remove, "iniswap_remove"); set_size_and_pos(ui_iniswap_remove, "iniswap_remove");
ui_iniswap_remove->setText("X"); ui_iniswap_remove->setText("X");
@ -596,8 +598,8 @@ void Courtroom::set_widgets()
set_size_and_pos(ui_sfx_dropdown, "sfx_dropdown"); set_size_and_pos(ui_sfx_dropdown, "sfx_dropdown");
ui_sfx_dropdown->setEditable(true); ui_sfx_dropdown->setEditable(true);
ui_sfx_dropdown->setInsertPolicy(QComboBox::InsertAtBottom); ui_sfx_dropdown->setInsertPolicy(QComboBox::InsertAtBottom);
ui_sfx_dropdown->setToolTip(tr("Set an 'iniswap', or an alternative character folder to refer to from your current character.\n" ui_sfx_dropdown->setToolTip(tr("Set a sound effect to play on your next 'Preanim'. Leaving it on Default will use the emote-defined sound (if any).\n"
"This information is saved to your base/characters/<charname>/iniswaps.ini")); "Edit by typing and pressing Enter, [X] to remove. This saves to your base/characters/<charname>/sounds.ini"));
set_size_and_pos(ui_sfx_remove, "sfx_remove"); set_size_and_pos(ui_sfx_remove, "sfx_remove");
ui_sfx_remove->setText("X"); ui_sfx_remove->setText("X");
@ -606,7 +608,9 @@ void Courtroom::set_widgets()
set_size_and_pos(ui_effects_dropdown, "effects_dropdown"); set_size_and_pos(ui_effects_dropdown, "effects_dropdown");
ui_effects_dropdown->setInsertPolicy(QComboBox::InsertAtBottom); ui_effects_dropdown->setInsertPolicy(QComboBox::InsertAtBottom);
ui_effects_dropdown->setToolTip(tr("Choose an effect to play on your next spoken message.")); ui_effects_dropdown->setToolTip(tr("Choose an effect to play on your next spoken message.\n"
"The effects are defined in your theme/effects/effects.ini. Your character can define custom effects by\n"
"char.ini [Options] category, effects = 'miscname' where it referes to misc/<miscname>/effects.ini to read the effects."));
//Todo: recode this entire fucking system with these dumbass goddamn ini's why is everything so specifically coded for all these purposes //Todo: recode this entire fucking system with these dumbass goddamn ini's why is everything so specifically coded for all these purposes
//is ABSTRACT CODING not a thing now huh what the FUCK why do I gotta do this pleASE FOR THE LOVE OF GOD SPARE ME FROM THIS FRESH HELL //is ABSTRACT CODING not a thing now huh what the FUCK why do I gotta do this pleASE FOR THE LOVE OF GOD SPARE ME FROM THIS FRESH HELL
//btw i still love coding. //btw i still love coding.
@ -716,7 +720,8 @@ void Courtroom::set_widgets()
set_size_and_pos(ui_custom_objection, "custom_objection"); set_size_and_pos(ui_custom_objection, "custom_objection");
ui_custom_objection->setText(tr("Custom Shout!")); ui_custom_objection->setText(tr("Custom Shout!"));
ui_custom_objection->set_image("custom"); ui_custom_objection->set_image("custom");
ui_custom_objection->setToolTip(tr("This will display the custom character-defined animation in the viewport as soon as it is pressed.")); ui_custom_objection->setToolTip(tr("This will display the custom character-defined animation in the viewport as soon as it is pressed.\n"
"To make one, your character's folder must contain custom.[webp/apng/gif/png] and custom.wav"));
set_size_and_pos(ui_realization, "realization"); set_size_and_pos(ui_realization, "realization");
ui_realization->set_image("realization"); ui_realization->set_image("realization");
@ -1551,17 +1556,17 @@ void Courtroom::handle_chatmessage(QStringList *p_contents)
switch (objection_mod) switch (objection_mod)
{ {
case 1: case 1:
ui_vp_objection->play("holdit", f_char, f_custom_theme, 724); ui_vp_objection->play("holdit_bubble", f_char, f_custom_theme, 724);
objection_player->play("holdit.wav", f_char, f_custom_theme); objection_player->play("holdit.wav", f_char, f_custom_theme);
break; break;
case 2: case 2:
ui_vp_objection->play("objection", f_char, f_custom_theme, 724); ui_vp_objection->play("objection_bubble", f_char, f_custom_theme, 724);
objection_player->play("objection.wav", f_char, f_custom_theme); objection_player->play("objection.wav", f_char, f_custom_theme);
if(ao_app->objection_stop_music()) if(ao_app->objection_stop_music())
music_player->stop(); music_player->stop();
break; break;
case 3: case 3:
ui_vp_objection->play("takethat", f_char, f_custom_theme, 724); ui_vp_objection->play("takethat_bubble", f_char, f_custom_theme, 724);
objection_player->play("takethat.wav", f_char, f_custom_theme); objection_player->play("takethat.wav", f_char, f_custom_theme);
break; break;
//case 4 is AO2 only //case 4 is AO2 only
@ -1893,7 +1898,9 @@ void Courtroom::do_flash()
if(!ao_app->is_shake_flash_enabled()) if(!ao_app->is_shake_flash_enabled())
return; return;
ui_vp_effect->play("realizationflash", "", "", 60); QString f_char = m_chatmessage[CHAR_NAME];
QString f_custom_theme = ao_app->get_char_shouts(f_char);
ui_vp_effect->play("realizationflash", f_char, f_custom_theme, 60);
} }
void Courtroom::do_effect(QString fx_name, QString fx_sound, QString p_char) void Courtroom::do_effect(QString fx_name, QString fx_sound, QString p_char)
@ -1948,12 +1955,14 @@ void Courtroom::handle_chatmessage_3()
ui_vp_sideplayer_char->hide(); ui_vp_sideplayer_char->hide();
ui_vp_player_char->move(0,0); ui_vp_player_char->move(0,0);
QString f_char = m_chatmessage[CHAR_NAME];
QString f_custom_theme = ao_app->get_char_shouts(f_char);
if (side == "pro" || if (side == "pro" ||
side == "hlp" || side == "hlp" ||
side == "wit") side == "wit")
ui_vp_speedlines->play("prosecution_speedlines"); ui_vp_speedlines->play("prosecution_speedlines", f_char, f_custom_theme);
else else
ui_vp_speedlines->play("defense_speedlines"); ui_vp_speedlines->play("defense_speedlines", f_char, f_custom_theme);
} }
@ -2412,7 +2421,9 @@ void Courtroom::chat_tick()
anim_state = 3; anim_state = 3;
ui_vp_player_char->play_idle(m_chatmessage[CHAR_NAME], m_chatmessage[EMOTE]); ui_vp_player_char->play_idle(m_chatmessage[CHAR_NAME], m_chatmessage[EMOTE]);
} }
ui_vp_chat_arrow->play("chat_arrow"); //Chat stopped being processed, indicate that. QString f_char = m_chatmessage[CHAR_NAME];
QString f_custom_theme = ao_app->get_char_shouts(f_char);
ui_vp_chat_arrow->play("chat_arrow", f_char, f_custom_theme); //Chat stopped being processed, indicate that.
} }
else else
@ -3988,13 +3999,14 @@ void Courtroom::on_reload_theme_clicked()
{ {
ao_app->reload_theme(); ao_app->reload_theme();
//to update status on the background
set_background(current_background);
enter_courtroom(); enter_courtroom();
update_character(m_cid); update_character(m_cid);
anim_state = 4; anim_state = 4;
text_state = 3; text_state = 3;
//to update status on the background
set_background(current_background);
} }
void Courtroom::on_back_to_lobby_clicked() void Courtroom::on_back_to_lobby_clicked()