Commit Graph

150 Commits

Author SHA1 Message Date
in1tiate
894b2b2a0e
Consolidate AOScene, AOMovie, and AOCharMovie into one class, add support for (c) animations, implement emote continuity, add scaling overrides to all layer types, allow for stretch-to-fill images, allow for additional effect configuration (#302)
* Rewrite AOScene and remove the need for AOMovie and AOCharMovie by consolidation

* Rename AOScene to AOLayer, apply suggestions to improve functionality

* Implement suggested change to allocation

* Switch from pointer to field, fix ui_vp_player_char not resetting play_once

* Use the variable gif_name instead of the string "gif_name"
 Oops.

* Total rewrite of AOLayer (again)

* Add support for (c) animations, do some housekeeping

* allow themes to override misc chatboxes

* add support for pulling InterfaceLayer elements from theme/misc

* mistakes were made

* move all frame fx functionality to CharLayer subclass

* virtual functions are cool mkay

* remove evidence of my incompetence

* allow themes to override font design inis under theme/misc

* Proper support for theme/misc chatbox, fixes

* Fix chatbox dimensions not updating and inline color causing missingnos

* rename chat markdown to chat markup

* add missing misc overrides

* quick hotfix for chatblank and misc overrides

* Fix oversight with backgrounds causing them to be culled

* Same as last commit but for FG layer

* amend comment to explain impossible shenanigans

* Adjust ForegroundLayer to take charname rather than miscname, allow for checking in char folder

* fix an incredibly embarrassing pathing bug

* add scaling overrides for all layer types, parent orphaned viewport elements to the viewport

* stupid fix because themes use "custom.png" as a button

* switch to .append()

* Revert "Merge branch 'aoscene_rewrite' of https://github.com/AttorneyOnline/AO2-Client into aoscene_rewrite"

This reverts commit bdeb1bff7639d522031aab3c133a83b0e2a291df, reversing
changes made to 125ee63b97a6f6c156e69525d88fddc625e7a978.

* switch to .append() (again)

* move function call to fix showname length calculation error

* fix nonlooping character animations being broken Again

* unparent elements from the viewport and do fancy masking arithmetic instead

* use override keyword

* move scaling override to char.ini, allow stretching, restructure effect property loading

* fix some redundancy

* unparent chat_arrow from chatbox to prevent accidental masking

* at no point do we want a frozen gif to display

* overhaul how wtce is handled

* oops

* also let sounds be pulled from theme miscs

* i should probably compile before i push

* actually make it work

* don't check a default bg

* readd 1x1 stretch thing

* actually the 1x1 thing was a bad idea

* Add missing parenthesis

* Use load_image instead of play

play is a nonexistent method now

* Remote shout_message and usages because it does nothing

* Remove multiple redefinitions

* Add in missing brackets and indent to fix build

I have know idea what this does but it brings fear

* fix build error

* fix chat arrow and remove duped code

* remove more duped code and fix misc themes

* only update chat_arrow when needed

* consolidate log_chatmessage and display_log_chatmessage

Co-authored-by: scatterflower <marisaposs@gameboyprinter.moe>
Co-authored-by: Skye Deving <76892045+skyedeving@users.noreply.github.com>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-01-19 14:32:11 +03:00
in1tiate
d41ec17fe7
Add a new "char_list" QTreeWidget that allows for categorizing characters (#399)
* initial commit

* use a "category" value instead

* add filtering and taken indicator

* hide serverlist header

* set the items to disabled in place of the [X] text

Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-18 23:10:45 +03:00
oldmud0
2f3ca8613d
Merge pull request #400 from AttorneyOnline/bugfix/blanklogs
Fix blankposts not showing up in logs
2021-01-18 12:35:19 -06:00
Crystalwarrior
7877739146 Simplify the logic behind last message = blankpost detection
I need to stop overcomplicating things.
2021-01-18 18:54:11 +03:00
Crystalwarrior
ea94644cf5 Attempt a theoretically safer method of tracking last displayed message 2021-01-18 17:56:21 +03:00
Crystalwarrior
147892bae9
Overhaul sound lists to introduce aliases, rethink editing behavior (#389)
* Resolve https://github.com/AttorneyOnline/AO2-Client/issues/275 by adding a "Nothing" option to play no SFX even when playing a preanimation that behaves similar to the Default option

* Overhaul sound list:
* Allow aliases. .ini file syntax is "filename = alias".
* Do not allow editing the .ini files from the client anymore.
* The sound list dropdown is still editable, but all it does is play your custom sfx without adding it to any files.
* Overhaul get_char_sfx

* Fix aliases not working properly with a rather tricky solution

* save character soundlist in base and drop the character_ from the filename

Co-authored-by: stonedDiscord <10584181+stonedDiscord@users.noreply.github.com>
2021-01-13 23:34:20 +01:00
Crystalwarrior
96fcb75c4c Make sure blankposts are properly displayed unless repeats, playing nice with view desync 2021-01-12 13:46:39 +03:00
Crystalwarrior
f96bd6cc3c Didn't notice I removed this from the mergening when I resolved merge conflicts, oops 2021-01-12 11:59:07 +03:00
Crystalwarrior
49c3dcdee5 Merge branch 'master' into feature/timerclock
# Conflicts:
#	include/courtroom.h
2021-01-12 11:55:08 +03:00
Crystalwarrior
2d1de1fb54
Desynchronize viewport from the IC chat log so that users have a smooth viewing experience as an option (#385)
* Begin trying to understand handle_chatmessage monstrosity
Rearrange some functionality to be more consistent with what the particular handle_chatmessage is *supposed* to be responsible for
Single responsibility principle doesn't apply not just to script files but even functions in this goddamned program apparently.

* Fix some oversights relating to "has presented evidence" logs

* Fix an edge case crash with negative evidence, idk why this didn't happen before.

* Completely refactor handle_chatmessage hell and split it up into single-responsibility-principle functions like a sane and organized coder would.
This will break any PRs that touch handle_chatmessage and will have to conform to the new standard, but it's very good in the long run.
Functions have also been meticulously commentated to make sure that everyone can understand at a glance what everything does.
This refactor is done to pave way for smooth viewport, making characters no longer randomly interrupt each other when speaking.

* Rename confusingly named "handle_chatbox" to "handle_ic_speaking"
Add a new function "handle_callwords"

* Parse blankposts in the packet unpacking phase
log_chatmessage is now an argument-based funciton instead of using m_chatmessage monstrosity
Commentate the heck out of log_chatmessage
Fix showname displaying logic being bonkers for log entries
Fix -1 char_id most likely crashing client, even tho they're supposed to be system messages
Fix [CHARID] being referenced instead of [OTHER_CHARID] in the pair display func
Fix chat message color being used for "has played a song" even though it shouldn't

* Move setting emote_mod from the objection thing to the packet unpacking thing
handle_emote_mod has become argumented

* Make display_pair_character take in only vars it needs

* Add functionality for message stacks (does not handle logging separately yet)
Currently segfaults at line 1823 if stacking behavior actually occurs. Plz help I'm poopie brain at this

* Make sense of pointers and dereference some pointers to prevent wacky errors
Replace _stack with _queue, and turn it into a QQueue

* Implement a minimum text delay queue timer so that each msg must stay on screen for a specified amount of time
Chat_arrow only shows up when the minimum text delay has expired
Check if target is muted in the enqueueing, as well as the validity of the character id, so we don't even bother adding it to the queue
Add a settings option to set text stay time (minimum amount of time to pass before displaying the next message).
TODO: Handle queued interjections in a cooler way

* Adjust default option for stay_time to be 200ms
Make the stay_time setting of 0 disable the queue system entirely

* Make interjections force-clear the message queue
Use interjections to instantly process those messages - objections are usually extremely important and must have everyone's immediate attention.
TODO: Add a settings option for interjection behavior

* Clear message queue when bg display packet is received

* Add an instant objection setting which, when enabled, will interrupt and skip the message queue on objections (effectively bypassing text_delay system)

* Stop using AOPacket for the queue and use QStringList instead (packet contents, we don't care for the header)
Implement objection threshold which works in a queue if instant objections are disabled (not exposed to the settings yet)
Modify packet contents directly instead of waiting for m_chatmessage shenanigans (we should deprecate this soon)
Rename isinstant_objection_enabled options check to be more consistent

* Make it so objections display as soon as the message is over if instant_objection is disabled

* Remove emote_mod = "1" thing that had no real purpose
Implement desynchronized logs settings option, which is false by default, meaning users' messages and display IC logs are going to be in sync.
Split up display and logging behavior, meaning IC logs will be saved with accurate timings on the .logs file, while display can be slower.
Remove dumb "System" showname thing cuz it was dumb

* Bring back minimum packet size safety check

* Make sure shouts are properly logged. I am very sorry for this horrible amount of code duplication though.

* fix compile errors

* fix html parsing error

* Rearrange the order of logging so IC messages go like this:
* shouts go first
* evidence goes second
* chat message goes last

* Fix No Interrupt coming back, go away you foolish beast

* fix borked options dialog

* Crank down "press enter delay" from 600ms to 200ms so it's not as harsh

Co-authored-by: in1tiate <radwoodward@vikings.grayson.edu>
Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-01-12 11:24:11 +03:00
Crystalwarrior
45c78ea5ca Add "id" variable to the clock functions and properly parse the ID
Implement scalable maximum clock count, right now it's at 5 clocks a theme can have max
Theme "clock_" starts from 1 instead of 0 since users don't know when stuff starts at index 0
TODO: testing lol
2021-01-11 17:38:08 +03:00
oldmud0
62532f0b64
Trivial comment change 2021-01-10 10:41:34 -06:00
Skye Deving
4f2ac31456 Add arup_clear() and clear arup when fetching new areas
Theoretically fixes #313

The "FA" packet from the server invalidates the client's previous area
list so it makes sense for the arup information tied to that list to
be invalidated as well (especially seeing that the area and arup share
the same index).  As we repopulate the client's area list, we do the
same for the arup list.
2021-01-10 06:38:26 -06:00
Crystalwarrior
1ad8f3bf24 Merge branch 'master' into feature/timerclock
# Conflicts:
#	include/courtroom.h
#	src/courtroom.cpp
2021-01-10 14:27:27 +03:00
in1tiate
3a207dccf0 i barely had to modify this 2021-01-09 15:13:19 -06:00
oldmud0
41c134b1be
Merge pull request #387 from AttorneyOnline/feature/immediate
Rename noninterrupting bonanza to consistent and short "immediate" instead
2021-01-09 12:35:09 -06:00
in1tiate
3993ba47e5
Add desk_mods 2 -5 for more flexibility in emotes (#353) 2021-01-09 12:32:24 -06:00
Crystalwarrior
5b34df1c5a Rename noninterrupting_preanim and all its associated bullshit with more cooler and nicer bro immediate
In themes, pre_no_interrupt old-style name is still supported if we cannot find "immediate"
Resolves https://github.com/AttorneyOnline/AO2-Client/issues/64
2021-01-09 18:43:24 +03:00
in1tiate
15c3d607c6
Log objections IC, overhaul custom objections context menu, add more configuration options per-character (#356)
* initial commit

* The Quick-Fix is a secondary weapon for the Medic. It is a prototype Medi Gun with a group of three gauges on one side, a (cosmetic) ÜberCharge gauge on the other side, and what appears to be a blender for a body. The main gun is coupled with a medicinal reactor backpack with glowing portions that replaces Medic's default backpack.

* fixed settings dialog

* slightly less stupid custom objection default

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2021-01-09 18:17:12 +03:00
in1tiate
079c45e298
Define IC Log colors independent of character, define message colors according to character (#323)
* IC Log colors now defined independent of character

* Fix regression causing incorrect colors in the viewport

* fix goof that broke chat scrolling

* Only regenerate color vector when it's needed
2021-01-09 18:09:18 +03:00
oldmud0
de3533fbf2 Rework timer and ping logic
The timer's time as received by the server is clarified to be the actual
numerical time, in milliseconds, to be shown on the clock.
2021-01-09 01:18:19 -06:00
oldmud0
9486f44770
Merge pull request #369 from skyedeving/fix-showname-toggle
Fix timestamps when toggling showname
2021-01-05 21:07:48 -06:00
Skye Deving
5abc685b47 Sort case evidence numerically before adding in
inventories get displayed lexigraphically too but it is assumed to not
matter
2021-01-04 19:58:30 -06:00
Skye Deving
8aaba6633e Change default parameter to be QDateTime::currentDateTime()
Print debug message if provided timestamp is invalid
2021-01-04 19:21:11 -06:00
Skye Deving
6570bcf066 Fix timestamps when toggling showname
On toggling shownames, regenerate_ic_chatlog() gets called to reprint
the entire chatlog with append_ic_text().  The issue is that
append_ic_text() uses QDateTime::currentDateTime() for the timestamp
when it's called.  Therefore the fix is adding a new timestamp
parameter to the append_ic_text() which we supply from the datetime
provided by each chatlogpiece
2021-01-04 13:45:18 -06:00
oldmud0
4eb45ef2b0
Merge pull request #305 from Crystalwarrior/bugfix/blip-accuracy
More accurate/consistent blip rate functionality + punctuation slowdown fixes
2020-11-10 14:07:45 -06:00
in1tiate
fe3224d7e8
Add vertical offset feature (#333) 2020-11-10 08:43:18 -06:00
in1tiate
5aee23d56b
Add context menu entry to stop music (#301)
Also included in this commit are changes to the music packet handler that change the text from "has played a song" to "has stopped the music" in the case that the special "stop song" track is played, as well as a condition stopping music categories from triggering a music packet when double-clicked.

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2020-11-09 14:47:51 -06:00
in1tiate
48f8d8aa27 add variable check for evidence presenting 2020-09-19 04:12:40 -05:00
Crystalwarrior
c392bb3415 Revert the meme of instant text.
Instant text using }}} is not only meme-worthy in how limited it is in practice, it also makes the blip ticker completely confused how and when to play the blips (to make instant text possible, the entire system needs rewriting (again)
2020-09-11 23:39:32 +03:00
Crystalwarrior
8cc067dee4 More accurate/consistent blip rate functionality inspired by https://youtu.be/Min0hkwO43g 2020-09-11 22:17:13 +03:00
Crystalwarrior
6c62980ffc forgot to ctrl+s header definitions fuck 2020-08-25 12:58:48 +03:00
Crystalwarrior
ee3bad44c7 Implement clock pausing
Implement clock setting w/o starting or stopping
Both of these should make it possible for the server to start/stop/pause/resume the clock with perfect synchronization to the true time.
2020-08-25 12:48:09 +03:00
Crystalwarrior
7e9c5726e0 Introduce the timer packet - "TI".
This timer will start the clock accounting for latency! Cool, right?
Remove useless qDebug() for music looping
2020-08-25 12:21:10 +03:00
Crystalwarrior
febfbeafc1 Actually make use of the completely useless CHECK and CH keepalive timer and use them to determine the client's ping.
Display ping in the application window title.
keepalive timer now fires every second instead of every minute
Remove meme clock starting on set_widgets()
implement get_ping() on w_courtroom
2020-08-25 12:18:49 +03:00
Crystalwarrior
f27f210efe Proof of concept complete. The timer will now take int msecs to start, and will properly display the time remaining until target time in hh:mm:ss.zzz
Clock can be defined in courtroom_config.ini and its font set in courtroom_fonts.ini
Pause and resume functions will not work as expected atm.
2020-08-21 18:01:24 +03:00
scatterflower
9eb0f53db1
Reset BASS when switching devices; drop Qt Multimedia support (#262)
* Allow changing audio device on the fly while in a server
* Use default audio device if device in config doesn't exist
* Automatically change audio device to default when current one is invalid
* Destroy Qt Multimedia support

It was decided that there was not enough attention being given to Qt
Multimedia support to justify its continued maintenance simply as a
libre alternative to BASS. While substantial changes to audio were being
made in 2.8, the Qt Multimedia support code fell behind in disrepair.
It's clear that there is no vested interest in implementing audio
features twice for the sake of licensing.

When it's time to switch to another audio library, it will be done
unilaterally.

* CI: Use BASS for Linux build

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
2020-08-19 16:40:37 -05:00
Crystalwarrior
cef0ebc6eb
IC log rewrite (#259)
* Rewrite the IC Log code to drastically reduce code duplication and have both downward and upward mode in the same function
Regenerate the IC Log in set_widgets() function, making sure the maximum_blocks is accounted for and clearing the log to prepare for different log mode (upwards/downwards) if it's different from previous
Add placeholder text telling the user the direction in which the log will go
Remove useless first_message_sent global boolean, a remnant from a   w e a k e r   c o d e r m a n

* Add log_colors boolean to reduce color I/O happening in append_ic_text (optimization meme)
Clear the IC log when log_colors setting changes and reload theme is pressed
Fix https://github.com/AttorneyOnline/AO2-Client/issues/221

* Add configurable margin between IC log entries
Add configurable newline/singleline log mode
Options in settings for these

* Add optional timestamps

* Un-hardcode "played music" from the chatlogpiece and introduce the "action" argument so that "presented evidence" is fully supported now
Translate "has presented evidence"
Regenerate IC chatlog instead of clearing it, properly updating every element with the new configurations

* Go away *temp, code duplication making me shid and cry rn
Why is this not done in append_ic_text, or why isn't there a dedicated ic logging func aAAAaaaaAAAaa
Fix presenting evidence not being properly logged
Fix timestamp being UTC instead of local time (local time will not be as confusing)

* okok it was a joke a big ol bamboozle you got gnomed haha rick rolled beaned stickbugged
I did NOT copy paste code, no, I actually intended to fix copy pasted code all along. log_ic_text was always planned.

(Fix copypasted code for ic_chatlog_history and consolidate it into a single log_ic_text func)
2020-08-19 11:16:41 -05:00
Crystalwarrior
475a572c3b
Improved blankposting (#256)
* Consolidate blankposting into singular log entries of "no message" instead of spamming the logs repeatedly when someone decides to keep switching emotes
Return proper blankpost checking to 2.8.5 (chatmessage_is_empty bool makes sure the chatbox doesn't appear - branch broke that behavior by never setting it)
More robust blankpost checking, meaning that passing a competely empty "" string will also count as a blankpost
Fix screenshake not working with blankposting by moving it before the chatmessage_is_empty check in start_chack_ticking() stage of the message parsing

* Allow user to send blankposts without even having to input a single spacebar, but only if last m_chatmessage CID matches ours.

* Reviews are cool and good👌
allow sending no-text chat message to server without weird cid checks (let the server validate if they want to do STR_OR_EMPTY or just STR) - doesn't break existing behavior and lets servers introduce the new one if they want to
Treat all blank/whitespace messages as blankposting and not just single-whitespace.
Remove chatmessage_is_empty bool because why the fuck would you even need it if you have m_chatmessage[MESSAGE] already
Simplify chatlogpiece log entry to not be a *temp pointer by suggestion

* another useless bool destroyed
Make "additive" have a very awesome emergent behavior with blankposting - keep showing the chatbox+message while only changing the emotes. Works with preanims too!
2020-08-18 10:02:53 -05:00
scatterflower
ecb0ee42a3 clang format 2020-08-16 21:59:44 -05:00
scatterflower
1c5b097f65 further cleanup of chat handler 2020-08-16 12:43:26 -05:00
scatterflower
5c6dad88ce
Merge branch '2.8' into ic_fixes 2020-08-16 12:35:41 -05:00
scatterflower
11250e1386 Ensure consistent behavior in IC log, clarify showname logic, and define constants for minimum and maximum packet sizes 2020-08-16 06:50:19 -05:00
scatterflower
102ca4d641 Create brushes for area list once 2020-08-15 19:47:24 -05:00
scatterflower
8b44d4ae95 Only regenerate the area list once per ARUP packet 2020-08-15 19:40:52 -05:00
Crystalwarrior
bab10ea14d
Add "Play Random Song" option (#200)
It also respects the search string, so only visible tracks are chosen from the pool. Categories (i.e. entries with children) are also ignored.
2020-07-31 15:11:38 -05:00
Crystalwarrior
740d825fd2
Add a p_char optional argument to set_fonts() (#209)
Add overrides to set_font for font name and size (this is to preserve the chat_size and chat_font char.ini arguments that were implemented way earlier)
Cease the baddening with set_font that was there before and condense it into a proper set_font function call
Implement set_font for custom showname shenanigans from the misc folder
2020-07-31 15:06:55 -05:00
in1tiate
3afdad90c8
Add support for multiple custom interjections via context menu (#162)
* YOU DO NOT BELONG IN THIS PR
GET OUT

Co-authored-by: oldmud0 <oldmud0@users.noreply.github.com>
Co-authored-by: likeawindrammer <31085911+likeawindrammer@users.noreply.github.com>
Co-authored-by: Crystalwarrior <Varsash@Gmail.com>
2020-07-29 17:45:46 -05:00
windrammer
fc9fe6b34b
Fix colors not persisting when refreshing IC log (#204)
Co-authored-by: Cents02 <Cents02@Cents0.me>
2020-07-29 17:08:39 -05:00
windrammer
58180371ef
Hitting return on blank search box should collapse music list (#205)
* If enter is hit with no query it collapses the music list

Co-authored-by: Cents02 <Cents02@Cents0.me>
2020-07-29 17:07:55 -05:00
Crystalwarrior
c423a5ee56
Make music 'fade out previous' an effect enabled by default (#196)
Simply make the "FADE_OUT" music effect flag by default so more users experience the SMOOTH FADE OUT magic by accident and praise the based client.
2020-07-26 11:21:58 -05:00
Crystalwarrior
88de4cde04 clang 2 electric boogaloo
{ BasedOnStyle: LLVM, BreakBeforeBraces: Stroustrup}
2020-05-22 02:14:54 +03:00
Crystalwarrior
c8e12558cd Clang-ify the code with this styling using Visual Studio Code:
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Stroustrup, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All }
(this is the Visual Studio preset with only "BreakBeforeBraces" changed from Allman to Stroustrup)
2020-05-22 01:18:24 +03:00
Crystalwarrior
dfac0652c8 Add possibility for custom use text besides just "played music"
Implemented "presented evidence" message
2020-04-13 17:16:26 +03:00
Crystalwarrior
a4e448576b Make pos dropdown more abstract and actually useful by letting servers send only pos you can actually access.
Pos dropdown system also reads the actual bg folder of the current BG to see all the created pos.
2020-02-24 22:20:43 +03:00
Crystalwarrior
43c4e3e9d7 Network effects folder so you don't need to modify your own char.ini to see custom effects 2020-01-17 18:41:27 +03:00
Crystalwarrior
eb014a9778 Add a message delay modifier when punctuation is reached to simulate Ace Attorney 1 chat parsing (replicating the effect where characters would make a short pause, as if saying the line out loud)
TODO: Make this a configurable thing
2019-12-05 22:46:26 +03:00
Crystalwarrior
a9a0f65ddb Allow area list to contain metadata (as well as categories for future expansion)
Fix backwards compatibility breaking when you join a server that doesn't support effects after previously joining a server that does
2019-10-12 17:57:18 +03:00
Crystalwarrior
91eeffb959 Courtroom Fonts can now have the "sharpness" setting (pixelated/no anti alias) 2019-10-06 13:47:36 +03:00
Crystalwarrior
9f543f9ef7 I HAVE CONQUERED BASS HELL
BEHOLD, LOOP_START AND LOOP_END MUSIC POINTS! It reads the songname.mp3.txt file, looking for loop_start, loop_length and loop_end in samples
MUSIC EFFECTS SYSTEM THAT CAN ***COMMUNICATE WITH THE SERVER***, WOAHHHHHHHHH!
RIGHT-CLICK CONTEXT MENUS TO ENABLE/DISABLE SPECIFIC MUSIC EFFECTS
MUSIC EFFECTS ENUMS
Fix an issue with music looping
2019-10-05 20:32:19 +03:00
Crystalwarrior
9451822e09 Fix move func making characters slowly move to the left every frame on animated chars which are sized differently from viewport
Add a new get_qfont function
Fix message box font being different from every other font due to incorrect font loading scheme
Fix ui_evidence_save and ui_evidence_load tooltips being wrong
2019-10-03 23:17:21 +03:00
Crystalwarrior
bdef10ace5 Remove /rainbow as clientside slash commands are cursed. I shall purge all clientside slash command memery soon...
Fix /save_case iterating from last to first instead of first to last
Implement private evidence saving/loading to and from an .ini file
2019-10-03 17:01:41 +03:00
Crystalwarrior
829604e808 Positional evidence implemented. Click a button to change between private/global evidence list.
There's also a button to transfer evidence to global/private, context sensitive.
TODO: Save/load private evidence list
2019-10-03 15:44:18 +03:00
Crystalwarrior
e3ddc41cc8 Add rightclick context menus to sfx dropdown, iniswap dropdown and effects dropdown to open the ini's and respective folders
try to fix settings menu (I failed)
2019-10-02 20:28:42 +03:00
Crystalwarrior
4c23e15935 Rewrite pairing character ordering logic to instead operate based on a user-accessible drpodown menu (it's a dropdown for the future when there's more options)
Fix current charmovie breaking offsets
Make pairing offsets applicable even without a pairing partner, making it a generic offset
Fix the chat message hardcoding max colors to 8 (when it should be max_colors)
Come up with a way to convey the ordering information without creating an extra new packet in a cool way (backwards compatibility AND less clutter!)
More info on the evidence_x and evidence_ok tooltips
Don't mute music when you switch to CSS anymore
2019-10-02 01:20:00 +03:00
Crystalwarrior
4f738bfe34 Fix some read_file errors on effect loading
Make FM packet only fetch music, and new FA packet to fetch areas (this way you don't have to reload the entire music list just to get new areas)
Fix a possible segfault with emote lists if emote list size is bad
Hide casing button if server doesn't support casing
Hide the remove buttons by default for iniswaps and sfx list so they're not clickable when they shouldn't be
Prevent background from being displayed unless the server asked us to
Fix some redundancy surrounding current_side
Rework music list so list_music doesn't care about search bar and the hiding is actually done in the search function
Implement text centering, rightening and justifying
Fix text scrolling meme that happened with \n and skipped chars
Fix the pos dropdown not actually caring if you selected jur and sea pos.
Fix the pos dropdown sending like a million packets when scrolled through.
Prevent characters from being incorrectly resized if a different-scaled character speaks
Fix character select screen letting you choose characters that the server doesn't want us to be
2019-10-01 01:07:03 +03:00
Crystalwarrior
b0f11e53df Strip out QRandomGenerator because it's "too new" of a module (linux build does not compile with it)
Add QPluginLoader checks for qapng and qwebp
2019-09-28 22:00:16 +03:00
Crystalwarrior
d3a58770d3 Overhaul the evidence system:
You can now press the checkmark to save evidence. The checkmark only appears when your edited evidence differs from evidence on the server.
You will now be alerted if you try to exit out of the evidence with unsaved changes (pressing "X")
Fix double-clicking on image name not doing anything
You will now be alerted if the evidence changed as you were editing it
Add tooltips
Make an evidence_close function that can be referred to from multiple places
2019-09-28 20:22:38 +03:00
Crystalwarrior
a3d1d5bf9d i did it
i did the thing

Final overhaul of filter_ic_text
Fix spoken colors not being actually spoken
Fix a message of ()()()() spamming idle/talking animations (instead it just does the idle animation until you feed it an actual character)
Prevent spamming of play_idle and play_talking on the fastest text speed
Properly escape html and construct a message that works with characters &, <, >, ", etc. for filter_ic_text
Turn whitespace into html entities to prevent html from eating it up (alternative/better solution would be to erase excessive whitespace entirely but yaknow, some niche applications, whatever)
Fix filter_ic_text not displaying the best string it could in ic logs (strip html, display newlines as \n, etc.)
Scroll the scrollbar of the message box correctly according to some real wacky magic stuff I'm doing here. Let's hope there's no situations where it desyncs from the actual text.
2019-09-27 15:11:46 +03:00
Crystalwarrior
b67f083506 Optimize color markdown stuff properly by creating lists and preloading things 2019-09-25 03:40:44 +03:00
Crystalwarrior
923548c997 Hellcommit of doom and suffering
Create two new helper functions - get_chat_markdown and remake read_char_ini_tag to be read_ini_tags for more general purpose
Modify aolineedit to support preserving selection after unfocusing (building this for using dropdown list for setting colors), as well as remove the setReadOnly functionality and use it in signals instead
Overhaul the color system to get rid of inline colors, allow full customization of colors and usage of configuration files for every facet of how a color functions (should we be talking, should we remove that markdown char, etc.)
Complete overhaul of color markdowns system

TODO: Make this thing not lag to hell, fix chat messages hogging the IC as the animation never ends apparently
2019-09-25 02:05:52 +03:00
Crystalwarrior
7097053723 Change all instances of "colour" to "color" for consistency's sake
Overhaul inline colors system to properly support additive text and further expansion
Add two new colors - Gray and Blank, the latter being used for IC parsing.
Instead of adding text symbol by symbol, reveal more of the already-rendered text instead so that it properly anticipates words that need to be on the newline.
Changed the append_ic function slightly so it appends ": " to text only after it's no longer needed.
Made gray color less inconsistent with everything else
2019-09-24 21:24:25 +03:00
Crystalwarrior
d8857aa2e4 When the background is changed, display it in the correct position as dictated by the server packets
Add a new "set pos" packet
Udpate the pos dropdown according to the current pos
2019-09-24 00:38:26 +03:00
Crystalwarrior
398f37794f Make music list a QTreeWidget instead for easier category searching, etc.
Temporarily allow music suffix until I let the client perform a fileExists check similar to how images are handled (.mp3? play mp3, if not mp3, play .ogg, etc. etc.)
2019-09-23 15:48:35 +03:00
Crystalwarrior
2c265ebc0b Clear the screen and display the background in the correct position when background change func is called 2019-09-21 00:23:01 +03:00
Crystalwarrior
842b829bee Tweak the ambience/crosfade layer to fade in regardless of another sample being there
Fix music not being looped sometimes
Prevent channel less than 0 from being passed
Set up a new music display element with an attached music name, it displays a scrolling text of the currently playing music
Fix music packet processing issues
Make SFX slider responsible for all music channels besides 0 (actual music)

scrolltext.cpp code recipe was taken from https://stackoverflow.com/questions/10651514/text-scrolling-marquee-in-qlabel - thanks to leemes for that one, I only adapted it for newer C++ version and tweaked some stuff.
2019-09-20 22:11:37 +03:00
Crystalwarrior
a175a1884c Concurrent evidence updating!
Similar to the way Google Docs work, the evidence will be updated immediately as you make any changes to it.
2019-09-18 20:02:51 +03:00
Crystalwarrior
0fe94d5d9f Evidence and emotes reloading when reload_theme is pressed
Update evidence a bit and change the way it sets images to something much better and less confusing
Update the hovering logic a bit so there's less weird occurences happening e.g. evidence button is deleted
2019-09-18 17:34:22 +03:00
Crystalwarrior
04daff7446 When the realization button is pressed, update the Effects thing too. 2019-09-18 15:46:43 +03:00
Crystalwarrior
605e15bb8c Implement effects system that reads your folder in theme/effects, or misc/<folder name>/<effects>
Add an effect packet
Allow aomovie to be fed a direct path
Add some really terrible helper functions that shouldn't exist, sorry.
2019-09-18 04:14:52 +03:00
Crystalwarrior
e151964785 Add a sfx list that allows you to choose custom sfx from a list. Allows the same amount of customization as the iniswap list.
It tries to read soundlist.ini in the character folder first. If it can't find it, it will fall back to the theme's character_soundlist.ini.
It will only save the soundlist.ini if it differs from the character.soundlist.ini.
There is currently no way to dynamically change sound delay atm but the function for it is there.
Add more tooltips, my favorite!
2019-09-17 23:50:01 +03:00
Crystalwarrior
9d20cf0322 Streamlined ini swapping so the user can set up multiple character folders associated with a character.
This will save to the character folder's iniswaps.ini. You can click on the dropdown and edit the text inside to add an iniswap, and press the [X] button that'll appear next to it to remove the ini swap.
Recode the enter_courtroom and add a new update_character feature - the two are now separate and responsible for different things. The courtroom will reload the whole theme and widgets while the character is only responsible for all ui elements related to the character. This drastically improves performance when switching characters using /switch or something
Add a set_char_ini helper function that allows you to modify the character variables. For now only used to set name= field when iniswapping
2019-09-17 18:51:40 +03:00
Crystalwarrior
13221319b8 Change get_stylesheet to return text of a parsed stylesheet file, its functionality was transferred to get_tagged_stylesheet
Remove some useless/unused ui elements
Implement stylesheet for courtrooms in a way that lets the end user modify a lot of its elements
Use get_image_suffix for evidence_appear images
2019-09-16 23:22:34 +03:00
Crystalwarrior
f3c7beab70 Chat arrow indicator to inform you if the current message stopped being processed
Can be modified from the theme in chat_arrow of courtroom_design.ini
Uses chat_arrow .png/.gif/etc.
2019-09-16 21:10:21 +03:00
Crystalwarrior
b037edc9d8 Add additive text option where your messages are added to your previous one, fully networked and ready for the server
Adjust some pointless static bool casts to be actual logic checks
2019-09-16 18:11:19 +03:00
Crystalwarrior
9b39b7d6aa Allow char.ini to override the chat font and font size with chat_font = and chat_size =
Scream at the coders that decided hard-coding fonts and colors was a good idea (gotta properly let the themes modify that later)
Fix a lot of ui elements not properly respecting the themes and their colors
add a set_qfont method for those situations that need it
Allow the theme to change sender colors for ooc and ms chatlogs
rename url parser variable to something more immediately apparent as to what it is for readability's sake
2019-09-16 06:09:39 +03:00
Crystalwarrior
03ebad6bb6 Add expanded style sheet support
Allow lobby fonts to happen
2019-09-16 04:16:59 +03:00
Crystalwarrior
a2f9df4042 Finally implement frame-specific effects such as screenshake, realization flash, sound effects, etc.
Fix screenshake animation modifying the default positions of shook elements
Fix aomovie sometimes not playing the last frame and causing lagspikes due to the delay() method
2019-09-15 17:44:02 +03:00
Crystalwarrior
4645d9dd08 Add a blip sound QElapsedTimer so blipsounds don't play more frequently than 60ms to preserve all of our ears.
Adjust the message display speeds to feel more accurate to AA, with }}} speed displaying text instantly for that section
2019-09-14 00:46:46 +03:00
Crystalwarrior
040898feff Set up screenshake button ui
Rewrite Goofball's doScreenshake() function to be much more modular and multi-purpose (also rename to do_screenshake() to match other functions)
Add networking needed to make screenshake work. Works with AOV version of tsuserver3 (button screenshake only so far).
Add get_theme_pos helper function, currently unused.
2019-09-13 15:11:30 +03:00
Crystalwarrior
bb8edab579 Make shout, verdict and wtce default duration values into constants 2019-09-13 11:41:59 +03:00
Crystalwarrior
455e020b19 Make log go downwards by default
Rename kill_music_on_object to objection_stop_music for readability
Update blip rate (faster overall, more accurate to the trilogy) - based on AOV values
Update default blip rate to be "once every two symbols"
2019-09-13 11:13:50 +03:00
Crystalwarrior
280abedf63 Merge branch 'music_list_update' 2019-09-12 22:26:00 +03:00
Crystalwarrior
bb98f79083 Fix compilation error
Allow realization flashes to be animated images by making them AOMovies
Eploit the newly added 'duration' system for realization AOMovie
2019-09-12 19:37:44 +03:00
Crystalwarrior
932f430b68 Remove unecessary hard-coded timers for the witness testimony .png
Make the witness testimony use AOMovie instead of AOImage
Remove pointless "testimony_in_progress" variable
CONTROVERSIAL: Make the witness testimony indicator be position-ignorant so as to reduce the amount of hardcoding and allow broader usage of the witness testimony system (For example, Danganronpa investigation indicator, etc.) - This should not affect how the testimony indicator is received currently, as witness testimony usually requires the entire rest of the court to shut up until the cross-examination either way.
2019-09-12 19:03:42 +03:00
Crystalwarrior
c2fd3796a9 Add clear_music and clear_areas
Comment out the index as it can be potentially confusing alongside "true" area numbers
Add "FM" to Packet Received that would reload the areas and music list

TODO: Test this with arup systems
2019-09-11 00:49:30 +03:00
stonedDiscord
d94d2fb405 read and store qt audio device 2019-08-19 19:38:47 +02:00
David Skoland
5eccabcad1 Less insane debugging; minor refactoring (!75) 2019-07-12 23:00:25 +00:00
Cerapter
2e4f0117b0 Text is now advanced based on graphemes, rather than bytes. 2019-05-09 23:49:20 +02:00
David Skoland
00cfd2750d moved headers into include and cpp files into src + logo into resource 2018-12-26 16:43:08 +01:00