aboutsummaryrefslogtreecommitdiff
path: root/src/text_file_functions.cpp
AgeCommit message (Collapse)Author
2021-01-09replace "gender" with "blips" (#386)in1tiate
Co-authored-by: Crystalwarrior <Varsash@Gmail.com>
2021-01-09Log objections IC, overhaul custom objections context menu, add more ↵in1tiate
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-09Define IC Log colors independent of character, define message colors ↵in1tiate
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
2020-08-19IC log rewrite (#259)Crystalwarrior
* 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-16clang formatscatterflower
2020-08-16Merge pull request #245 from scatterflower/realization_fixscatterflower
Check for custom realization sound when using effects list
2020-08-16Check for custom realization sound when using effects listscatterflower
2020-08-05Fix not using custom chatbox's colors (#228)windrammer
* Fix not using custom chatbox's colors Moved set_text_color_dropdown() to after current_char is actually updated with the selected char. Otherwise set_text_color_dropdown will try to update the colors with either nothing as character, or with the previously selected character. Use get_chat() so it actually gets the name of the custom chatbox instead of using the same name as the character. Remove the extra "c" since get_chat_color it's already called with this "c" in place. * Fix previous fix crashing the client on DRO servers For some reason the client would work just fine if set_text_color_dropdown() was called only once after updating the character selected by the user. But when joining a DRO server the client would crash just before loading the music. * Improve comment with where crash happens * Fix get_chat_markdown to get the custom chatbox on misc of the char instead of trying to find the character folder on misc * Fix client using the current character colors on other people's messages Also remove the comment explaining the crash if set_text_color_dropdown is removed from set_widgets * Fix loading custom colors loading after the message was added to the log
2020-07-31Add option for automatic logging (#203)windrammer
Just so we're on the same page, this is enabled by default. Co-authored-by: Cents02 <Cents02@Cents0.me>
2020-07-29Fix character-specific theme not falling back to current theme (#207)windrammer
It is only logical to say that the user, when not specifying any specific speedline or similar in the theme, then the current theme should be checked first rather than the default theme. Co-authored-by: Cents02 <Cents02@Cents0.me>
2020-07-04Fix the blips folder not seeking the blips/ folder for the male.wav sound ↵Crystalwarrior
effect first instead of trying to find sfx-blipmale in base/general folder, makes using the blips folder more viable. (#173)
2020-07-03Add a setting to turn on/off custom character-defined chatboxes (#166)Crystalwarrior
* Add a new "Custom Chatboxes" settings option to enable/disable char.ini setting custom chat box designs per-character * Fix chat_arrow being incorrectly updated between character messages if the custom chatbox modified the chat arrow positioning/size in any way * brackets matter
2020-06-29Fix issues when undefined colors result in everyone's chat not using talk ↵Crystalwarrior
anims (#174) base/misc/default/config.ini with properly defined "baseline" colors will have to be supplied with vanilla content later. Remove hardcoded colors - user has no access to these unless config.ini is valid, yet when others speak using these ID's their text shows up just fine. Either reimplement full on hardcoding madness (NOOOOOOOOOOOOOOOOOOOOOOOO NO NO NO NOOOOOOOOOOOOOOOO NOOOOO!!!!) or yeet. I chose the sensible option :^)
2020-05-22Fix looping frame SFX not working w/ AOV's definitionsCrystalwarrior
2020-05-22clang 2 electric boogalooCrystalwarrior
{ BasedOnStyle: LLVM, BreakBeforeBraces: Stroustrup}
2020-05-22Clang-ify the code with this styling using Visual Studio Code:Crystalwarrior
{ 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-03-31Add courtroom_design.ini partial parsing for misc/ folder (only chat_arrow ↵Crystalwarrior
and showname atm) Initialize chat arrow n stuff this is still pretty gay because you can't ignore size and set pos or something like that
2020-03-22Fix a really obscure bug breaking custom realization sound effects ↵Crystalwarrior
(realization=thing) char.ini definition not starting from base/sounds/general folder
2020-03-12Add a search bar for server listCrystalwarrior
Add options for sticky sounds, sticky effects and sticky preanims Optimize the search for areas and music (previously, area search also searched for music in the background, causing lag with huge music lists)
2020-01-17Network effects folder so you don't need to modify your own char.ini to see ↵Crystalwarrior
custom effects
2020-01-15Separate screenshake options button from effects options buttonCrystalwarrior
Add a color logging option button Update version to 2.8.2
2020-01-15i am REtArdCrystalwarrior
Fixed a major bug that crashed the clients on chatting + broke a lot of assets because of a single `.` boi anywhere in the filepath.
2019-11-18Fix a bug where user would be unable to speak if the BG changed when someone ↵Crystalwarrior
else was speaking Make it so blip sounds are accessed in base/sounds/blips/* if such a path exists
2019-11-04Fix the sound bonanza so they actually playCrystalwarrior
sfx player and blip player now both account for extension-less sound paths and also correctly handle paths that do provide the extension.
2019-11-04Make the music search bar search in music metadata instead of just the ↵Crystalwarrior
displayed name (aka the filepath) Make sfx player able to play sfx without the file extension provided Allow blipsounds to seek in blips/ folder to allow better categorization, as well as direct sound references add get_emote_blip for detecting the blipsound used by an emote. Currently unused. Less strict/hardcoded custom objection detection system Allow system (charid -1) messages, and don't do the same message detection on blankposting Allow objection, hold it, take that and custom sound players to detect sounds that are not exclusively .wav
2019-10-23Allow gender (blip sounds) that don't use sfx-blip naming conventionCrystalwarrior
Fix "prezoom" packet being ignored Allow char.ini's to indicate a zoom w/ preanimation by using emote_mod=4 ((ALL OF THESE ARE UNTESTED - TESTING NEEDED!))
2019-10-05Meme fix to <>, ~~ and ~> parsing (does not fully solve the issue but at ↵Crystalwarrior
least hides it from the user) Allow ascii characters to be used for color dropdown symbols
2019-10-01Fix some read_file errors on effect loadingCrystalwarrior
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-09-29Make the client select a default font that resembles classic AA font the ↵Crystalwarrior
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-25Hellcommit of doom and sufferingCrystalwarrior
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-24Change all instances of "colour" to "color" for consistency's sakeCrystalwarrior
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-18Fix a bug with sound effect from misc/ folder not being readCrystalwarrior
Make an "effects_icon_size" entry in courtroom_design.ini for scaling the buttons in the effects list
2019-09-18Bugfixes for the thing and how it orders thingsCrystalwarrior
2019-09-18make icons for effects n shitCrystalwarrior
they're grabbed from the effects/icons/*same name as effects* gotta be .png or w/e i need my sleep
2019-09-18Implement effects system that reads your folder in theme/effects, or ↵Crystalwarrior
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-17Streamlined ini swapping so the user can set up multiple character folders ↵Crystalwarrior
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-16Change get_stylesheet to return text of a parsed stylesheet file, its ↵Crystalwarrior
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-16Add two new helper functions - get_design_element and get_static_image_suffixCrystalwarrior
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-16Allow char.ini to override the chat font and font size with chat_font = and ↵Crystalwarrior
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-16Add expanded style sheet supportCrystalwarrior
Allow lobby fonts to happen
2019-09-16Add file reading, writing and appending functions that create folders if ↵Crystalwarrior
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-15Add an option for networking frame-specific effectsCrystalwarrior
I'm starting to realize the options menu/system needs a complete overhaul at this point. (Auto-generating options menu, anyone?)
2019-09-15Add an opton to enable/disable screenshake + flashingCrystalwarrior
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-15Implement networking for frame-specific effects data sending/parsing if the ↵Crystalwarrior
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-15Looping SFX system - Defined this way:Crystalwarrior
[SoundL] sfx-roar = 1
2019-09-15Finally implement frame-specific effects such as screenshake, realization ↵Crystalwarrior
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-13Make log go downwards by defaultCrystalwarrior
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-13Kill Music on Object optioniamgoofball
(todo: actual functionality, cherrypicked from Goofball's 2.7 branch)
2019-09-12Fix compilation errorCrystalwarrior
Allow realization flashes to be animated images by making them AOMovies Eploit the newly added 'duration' system for realization AOMovie
2019-09-12Expand get_image_suffix to fall back on .png lastCrystalwarrior
Reorganize the file_exists checks to be an array iterator instead for much less code duplication and easier ordering of priority Reorganize desk and set_image loading on AOScene class, resolve issues with last_image setting to prevent animations from being restarted when characters talk on the same pos in succession Apply get_image_suffix for seancestand and jurystand searches TODO: At the moment, if you feed a .png shout, it will send the "Done" signal on the first frame (frame 0), not showing you the .png image at all. The shout code should be reorganized to allow static images to be displayed for exactly 720ms - the standard AA objection length. Usage of the timer similarly to the realizationflash.png might be possible.