Commit Graph

89 Commits

Author SHA1 Message Date
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
1f72205716 Mysterious super-similar-to-AA font, please don't elude me. 2019-09-29 04:43:28 +03:00
Crystalwarrior
d5cbb085db Update Bass.dll headers to newer version
Remove a bunch of comments
Add lqapng and lqwebp to try and get apng and webp support to fuckin load already
2019-09-29 03:27:36 +03:00
Crystalwarrior
30c02221d2 Make the client select a default font that resembles classic AA font the most (cleartype off, MS Sans)
Create a better method to replace trailing whitespace with proper HTML representation
Don't bother rendering the string character-by-character to prevent any latency happening with instant text speed
2019-09-29 03:26:16 +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
709ebb7e18 Fix AOEvidenceDisplay not respecting the size of the viewport properly and breaking if a static image was used for evidence appearance
Fix an issue with chat message being resized before the chat box is in reload theme
2019-09-28 20:43:19 +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
8c9275c497 Add cute color icons to color dropdown ui
Fix current_side not using the character's preferred one after changing character
Add cool tool tip describing how to do cool select+color thing
Fix chatlogpiece not appending ": " in the log files
2019-09-27 15:52:51 +03:00
Crystalwarrior
3c27988423 Fix ic chatlogs displaying escaped html 2019-09-27 15:48:35 +03:00
Crystalwarrior
1a3d3281a7 Display the first character of the ic message right away instead of having a delay 2019-09-27 15:12:09 +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
c38061a990 help me jesus
HTML gotta be like escaped n shit
2019-09-25 04:58:38 +03:00
Crystalwarrior
0649884d3c Fix issue with ao line edit not correctly preserving selection
Resolve a segfault with text formatting
Implement ability to color text inline by selecting text and using the color dropdown

TODO: allow html characters to be used for coloring text, oof
2019-09-25 04:45:45 +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
fb6c5076aa Fix some tooltips
Workaround for music list updates forcing the music list to collapse, prioritize expanding it instead. (ISSUE: does not fix the underlying problem of the music list inexplicably collapsing/expanding. Need to preserve info for that somewhere.)
Fix additive chat not showing up for anyone that's not yourself (Todo: update server code to do the proper checking)
2019-09-24 04:15:06 +03:00
Crystalwarrior
1e4f8fc2ac Fix a bug with music search that didn't show the item's parent when it's being searched for 2019-09-24 00:59:12 +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
497901e8c3 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
2019-09-20 22:08:36 +03:00
Crystalwarrior
3fd93ab341 Make ui_additive_button insert a whitespace character at the start of the message when you use it (to make it so by default, the added message will have that space, but you can safely remove it if you need to)
Support for aomovie to check inside the character folder for relevant stuff if p_char is provided
2019-09-20 17:26:41 +03:00
Crystalwarrior
3899dbe0bd I dunno what the fuck was I doing for the past 4 hours but I made crossfading music work.
Music packets can receive channel to play the song in and the crossfading option too.
2019-09-20 05:30:07 +03:00
Crystalwarrior
df08ec4be6 Get rid of some debug text 2019-09-18 22:46:10 +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
f8d3d5d8fd Fix a bug with sound effect from misc/ folder not being read
Make an "effects_icon_size" entry in courtroom_design.ini for scaling the buttons in the effects list
2019-09-18 14:28:26 +03:00
Crystalwarrior
9b0f07d125 Make effects stop when next message is received 2019-09-18 05:24:40 +03:00
Crystalwarrior
ad057c6f7a make icons for effects n shit
they're grabbed from the effects/icons/*same name as effects*
gotta be .png or w/e
i need my sleep
2019-09-18 05:22:00 +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
8409b71611 Tool tips! Tool tips for everyone!
Change the way AOButton loads images into itself (stylesheet broke tooltips)
2019-09-17 21:17:30 +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
6747bfdd5e Allow lobby server descriptions to parse links
Fix bad reference to ui_emote_right image
Fix chatbox being part of the viewport (gets cut off if it's outside)
2019-09-17 03:31:18 +03:00
Crystalwarrior
9695c621c2 so this solution doesn't really work. It makes the chat message box appear over the character select screen.
this bug only occurs when the chat box is initialized inside the viewport. Annoying as hell but at least it can be reproduced reliably.
2019-09-17 00:56:39 +03:00
Crystalwarrior
684e26cb77 Change the way sideplayer/playerchar ordering works to be stackUnder instead of Raise so it doesn't break anything (like the chatbox) 2019-09-16 23:54:42 +03:00
Crystalwarrior
19ff6cd5f8 Fix an incredibly obscure bug where if the viewport message is inside the viewport itself it would not let you scroll it up should the message be too long. 2019-09-16 23:53:32 +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
b085be5a2a Add two new helper functions - get_design_element and get_static_image_suffix
Modify all set_image calls to utilize said suffix helper function
Dynamically change betweehn chatblank, chat, chatmed, chatbig based on the showname's length
Use char.ini showname if showname is set to whitespace (doesn't yet check if char.ini showname is also whitespace)
2019-09-16 21:08:43 +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
bf999f195a Add file reading, writing and appending functions that create folders if bool is true
Fix server_address not being properly created in packet distribution
Create a log file when you join a server in the logs/<server name>/<logname>.log and update it every time there's a new chat entry
minor refactor of chatlogpiece
2019-09-16 01:16:37 +03:00
Crystalwarrior
1b36be9dbc Add an option for networking frame-specific effects
I'm starting to realize the options menu/system needs a complete overhaul at this point. (Auto-generating options menu, anyone?)
2019-09-15 21:39:39 +03:00
Crystalwarrior
ba28c244aa Add an opton to enable/disable screenshake + flashing
Fix moderation guard button not doing what it's supposed to (enable/disable modcalls)
Fix moderation guard button appearing with failed logins
Fix the option to toggle looping sfx not doing anything
2019-09-15 21:15:40 +03:00
Crystalwarrior
661ec87646 Implement networking for frame-specific effects data sending/parsing if the server supports it
Reorganize charmovie.h a bit and make some functions private
Add a new helper function "read_char_ini_tag" which returns a qstringlist of all key=value strings associated with the tag
2019-09-15 20:02:24 +03:00
Crystalwarrior
e94640b349 Looping SFX system - Defined this way:
[SoundL]
sfx-roar = 1
2019-09-15 17:44:47 +03:00