AttorneyOnline / AO2-Client

An off-the-cuff courtroom drama simulator
https://aceattorneyonline.com
GNU General Public License v3.0
61 stars 59 forks source link

[Feature] Courtroom slides - Based once again #966

Closed in1tiate closed 4 months ago

in1tiate commented 4 months ago

Refactor of https://github.com/AttorneyOnline/AO2-Client/pull/869, now with 70% fewer merge conflicts.

Took the old code verbatim and added pair support,. As far as my testing shows, this kinda just works.

Formatting required for setup:

Full courtroom image (should be named "court.png" but can work with any name) Design.ini parameters:

[court:def]
pos_center=320
slide_ms_pro=550
slide_ms_wit=500

[court:wit]
pos_center=1467
slide_ms_pro=500
slide_ms_def=500

[court:pro]
pos_center=2614
slide_ms_def=550
slide_ms_wit=500

where "court:pos" is the main image and the name of its subposition. pos_center is the pixel position of the center of the part of the image you want to be a position and the transition duration settings are formatted as slide_ms_pos and a duration in milliseconds.

Additionally, there is support for giving characters a special pose during transitions if an "Objection!" shout was used.

[Options]
objection_pose = pointing

This PR also adds a checkbox to the main UI to enable or disable sending the new MS parameter SLIDE which dictates whether a message is able to trigger a slide animation.

Additionally, a global setting is now in the settings menu to disable slide animations for yourself.


Rebased from https://github.com/AttorneyOnline/AO2-Client/pull/959.

TrickyLeifa commented 4 months ago

The format has been updated to the following:

scaling = smooth
positions = wit2

[court:def]
rect=0, 0, 640, 384
slide_ms_pro=550
slide_ms_wit=500

[court:wit]
rect=1147, 0, 640, 384
slide_ms_pro=500
slide_ms_def=500

[court:pro]
rect=2294, 0, 640, 384
slide_ms_def=550
slide_ms_wit=500

Biggest difference is that instead of a position in space it's a rect that covers the background.